Linux中的proc文件系统

Linux中的proc下的节点,可以看到内核的一些重要信息,也是用户空间与内核空间交互的媒介。

比如/proc/PID节点,可以查看某个PID进程的相关信息:

DIRECTORYDESCRIPTION
/proc/PID/cmdlineCommand line arguments.
/proc/PID/cpuCurrent and last cpu in which it was executed.
/proc/PID/cwdLink to the current working directory.
/proc/PID/environValues of environment variables.
/proc/PID/exeLink to the executable of this process.
/proc/PID/fdDirectory, which contains all file descriptors.
/proc/PID/mapsMemory maps to executables and library files.
/proc/PID/memMemory held by this process.
/proc/PID/rootLink to the root directory of this process.
/proc/PID/statProcess status.
/proc/PID/statmProcess memory status information.
/proc/PID/statusProcess status in human readable form.

一些系统级别的节点:

FILEDESCRIPTION
/proc/cryptolist of available cryptographic modules
/proc/diskstatsnformation (including device numbers) for each of the logical disk devices
/proc/filesystemslist of the file systems supported by the kernel at the time of listing
/proc/kmsgholding messages output by the kernel
/proc/meminfosummary of how the kernel is managing its memory.
/proc/scsiinformation about any devices connected via a SCSI or RAID controller
/proc/ttyinformation about the current terminals
/proc/versioncontaining 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

 

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值