Linux中的proc下的節點,可以看到內核的一些重要信息,也是用戶空間與內核空間交互的媒介。
比如/proc/PID節點,可以查看某個PID進程的相關信息:
DIRECTORY |
DESCRIPTION |
---|
/proc/PID/cmdline |
Command line arguments. |
/proc/PID/cpu |
Current and last cpu in which it was executed. |
/proc/PID/cwd |
Link to the current working directory. |
/proc/PID/environ |
Values of environment variables. |
/proc/PID/exe |
Link to the executable of this process. |
/proc/PID/fd |
Directory, which contains all file descriptors. |
/proc/PID/maps |
Memory maps to executables and library files. |
/proc/PID/mem |
Memory held by this process. |
/proc/PID/root |
Link to the root directory of this process. |
/proc/PID/stat |
Process status. |
/proc/PID/statm |
Process memory status information. |
/proc/PID/status |
Process status in human readable form. |
一些系統級別的節點:
FILE |
DESCRIPTION |
---|
/proc/crypto |
list of available cryptographic modules |
/proc/diskstats |
nformation (including device numbers) for each of the logical disk devices |
/proc/filesystems |
list of the file systems supported by the kernel at the time of listing |
/proc/kmsg |
holding messages output by the kernel |
/proc/meminfo |
summary of how the kernel is managing its memory. |
/proc/scsi |
information about any devices connected via a SCSI or RAID controller |
/proc/tty |
information about the current terminals |
/proc/version |
containing the Linux kernel version, distribution number, gcc version number (used to build the kernel) and any other pertinent information relating to the version of the kernel currently running |
/proc/partitions
|
contains a table with major and minor number of partitioned devices, their number of blocks and the device name in /dev. |