linux中的proc文件系统详解---英文
来源:互联网 发布:淘宝联盟官网登陆入口 编辑:程序博客网 时间:2024/05/29 08:40
原帖:
Access the Linux kernel using the /proc filesystem----http://www.ibm.com/developerworks/library/l-proc/index.html
wiki:proc filesystem---http://en.wikipedia.org/wiki/Procfs,下面的external links和reference值得一看
The Linux /proc Filesystem as a Programmers' Tool---http://www.linuxjournal.com/article/8381
Explore Linux /proc File System (/proc directories, /proc files)--http://www.thegeekstuff.com/2010/11/linux-proc-file-system/Using the /proc Filesystem to Examine Your Linux Inner Working--http://maketecheasier.com/proc-filesystem-examine-linux-inner-working/2010/08/19
只是转过来Explore Linux/proc File System (/proc directories, /proc files)文章,也可以google: linux proc file system
Inside the /proc directory, you’ll see two types of content — numbered directories, and system information files.
/proc is not a real file system, it is a virtual file system. For example, if you do ls -l /proc/stat, you’ll notice that it has a size of 0 bytes, but if you do “cat /proc/stat”, you’ll see some content inside the file.
Several Linux commands access the information from /proc, and displays in a certain format.
1. /proc Directories with names as numbers
Do a ls -l /proc, and you’ll see lot of directories with just numbers. These numbers represents the process ids, the files inside this numbered directory corresponds to the process with that particular PID.
Following are the important files located under each numbered directory (for each process):
- cmdline – command line of the command.
- environ – environment variables.
- fd – Contains the file descriptors which is linked to the appropriate files.
- limits – Contains the information about the specific limits to the process.
- mounts – mount related information
Following are the important links under each numbered directory (for each process):
- cwd – Link to current working directory of the process.
- exe – Link to executable of the process.
- root – Link to the root directory of the process.
2. /proc Files about the system information
Following are some files which are available under /proc, that contains system information such as cpuinfo, meminfo, loadavg.
- /proc/cpuinfo – information about CPU,
- /proc/meminfo – information about memory,
- /proc/loadvg – load average,
- /proc/partitions – partition related information,
- /proc/version – linux version
Some Linux commands read the information from this /proc files and displays it. For example, free command, reads the memory information from /proc/meminfo file, formats it, and displays it.
To learn more about the individual /proc files, do “man 5 FILENAME”.
- /proc/cmdline – Kernel command line
- /proc/cpuinfo – Information about the processors.
- /proc/devices – List of device drivers configured into the currently running kernel.
- /proc/dma – Shows which DMA channels are being used at the moment.
- /proc/fb – Frame Buffer devices.
- /proc/filesystems – File systems supported by the kernel.
- /proc/interrupts – Number of interrupts per IRQ on architecture.
- /proc/iomem – This file shows the current map of the system’s memory for its various devices
- /proc/ioports – provides a list of currently registered port regions used for input or output communication with a device
- /proc/loadavg – Contains load average of the system
The first three columns measure CPU utilization of the last 1, 5, and 10 minute periods.
The fourth column shows the number of currently running processes and the total number of processes.
The last column displays the last process ID used. - /proc/locks – Displays the files currently locked by the kernel
Sample line:
1: POSIX ADVISORY WRITE 14375 08:03:114727 0 EOF - /proc/meminfo – Current utilization of primary memory on the system
- /proc/misc – This file lists miscellaneous drivers registered on the miscellaneous major device, which is number 10
- /proc/modules – Displays a list of all modules that have been loaded by the system
- /proc/mounts – This file provides a quick list of all mounts in use by the system
- /proc/partitions – Very detailed information on the various partitions currently available to the system
- /proc/pci – Full listing of every PCI device on your system
- /proc/stat – Keeps track of a variety of different statistics about the system since it was last restarted
- /proc/swap – Measures swap space and its utilization
- /proc/uptime – Contains information about uptime of the system
- /proc/version – Version of the Linux kernel, gcc, name of the Linux flavor installed.
- linux中的proc文件系统详解---英文
- Linux Proc文件系统详解
- linux的根文件系统中的proc文件夹详解
- Linux的Proc文件系统详解
- Linux的Proc文件系统详解
- Linux之Proc文件系统详解
- Linux的proc文件系统详解
- Linux的Proc文件系统详解
- Linux的Proc文件系统详解
- Linux的Proc文件系统详解
- Linux的Proc文件系统详解
- Linux的Proc文件系统详解
- Linux虚拟文件系统vfs及proc详解
- Linux内核中的Proc文件系统(一)
- Linux内核proc文件系统的冰山一角--源自对/proc/net/dev文件中各网卡参数的疑问
- Linux内核proc文件系统的冰山一角--源自对/proc/net/dev文件中各网卡参数的疑问
- Linux内核proc文件系统的冰山一角--源自对/proc/net/dev文件中各网卡参数的疑问
- proc文件系统详解
- 我的常用Linux命令
- 2012下半年自学有感
- ios UIView详解~~~~~
- 电路中“地”之概述
- iBatis与Hibernate比较
- linux中的proc文件系统详解---英文
- lua函数中的self的实现
- 女主播举报遭官员性侵:雷政富事件给我勇气
- ArcGIS For JavaScript API 添加一个 topographic map with graphics(地形图与图形)————(四)
- asp.net 服务器获取真实IP
- PL/SQL每日一题:CASE语句和CASE表达式的区别
- SSH面试题总结
- 慢慢来,一切都来得及
- 如何选择学习linux