The/proc file system is a virtual file system in which all files in this directory do not occupy disk space, which are dynamically generated and stored in memory by the Linux kernel after it is started.
[[email protected] ~]# cd /proc[[email protected] proc]# ls1 1189 1369 1402 1909 277 38 71 cmdline interrupts kpageflags net sys10 1198 1382 142 2 278 4 732 cpuinfo iomem loadavg pagetypeinfo sysrq-trigger1032 12 1384 143 20 28 40 8 crypto ioports locks partitions sysvipc1050 1218 1386 144 2075 289 41 9 devices ipmi mdstat sched_debug timer_ list11 1238 1389 15 21 29 5 964 diskstats irq meminfo schedstat timer_stats1105 13 1393 150 22 3 541 990 dma kallsyms misc scsi tty1122 1314 1394 151 23 30 561 acpi driver kcore modules self uptime1147 1323 1395 16 24 31 6 asound execdomains keys Mounts &nbSp; slabinfo version1156 1338 1397 17 25 32 688 buddyinfo fb key-users mpt softirqs vmallocinfo1157 1346 1398 18 26 369 689 bus filesystems kmsg mtd stat vmstat1186 1357 14 19 27 37 7 cgroups fs kpagecount mtrr swaps zoneinfo[[email protected] proc]# echo $$ //viewing the pid1402[[email protected] proc of the current shell ]# cd 1402[[email protected] 1402]# lsattr cmdline environ limits mounts oom_score sched stat wchanautogroup comm exe loginuid mountstats oom_score_adj schedstat Statmauxv coredump_filter fd maps net pagemap sessionid statuscgroup cpuset fdinfo mem ns Personality smaps syscallclear_refs cwd io mountinfo oom_adj root stack task[[email protected] 1402]#
The directory for each process in the/proc/system contains the same project.
CmdLine: The directory contains the entire command line that started the process.
CWD: The symbolic connection points to the current working directory of the process.
Environ: This file contains all the environment variables defined for this process, in the format "variable = value"
EXE: This is a symbolic link to the executable program file that the process executes.
FD: This directory contains all the descriptors opened by the process.
Maps: When the content of the file is large, you will see that part of the process's address space that is currently mapped to the file, from left to right, the address space associated with the map, the permissions associated with that map, the offset of the map starting position, the master of the mapping file device, the sequence (16 binary), the inode ordinal, The file name of the file.
Root: The symbolic connection points to the root directory used by the process.
Status: The file contains a lot of information about the process, it can execute file name, current state, PID and Ppid, actual and valid UID and GID, memory usage load state.
The/PROC also contains various hardware information on the machine.
Cat/proc/devices//View device information in the system, including character devices and block devices Cat/proc/cpuinfo//view CPU Information Cat/proc/filesystems//view system supported file Systems CAT/PROC/IOP Orts//View the I/O port of the system cat/proc/interrupts//View interrupt information cat/proc/modules//View the list of modules loaded in the system core cat/proc/mounts//view mounted file system cat /proc/swaps//view swap partition usage Cat/proc/partitions//view system partition information Cat/proc/version//view the current kernel version
This article is from "Custom" blog, declined reprint!
/proc File System