Installation guide
Chapter 2. The proc File System 37
2.2.28. /proc/swaps
This file measures swap space and its utilization. For a system with only one swap partition, the output
of /proc/swap may look similar to this:
Filename Type Size Used Priority
/dev/hda6 partition 136512 20024 -1
While some of this information can be found in other files in the /proc/ directory, /proc/swap
provides a snapshot of every swap filename, type of swap space, the total size, and the amount of this
space that is in use (in kilobytes). The priority column is useful when multiple swap files are in use.
The lower the priority, the more likely the swap file is to be used.
2.2.29. /proc/uptime
This file contains information about how long the system has on since its last restart. The output of
/proc/uptime is quite minimal:
350735.47 234388.90
The first number tells you the total number of seconds the system has been up. The second number
tells you how much of that time the machine has spent idle in seconds.
2.2.30. /proc/version
This files tells you the versions of the Linux kernel and gcc, as well as the version of Red Hat Linux
installed on the system:
Linux version 2.4.18-0.40 (user@foo.redhat.com)(gcc version 2.96 20000731
(Red Hat Linux 7.2 2.96-102)) #1 Tue May 28 04:28:05 EDT 2002
This information is used for a variety of purposes, including the version data presented when a user
logs in.
2.3. Directories in /proc/
Common groups of information concerning the kernel are grouped into directories and subdirectories
within the /proc/ directory.
2.3.1. Process Directories
Every /proc/ directory contains a number of directories numerical names. A listing of them may
start off like this:
dr-xr-xr-x 3 root root 0 Feb 13 01:28 1
dr-xr-xr-x 3 root root 0 Feb 13 01:28 1010
dr-xr-xr-x 3 xfs xfs 0 Feb 13 01:28 1087
dr-xr-xr-x 3 daemon daemon 0 Feb 13 01:28 1123
dr-xr-xr-x 3 root root 0 Feb 13 01:28 11307
dr-xr-xr-x 3 apache apache 0 Feb 13 01:28 13660
dr-xr-xr-x 3 rpc rpc 0 Feb 13 01:28 637
dr-xr-xr-x 3 rpcuser rpcuser 0 Feb 13 01:28 666