/proc directory in linux

news/2024/11/5 0:51:19
Its zero-length files are neither binary nor text, 
	yet you can examine and display them

Under Linux, everything is managed as a file; 
	even devices are accessed as files (in the /dev directory). 
	Although you might think that “normal” files are either text or binary (or possibly device or pipe files), 
	the /proc directory contains a stranger type: 
		virtual files. 
		These files are listed, but don’t actually exist on disk; 

Although almost all the files are read-only, 
	a few writable ones (notably in /proc/sys) 
		allow you to change kernel parameters. 
			(Of course, you must be careful if you do this.)
			
The numbered directories correspond to each running process;
	a special self symlink points to the current process. 

Some virtual files provide hardware information, such as 
	/proc/cpuinfo, 
	/proc/meminfo, 
	/proc/interrupts. 
Others give file-related info, such as 
	/proc/filesystems 
	/proc/partitions. 
The files under /proc/sys are related to kernel configuration parameters

/proc/cmdline: 
	Shows the parameters that were passed to the kernel at boot time.
/proc/dma: 
	Shows the Direct Memory Access channels in use.

the numerical named directories 
	represent all running processes. 
When a process ends, 
	its /proc directory disappears automatically

在这里插入图片描述

cmdline: 
	Contains the command that started the process, with all its parameters.
cwd: 
	A symlink to the current working directory (CWD) for the process; 
	exe links to the process executable, 
	and root links to its root directory.
environ: 
	Shows all environment variables for the process.
fd:
	Contains all file descriptors for a process, 
		showing which files or devices it is using.
maps, statm, and mem: 
	Deal with the memory in use by the process.
stat and status: 
	Provide information about the status of the process, 
	but the latter is far clearer than the former.
if you want to program a better-looking top, 
	all the needed information is right at your fingertips.

http://www.niftyadmin.cn/n/4924529.html

相关文章

MATLAB实现免疫优化算法(附上多个完整仿真源码)

免疫优化算法是一种基于免疫学原理的优化算法。该算法的基本思想是通过模拟人类免疫系统的功能,来寻找最优解。 MATLAB是一种专门用于数学计算和数据处理的软件工具,它具有强大的数学计算和数据分析能力,可以方便地实现各种优化算法。 本文…

Node.js:实现遍历文件夹下所有文件

Node.js:实现遍历文件夹 代码如下 const fs require(fs) const path require(path)function traverseFolder(folderPath) {// 读取文件夹列表const files fs.readdirSync(folderPath)// 遍历文件夹列表files.forEach(function (fileName) {// 拼接当前文件路径…

IP-GUARD安全查看器开启TBS引擎使用说明

开启TBS引擎使用说明 安卓版本的安全查看器默认用内置引擎打开 office 文件WPS文件和pdf文件;可对登录的用户配置用户定制配置来开启TBS引擎。另外,当启用 TBS引警后,可通过用户定制配置来实现“指定的文件类型大于等于某个大小后,使用 tbs引…

Springboot中拦截GET请求获取请求参数验证合法性

目录 目的 核心方法 完整代码 创建拦截器 注册拦截器 测试效果 目的 在Springboot中创建拦截器拦截所有GET类型请求,获取请求参数验证内容合法性防止SQL注入(该方法仅适用拦截GET类型请求,POST类型请求参数是在body中,所以下面…

【JS】前端日期格式转化函数

/*** 日期时间格式转化* param date 时间* param fmt 转化格式 yyyy-MM-dd hh:mm:ss 不传转成:yyyy-MM-dd* returns 格式时间字符*/ const formatDate (date, fmt yyyy-MM-dd) > {if (date null) return;if (typeof (date) string || typeof (date) number)…

122、SpringBoot中有几种定义Bean的方式?

SpringBoot中有几种定义Bean的方式? SpringBoot中有几种定义Bean的方式?代码栗子演示1、@Bean2. @Component3. @Controller、@RestController、@Service、@Repository4. @ControllerAdvice、@RestControllerAdvice5. @Configuration6. @Import7. BeanDefinition8. \<bean\…

AIGC技术到底是什么?为什么这么火热?

AIGC技术到底是什么&#xff1f;为什么这么火热&#xff1f; ALCG技术到底是什么&#xff1f;AIGC技术的发展史AIGC技术特点AIGC技术主要用途ALGC技术未来发展 ALCG技术到底是什么&#xff1f; AIGC&#xff08;Artificial Intelligence in Game Creation&#xff09;技术是指…

整理书籍遇到的知识点

1.SDL Game Development 是什么意思&#xff1f; SDL&#xff08;Simple DirectMedia Layer&#xff09;是一个跨平台的多媒体库&#xff0c;用于开发图形、音频和输入处理等功能的应用程序。SDL 提供了一组简单而强大的API&#xff0c;使开发者能够轻松地创建游戏和其他多媒体…