标签:
attr:
进程的属性
cmdline:
启动进程时执行的命令
cwd:
指向进程当前工作目录的软链
ll cwd可知是个软连接。
environ:
进程执行时使用的环境变量,文件内容使用null字节(‘\0‘)分隔,然后以null字节结束。因此获取进程使用的环境变量使用如下:
(cat /proc/pid/environ; echo) | tr ‘\000‘ ‘\n‘
fd:
此目录包含进程打开的所有文件,文件名为文件描述符,目录中每个软连接都会指向进程打开的实际文件。
比如:nginx下:
root@iZ23onhpqvwZ:/proc/22210/fd# ll
total 0
dr-x------ 2 root root 0 Oct 20 17:39 ./
dr-xr-xr-x 9 root root 0 Oct 20 17:22 ../
lrwx------ 1 root root 64 Oct 20 17:39 0 -> /dev/null
lrwx------ 1 root root 64 Oct 20 17:39 1 -> /dev/null
lrwx------ 1 root root 64 Oct 20 17:39 10 -> socket:[2917559817]
l-wx------ 1 root root 64 Oct 20 17:39 2 -> /opt/nginx/logs/error.log
l-wx------ 1 root root 64 Oct 20 17:39 3 -> /opt/nginx/logs/access.log
lrwx------ 1 root root 64 Oct 20 17:39 6 -> socket:[2917557592]
lrwx------ 1 root root 64 Oct 20 17:39 7 -> socket:[2917557593]
l-wx------ 1 root root 64 Oct 20 17:39 8 -> /opt/nginx/logs/error.log
lrwx------ 1 root root 64 Oct 20 17:39 9 -> socket:[2917559816]
limits:
该文件存储了进程的软限制,硬限制等信息。
可以查看该进程允许打开的最大描述字个数。
maps:
address perms offset dev inode pathname
08048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm
4001f000-40135000 r-xp 00000000 03:0c 45494 /lib/libc-2.2.4.so
* address:进程占用的地址空间。
* perms:权限集
r = read
w = write
x = execute
s = shared
p = private (copy on write)
* offset:文件偏移量。
* dev:为设备(major:minor)
* inode:设备上的inode。0为没有inode关联互内存区域,通常为:BSS(uninitialized data)
root:
指向进程更目录的软链
smaps:
This file shows memory consumption for each of the process‘s mappings. For each of mappings there is a series of lines such as the following:
08048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash
Size: 464 kB
Rss: 424 kB
Shared_Clean: 424 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 0 kB
The first of these lines shows the same information as is displayed for the mapping in /proc/[pid]/maps. The remaining lines show the size of
the mapping, the amount of the mapping that is currently resident in RAM, the number of clean and dirty shared pages in the mapping, and the
number of clean and dirty private pages in the mapping.
This file is only present if the CONFIG_MMU kernel configuration option is enabled.
标签:
原文地址:http://www.cnblogs.com/youxin/p/4980058.html