4.2.1 Virtual Files and Directories Under /proc

The following table lists the most useful virtual files and directories under the /proc directory hierarchy.

Table 4.1 Useful Virtual Files and Directories Under /proc

Virtual File or DirectoryDescription

PID (Directory)

Provides information about the process with the process ID (PID). The directory's owner and group is same as the process's. Useful files under the directory include:

cmdline

Command path.

cwd

Symbolic link to the process's current working directory.

environ

Environment variables.

exe

Symbolic link to the command executable.

fd/N

File descriptors.

maps

Memory maps to executable and library files.

root

Symbolic link to the effective root directory for the process.

stack

The contents of the kernel stack.

status

Run state and memory usage.

buddyinfo

Provides information for diagnosing memory fragmentation.

bus (directory)

Contains information about the various buses (such as pci and usb) that are available on the system. You can use commands such as lspci, lspcmcia, and lsusb to display information for such devices.

cmdline

Lists parameters passed to the kernel at boot time.

cpuinfo

Provides information about the system's CPUs.

crypto

Provides information about all installed cryptographic cyphers.

devices

Lists the names and major device numbers of all currently configured characters and block devices.

dma

Lists the direct memory access (DMA) channels that are currently in use.

driver (directory)

Contains information about drivers used by the kernel, such as those for non-volatile RAM (nvram), the real-time clock (rtc), and memory allocation for sound (snd-page-alloc).
execdomains

Lists the execution domains for binaries that the Oracle Linux kernel supports.

filesystems

Lists the file system types that the kernel supports. Entries marked with nodev are not in use.

fs (directory)

Contains information about the file systems that are mounted, organized by file system type.

interrupts

Records the number of interrupts per interrupt request queue (IRQ) for each CPU since system startup.

iomem

Lists the system memory map for each physical device.

ioports

Lists the range of I/O port addresses that the kernel uses with devices.

irq (directory)

Contains information about each IRQ. You can configure the affinity between each IRQ and the system CPUs.

kcore

Presents the system's physical memory in core file format that you can examine using a debugger such as crash or gdb. This file is not human-readable.

kmsg

Records kernel-generated messages, which are picked up by programs such as dmesg.

loadavg

Displays the system load averages (number of queued processes) for the past 1, 5, and 15 minutes, the number of running processes, the total number of processes, and the PID of the process that is running.

locks

Displays information about the file locks that the kernel is currently holding on behalf of processes. The information provided includes:

  • lock class (FLOCK or POSIX)

  • lock type (ADVISORY or MANDATORY)

  • access type (READ or WRITE)

  • process ID

  • major device, minor device, and inode numbers

  • bounds of the locked region

mdstat

Lists information about multiple-disk RAID devices.

meminfo

Reports the system's usage of memory in more detail than is available using the free or top commands.

modules

Displays information about the modules that are currently loaded into the kernel. The lsmod command formats and displays the same information, excluding the kernel memory offset of a module.

mounts

Lists information about all mounted file systems.

net (directory)

Provides information about networking protocol, parameters, and statistics. Each directory and virtual file describes aspects of the configuration of the system's network.

partitions

Lists the major and minor device numbers, number of blocks, and name of partitions mounted by the system.

scsi/device_info

Provides information about supported SCSI devices.

scsi/scsi and

scsi/sg/*

Provide information about configured SCSI devices, including vendor, model, channel, ID, and LUN data .

self

Symbolic link to the process that is examining /proc.

slabinfo

Provides detailed information about slab memory usage.

softirqs

Displays information about software interrupts (softirqs). A softirq is similar to a hardware interrupt (hardirq) and allow the kernel to perform asynchronous processing that would take too long during a hardware interrupt.

stat

Records information about the system since it was started, including:

cpu

Total CPU time (measured in jiffies) spent in user mode, low-priority user mode, system mode, idle, waiting for I/O, handling hardirq events, and handling softirq events.

cpuN

Times for CPU N.

swaps

Provides information on swap devices. The units of size and usage are kilobytes.

sys (directory)

Provides information about the system and also allows you to enable, disable, or modify kernel features. You can write new settings to any file that has write permission. See Section 4.2.2, “Changing Kernel Parameters”.

The following subdirectory hierarchies of /proc/sys contain virtual files, some of whose values you can usefully alter:

dev

Device parameters.

fs

File system parameters.

kernel

Kernel configuration parameters.

net

Networking parameters.

sysvipc (directory)

Provides information about the usage of System V Interprocess Communication (IPC) resources for messages (msg), semaphores (sem), and shared memory (shm).

tty (directory)

Provides information about the available and currently used terminal devices on the system. The drivers virtual file lists the devices that are currently configured.

vmstat

Provides information about virtual memory usage.


For more information, see the proc(5) manual page.