The procfs filesystem is mounted under the /proc
directory and contains live data about what is running
on the computer. Even everything is stored as text, do not open the files with an editor. The editor
might crash since it gets never ending data. Use cat instead. e.g. cat /proc/cpuinfo shows you how much
bogomips your computer has.
The device specific information is successively moved away from the proc directory into the /sys directory. As example the /proc/bus/usb
is now found under /sys/bus/usb
and the devices file is for backward compatibility reasons added under /sys/kernel/debug/usb/devices
. For details see the kernel documentation usb/proc_usb_info.txt
Many system programs do nothing else than reading the data out of/proc
.
man proc and read the details. Some Examples:
cat /proc/partitions
Shows the drives attached
cat /proc/cmdline
Shows how the kernel got booted
The number directories in/proc
are equal to the PID's
(process ID's).
cat /proc/1/status
Shows the status about PID 1 (known as init the first program started)
cat /proc/loadavg
returns 5 values:
3 average system load values over the last 1,5 and 15 minutes
number of running processes plus sum of all processes
last active PID
cat /proc/uptime
returns 2 values:
time in seconds since system start
idle time in seconds since system start
cat /proc/meminfo
returns everything about the memory
cat /proc/kmsg
returns last kernel messages
cat /proc/version
returns version of Linux and gcc used
cat /proc/cpuinfo
returns everything about your cpu
cat /proc/devices
returns the running devices
cat /proc/interrupts
returns configured interrupts. The number shows how many interrupts already occurred. Additionally device driver handling the interrupt can be seen.
cat /proc/filesystems
The supported file systems nodev indicated that this file system does not require a device.
cat /proc/dma
The supported DMA channels
cat /proc/ioports
The io ports of your computer
cat /proc/cmdline
The command line used to start the kernel.