1./proc Directory
The Linux kernel provides a mechanism for accessing kernel internal data structures and changing kernel settings at run time through the/proc file system. The proc file system is a pseudo-file system that only exists in memory and does not occupy external memory space. It provides an interface for accessing system kernel data in a file system manner.
Users and applications can get system information through proc, and can change certain parameters of the kernel. Because the information of the system, such as the process, is dynamically changed, so when the user or application reads the proc file, the proc file system dynamically reads the required information from the system kernel and submits it. These files or subfolders listed below are not always present in your system, depending on your kernel configuration and the modules that are loaded. In addition, there are three important directories under/proc: NET,SCSI and Sys. The SYS directory is writable and can be used to access or modify kernel parameters, while net and SCSI depend on the kernel configuration. For example, if the system does not support SCSI, the SCSI directory does not exist.
In addition to the above, there are a number of directories named, they are the process directory. Each process currently running in the system has a corresponding directory under/proc, with the PID number of the process as the directory name, which is the interface to read the process information. The self directory is the information interface of the read process itself and is a link.
2. Sub-Files or subfolders
/proc/buddyinfo how many blocks of each order in each memory area are available, related to memory fragmentation issues
/proc/cmdline parameter information passed to kernel at startup
/proc/cpuinfo CPU Information
/proc/crypto all installed cryptographic passwords and details used by the kernel
/proc/devices devices that have been loaded and sorted
/PROC/DMA List of ISA DMA channels that have been registered for use
/proc/execdomains the Linux kernel currently supports execution domains
/PROC/FB Frame buffer device list, including number and drive to control it
File system types currently supported by the/proc/filesystems kernel
/proc/interrupts number of IRQ interrupts in the x86 architecture
/proc/iomem the current mapping of each physical device in system memory
/proc/ioports the registration port range used by the input and output of a device
/proc/kcore represents the physical memory of the system, stored as the core file format, which shows the number of bytes, equal to the RAM size plus 4KB
/proc/kmsg records the information generated by the kernel, which can be handled by/SBIN/KLOGD or/BIN/DMESG
/PROC/LOADAVG load status based on CPU and IO status over a period of time, related to the uptime command
List of files locked by the/proc/locks kernel
/proc/mdstat multi-drive, RAID configuration information (Md=multiple disks)
/proc/meminfo information about RAM usage
/proc/misc other major equipment (device Number 10) on the registered driver
/proc/modules List of all modules loaded into the kernel
/proc/mounts all mounts used in the system
Memory Type Range Registers (MTRRS) used by the/PROC/MTRR system
Block allocation information in a/proc/partitions partition
List of PCI devices in the/PROC/PCI system
/proc/slabinfo Slab cache information for all activities in the system
/proc/stat All CPU activity information
/proc/sysrq-trigger when using the echo command to write this file, the remote root user can perform most of the system request critical commands as if they were executed on the local terminal. To write this file, the/PROC/SYS/KERNEL/SYSRQ cannot be set to 0. This file is unreadable to root.
How long has the/proc/uptime system been running?
Use of/proc/swaps swap space
/proc/version Linux kernel version and GCC version
/proc/bus system bus information such as PCI/USB, etc.
/proc/driver Driver Information
/PROC/FS File System Information
/proc/ide IDE Device Information
/PROC/IRQ Interrupt Request Device information
/proc/net Network card Device information
/PROC/SCSI SCSI Device Information
/proc/tty TTY Device Information
/proc/net/dev Display of network adapters and statistical information
/proc/vmstat Virtual Memory Statistics
/proc/vmcore memory image when kernel panic
/proc/diskstats Obtaining disk information
/proc/schedstat Kernel Scheduler Statistics
/proc/zoneinfo displays statistics for memory space, which is useful for analyzing virtual memory behavior
The following is the information for process n in the/proc directory
/proc/n PID for process information of N
/proc/n/cmdline Process Start command
/PROC/N/CWD linking to the current working directory of the process
/proc/n/environ Process environment variable list
/proc/n/exe the execution command file linked to the process
/PROC/N/FD contains all the file descriptors associated with the process
/proc/n/maps memory-mapped information related to processes
/proc/n/mem refers to the memory that is held by the process, unreadable
/proc/n/root linking to the root of a process
Status of the/proc/n/stat process
The state of the memory used by the/PROC/N/STATM process
/proc/n/status process state information, more readable than STAT/STATM
/proc/self Link to the currently running process
Linux/proc Directory Description (access to kernel data structures, modify kernel settings)