|Red Hat Linux 7.2: The Official Red Hat Linux Reference Guide|
|Prev||Chapter 4. The /proc Filesystem||Next|
Most of the files at the top-level of the /proc directory hold key pieces of information about the state of the Linux kernel and your system in general.
It is important to remember that the content of the files in the /proc directory and its various sub-directories is entirely dependent on information concerning your system. In other words, do not expect to see the exact same information in the same /proc file on two different machines. In addition, depending on the version of the Linux kernel and the devices connected to your system, some of the files described here may not be found in your /proc directory. Likewise, additional files or directories may be on your system but are not described here.
Rather than attempting to be a comprehensive collection of these files and the information they contain, the following list is designed to showcase some of the more common and useful ones. The objective is to provide system administrators with a place to find current data on their systems when other tools will not do the job.
This file provides information about the Advanced Power Management (APM) state and options on the system. This information is used by the kernel to provide information for the apm command.
The output of this file on a system without a battery and constantly connected to an AC power source looks similar to this:
1.14 1.2 0x03 0x01 0xff 0x80 -1% -1 ?
Executing an apm command on these systems results in something similar to this:
[root@bleach /proc]# apm -v APM BIOS 1.2 (kernel driver 1.14) AC on-line, no system battery [root@bleach /proc]#
For these systems, apm may be able to do little more than put the machine in a standby mode, commonly known as "putting the system to sleep." Note that this state is only possible if your system BIOS supports it. Trying to put a system in standby mode that is not designed for it can make the system unstable.
The apm command is much more useful on laptops and other portable Linux systems. This is also reflected in their /proc/apm files. This is the output from a sample file on a laptop running Linux while plugged into a power outlet:
1.14 1.2 0x03 0x01 0x03 0x09 100% -1 ?
When the same machine is unplugged from its power source and running on its own batteries for a few minutes, you will see the contents of the apm file change:
1.14 1.2 0x03 0x00 0x00 0x01 99% 1792 min
In this state, the apm command yields readable information from this data:
[ed@blink /]$ apm -v APM BIOS 1.2 (kernel driver 1.14) AC off-line, battery status high: 99% (1 day, 5:52) [ed@blink /]$
This demonstrates the connection between data located in raw /proc files and the utilities designed to use that information for specific purposes.
This file essentially shows the parameters passed to the Linux kernel at the time it is started. A sample /proc/cmdline file looks similar to this:
auto BOOT_IMAGE=linux ro root=305 BOOT_FILE=/boot/vmlinuz-2.4.2-2
The important data contained in the file breaks down in the following way:
BOOT_IMAGE=linux, which tells you the name of the image used to boot the machine.
ro, which signifies that the kernel is loaded read-only.
BOOT_FILE=/boot/vmlinuz-2.4.2-2 notes the actual Linux kernel file used to boot the system.
This file changes based on the type of processor in your system. The output is fairly easy to understand. A sample file looks like this:
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 6 model name : Celeron (Mendocino) stepping : 0 cpu MHz : 334.099 cache size : 128 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov bogomips : 666.82
Quite a bit of information is available here. Among the highlights:
processor — Provides each processor with an identifying number. If you only have one processor, you will only see a 0. However, if you are using a machine with multiple processors, each of the processors will have it own number, increasing by one as you go down the list, and its own collection of information.
cpu family — Authoritatively tells you the type of processor you have in the system. Simply place the number in front of "86" to calculate the value. This is particularly helpful if you are wondering about the architecture of an older system (686, 586, 486, or 386). As RPM packages are occasionally compiled for particular architectures, this value tells you which package to install on the system.
model name — Gives you the popular name of the processor, including its project name.
cpu MHz — Shows the precise speed in megahertz of that particular processor (in thousandths).
cache size — Tells you the amount of level 2 memory cache available to the processor.
flags — Defines a number of different qualities about the processor, such as the presence of a floating point unit (FPU) and the ability to process MMX instructions.
This file displays the various character and block devices currently configured for use with the kernel. It does not include modules that are available but not loaded into the kernel. Sample output from this file looks similar to this:
Character devices: 1 mem 2 pty 3 ttyp 4 ttyS 5 cua 7 vcs 10 misc 29 fb 36 netlink 128 ptm 136 pts 162 raw 180 usb Block devices: 1 ramdisk 2 fd 3 ide0 9 md 22 ide1
The output from /proc/devices includes the major number and name of the device.
Character devices are similar to block devices, except for two basic differences.
First, block devices have a buffer available for requests sent to them, allowing them to order the requests before dealing with them. This comes in very handy with devices designed to store information, such as hard drives, because the ability to order the information before writing it to the device allows it to be placed in more efficient order. Character devices do not require this kind of buffering.
Second, block devices can send and receive information in blocks of a particular size, which can be configured to meet the requirements of the particular device. Character devices send data in as many or few bytes as they see fit, with no preconfigured size.
To discover if a particular device is a block or character device, type the ls -l <device-name> command. If the first character in the response is a b, then it is a block device; if it is a c, then it is character device. For example, note the output from a look at some common devices (hda is the first IDE hard drive and tty0 is the first terminal port) from the /dev directory:
[root@bleach /]# ls -l /dev/hda /dev/tty0 brw-rw---- 1 root disk 3, 0 Mar 23 23:37 /dev/hda crw--w---- 1 truk truk 4, 0 May 3 16:28 /dev/tty0 [root@bleach /]#
More information about devices can be found in /usr/src/linux-2.4/Documentation/devices.txt.
This file contains a list of the registered ISA direct memory access (DMA) channels in use. A sample /proc/dma files looks like this:
This file lists the execution domains currently supported by the Linux kernel, along with the range of personalities they support.
0-255 Linux [kernel]
Think of execution domains as a kind of "personality" of a particular operating system. Other binary formats, such as Solaris, UnixWare, and FreeBSD, can be used with Linux. By changing the personality of a task running in Linux, a programmer can change the way the operating system treats particular system calls from a certain binary. Except for the PER_LINUX execution domain, they can be implemented as dynamically loadable modules.
This file contains a list of frame buffer devices, with the frame buffer device number and the driver that controls it. Typical output of /proc/fb for systems that contain frame buffer devices looks similar to this:
0 VESA VGA
This file displays a list of the filesystem types currently supported by the kernel. Sample output from a generic kernel's /proc/filesystems file looks similar to this:
nodev sockfs nodev tmpfs nodev shm nodev pipefs nodev proc ext2 iso9660 nodev devpts nodev usbdevfs nodev autofs
The first column signifies whether the filesystem is mounted on a block device, with those containing nodev in this column signifying that they are not mounted on a block device. The second column lists the name of the filesystems supported.
This information is used by the mount command to cycle through the possible filesystems when one is not specified as an argument.
This file records the number of interrupts per IRQ on the x86 architecture. A standard /proc/interrupts looks similar to this:
CPU0 0: 8399367 XT-PIC timer 1: 339 XT-PIC keyboard 2: 0 XT-PIC cascade 5: 80111 XT-PIC usb-uhci, eth0 8: 1 XT-PIC rtc 12: 6107 XT-PIC PS/2 Mouse 14: 60324 XT-PIC ide0 15: 541741 XT-PIC ide1 NMI: 0 ERR: 0
For a multi-processor machine, this file may look slightly different:
CPU0 CPU1 0: 1366814704 0 XT-PIC timer 1: 128 340 IO-APIC-edge keyboard 2: 0 0 XT-PIC cascade 8: 0 1 IO-APIC-edge rtc 12: 5323 5793 IO-APIC-edge PS/2 Mouse 13: 1 0 XT-PIC fpu 16: 11184294 15940594 IO-APIC-level Intel EtherExpress Pro 10/100 Ethernet 20: 8450043 11120093 IO-APIC-level megaraid 30: 10432 10722 IO-APIC-level aic7xxx 31: 23 22 IO-APIC-level aic7xxx NMI: 0 ERR: 0
The first column refers to the IRQ number. Each CPU in the system has its own column and its own number of interrupts per IRQ. The next column tells you the type of interrupt, and the last column contains the name of the device that is located at that IRQ.
Each of the types of interrupts seen in this file, which are architecture-specific, mean something a little different. For x86 machines, the following values are common:
XT-PIC — The old AT computer interrupts that have been around for a long time.
IO-APIC-edge — The voltage signal on this interrupt transitions from low to high, creating an edge, where the interrupt occurs and is only signaled once. This kind of interrupt, as well as the IO-APIC-level interrupt, are only seen on systems with processors from the 586 family and higher.
IO-APIC-level — Generates interrupts when its voltage signal goes high until the signal goes low again.
This file shows you the current map of the system's memory for its various devices:
00000000-0009fbff : System RAM 0009fc00-0009ffff : reserved 000a0000-000bffff : Video RAM area 000c0000-000c7fff : Video ROM 000f0000-000fffff : System ROM 00100000-03ffcfff : System RAM 00100000-002557df : Kernel code 002557e0-0026c80b : Kernel data 03ffd000-03ffefff : ACPI Tables 03fff000-03ffffff : ACPI Non-volatile Storage dc000000-dfffffff : S3 Inc. ViRGE/DX or /GX e3000000-e30000ff : Lite-On Communications Inc LNE100TX e3000000-e30000ff : eth0 e4000000-e7ffffff : Intel Corporation 440BX/ZX - 82443BX/ZX Host bridge ffff0000-ffffffff : reserved
The first column displays the memory registers used by each of the different types of memory. The second column tells the kind of memory located within those registers. In particular, this column will even tell you which memory registers are used by the kernel within the system RAM or, if you have multiple Ethernet ports on your NIC, the memory registers assigned for each port.
In a way similar to /proc/iomem, /proc/ioports provides a list of currently registered port regions used for input or output communication with a device. This file can be quite long, with a beginning similar to this:
0000-001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0070-007f : rtc 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 01f0-01f7 : ide0
The first column gives the actual IO port address range reserved for the device listed in the second column.
This file lists Plug and Play (PnP) cards in ISA slots on the system. This is most often seen with sound cards but may include any number of devices. A /proc/isapnp file with Soundblaster entry in it looks similar to this:
Card 1 'CTL0070:Creative ViBRA16C PnP' PnP version 1.0 Product version 1.0 Logical device 0 'CTL0001:Audio' Device is not active Active port 0x220,0x330,0x388 Active IRQ 5 [0x2] Active DMA 1,5 Resources 0 Priority preferred Port 0x220-0x220, align 0x0, size 0x10, 16-bit address decoding Port 0x330-0x330, align 0x0, size 0x2, 16-bit address decoding Port 0x388-0x3f8, align 0x0, size 0x4, 16-bit address decoding IRQ 5 High-Edge DMA 1 8-bit byte-count compatible DMA 5 16-bit word-count compatible Alternate resources 0:1 Priority acceptable Port 0x220-0x280, align 0x1f, size 0x10, 16-bit address decoding Port 0x300-0x330, align 0x2f, size 0x2, 16-bit address decoding Port 0x388-0x3f8, align 0x0, size 0x4, 16-bit address decoding IRQ 5,7,2/9,10 High-Edge DMA 1,3 8-bit byte-count compatible DMA 5,7 16-bit word-count compatible
This file can be quite long, depending on the number of devices displayed here and their requirements or requests for resources.
Each card lists its name, PnP version number, and product version number. If the device is active and configured, this file will also reveal the port and IRQ numbers for the device. In addition, to ensure better compatibility, the card will specify preferred and acceptable values for a number of different parameters. The goal here is to allow the PnP cards to work around one another and avoid IRQ and port conflicts.
This file represents the physical memory of the system and is stored in the core file format. Unlike most /proc files, kcore does display a size. This value is given in bytes and is equal to the size of physical memory (RAM) used plus 4KB.
Do not try to cat or otherwise attempt to view this file. Its contents are designed to be examined by a debugger, such as gdb, the GNU Debugger.
Only the root user has the rights to view this file.
This file is used to hold messages generated by the kernel. These messages are then picked up by other programs, such as klogd.
This file holds the kernel exported symbol definitions used by the modules tools to dynamically link and bind loadable modules.
e003def4 speedo_debug [eepro100] e003b04c eepro100_init [eepro100] e00390c0 st_template [st] e002104c RDINDOOR [megaraid] e00210a4 callDone [megaraid] e00226cc megaraid_detect [megaraid]
The second column refers to the name of a kernel function, and the first column lists the memory address of that function in the kernel. The last column reveals the name of the module loaded to provide that function.
This file provides a look at load average, or the utilization of the processor, over time, as well as giving additional data used by uptime and other commands. A sample loadavg file looks similar to this:
0.20 0.18 0.12 1/80 11206
The first three columns measure CPU utilization of the last 1, 5, and 10 minute periods. The fourth column shows the number of currently running processes and the total number of processes. The last column displays the last process ID used.
This files displays the files currently locked by the kernel. The content of this file contains kernel internal debugging data and can vary greatly, depending on the use of the system. A sample locks file of a very lightly loaded system looks similar to this:
1: FLOCK ADVISORY WRITE 807 03:05:308731 0 EOF c2a260c0 c025aa48 c2a26120 2: POSIX ADVISORY WRITE 708 03:05:308720 0 EOF c2a2611c c2a260c4 c025aa48
Each lock is assigned a unique number at the beginning of each line. The second column refers to the class of lock used, with FLOCK signifying the older-style UNIX file locks from a flock system call and POSIX representing the newer POSIX locks from the lockf system call.
The third column can have two values. ADVISORY means that the lock does not prevent other people from accessing the data; it only prevents other attempts to lock it. MANDATORY means that no other access to the data is permitted while the lock is held. The fourth column reveals whether the lock is allowing the holder READ or WRITE access to the file, and the fifth column shows the ID of the process holding the lock.
The sixth column shows the ID of the file being locked, in the format of MAJOR-DEVICE:MINOR-DEVICE:INODE-NUMBER. The seventh column shows the start and end of the file's locked region. The remaining columns point to internal kernel data structures used for specialized debugging and can be ignored.
This file contains the current information for multiple-disk, RAID configurations. If your system does not contain such a configuration, then your mdstat file will look similar to this:
Personalities : read_ahead not set unused devices: <none>
Things really do not get interesting unless you have md devices created and in use. In that case, you can use mdstat to give you a picture of what is currently happening with your mdX devices.
This /proc/mdstat file shows a system with its md0 configured as a RAID 1 device. It is currently re-syncing the disks, and the percentage completed and estimated time remaining can be seen:
Personalities : [linear] [raid1] read_ahead 1024 sectors md0: active raid1 sda2 sdb2 1943840 blocks [2/2] [UU] resync=1% finish=12.3min algorithm 2 [3/3] [UUU] unused devices: <none>
This is one of the more commonly used /proc files, as it reports back plenty of valuable information about the current utilization of RAM on the system. A system with 256MB of RAM and 384MB of swap space might have a /proc/meminfo file similar to this one:
total: used: free: shared: buffers: cached: Mem: 261709824 253407232 8302592 0 120745984 48689152 Swap: 402997248 8192 402989056 MemTotal: 255576 kB MemFree: 8108 kB MemShared: 0 kB Buffers: 117916 kB Cached: 47548 kB Active: 135300 kB Inact_dirty: 29276 kB Inact_clean: 888 kB Inact_target: 0 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 255576 kB LowFree: 8108 kB SwapTotal: 393552 kB SwapFree: 393544 kB
Much of the information here is used by the top command. In fact, the output of the free command is even similar in appearance to the contents and structure of meminfo. By looking directly at meminfo, more memory details are revealed:
Mem — Displays the current state of physical RAM in the system, including a full breakdown of total, used, free, shared, buffered, and cached memory utilization in bytes.
Swap — Displays the total, used, and free amounts of swap space, in bytes.
MemTotal — Total amount of physical RAM, in kilobytes.
MemFree — The amount of physical RAM, in kilobytes, left unused by the system.
MemShared — Unused with 2.4 and higher kernels but left in for compatibility with earlier kernel versions.
Buffers — The amount of physical RAM, in kilobytes, used for file buffers.
Cached — The amount of physical RAM, in kilobytes, used as cache memory.
Active — The total amount of buffer or page cache memory, in kilobytes, that is in active use.
Inact_dirty — The total amount of buffer or cache pages, in kilobytes, that might be freeable.
Inact_clean — The total amount of buffer or cache pages in kilobytes that are definitely free and available.
Inact_target — The net amount of allocations per second, in kilobytes, averaged over one minute.
HighTotal and HighFree — The total and free amount of memory, respectively, that is not directly mapped into kernel space. The HighTotal value can vary based on the type of kernel used.
LowTotal and LowFree — The total and free amount of memory, respectively, that is directly mapped into kernel space. The LowTotal value can vary based on the type of kernel used.
SwapTotal — The total amount of swap available, in kilobytes.
SwapFree — The total amount of swap free, in kilobytes.
This file lists miscellaneous drivers registered on the miscellaneous major device, which is number 10:
135 rtc 1 psaux 134 apm_bios
The first column is the minor number of each device, and the second column shows the driver in use.
This file displays a list of all modules that have been loaded by the system. Its contents will vary based on the configuration and use of your system, but it should be organized in a similar manner to this sample /proc/modules file output:
tulip 38544 1 (autoclean) ide-cd 26848 0 (autoclean) cdrom 27232 0 (autoclean) [ide-cd] autofs 11264 1 (autoclean) ipchains 38976 0 (unused) usb-uhci 20720 0 (unused) usbcore 49664 1 [usb-uhci]
The first column contains the name of the module. The second column refers to the memory size of the module, in bytes. The third column tells you whether the module is currently loaded (1) or unloaded (0). The final column states if the module can unload itself automatically after a period without use (autoclean) or if it is not being utilized (unused). Any module with a line containing a name listed in brackets ([ or ]) tells you that this module depends upon another module to be present in order to function.
This file provides a quick list of all mounts in use by the system:
/dev/root / ext2 rw 0 0 /proc /proc proc rw 0 0 usbdevfs /proc/bus/usb usbdevfs rw 0 0 /dev/hda1 /boot ext2 rw 0 0 /dev/hda7 /home ext2 rw 0 0 none /dev/pts devpts rw 0 0 automount(pid696) /misc autofs rw 0 0
The output found here is similar to contents of /etc/mtab, except that /proc/mount can be more current.
The first column specifies the device that is mounted, with the second column revealing the mountpoint. The third column tells the filesystem type, and the fourth column tells you if it is mounted read-only (ro) or read-write (rw). The fifth and sixth columns are dummy values designed to match the format used in /etc/mtab.
This file refers to the current Memory Type Range Registers (MTRRs) in use with the system. If your system's architecture supports MTRRs, your mtrr might look something like this:
reg00: base=0x00000000 ( 0MB), size= 64MB: write-back, count=1
MTRRs are used with Intel P6 family of processors (Pentium Pro and higher), and they are used to control processor access to memory ranges. When using a video card on a PCI or AGP bus, a properly configured mtrr file can increase performance over 150%.
Most of the time, this value is properly configured for you. For more information on MTRRs and manually configuring this file, please see http://web1.linuxhq.com/kernel/v2.3/doc/mtrr.txt.html.
For very detailed information on the various partitions currently available to the system,
major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq 3 0 6297480 hda 103927 109145 1549044 1461980 66873 30417 780568 6041420 0 1689360 7506660 3 1 56196 hda1 299 1995 4588 1300 17 9 52 5450 0 5210 6750 3 2 1 hda2 0 0 0 0 0 0 0 0 0 0 0 3 5 4610623 hda5 95638 62150 1262322 1304320 63580 16715 644512 5399710 0 1614680 6704110 3 6 136521 hda6 6808 22109 231336 148110 2384 13484 127608 485020 0 108750 636310 3 7 1494013 hda7 1182 22891 50798 8250 892 209 8396 151240 0 86990 159490
Most of the information here is of little importance to most users, except for the following lines:
major — The major number of the device with this partition. The major number in our example (3) corresponds with the ide0 device in /proc/devices, letting us know the kind of device driver used to interact with that partition.
minor — The minor number of the device with this partition. This serves to separate the partitions into different physical devices and relates to the number at the end of the name of the partition.
#blocks — Lists the number of physical disk blocks contained in a particular partition.
name — The name of the partition.
This file contains a full listing of every PCI device on your system. Depending on the number of PCI devices you have, /proc/pci can get rather long. An example from this file on a basic system looks similar to this:
Bus 0, device 0, function 0: Host bridge: Intel Corporation 440BX/ZX - 82443BX/ZX Host bridge (rev 3). Master Capable. Latency=64. Prefetchable 32 bit memory at 0xe4000000 [0xe7ffffff]. Bus 0, device 1, function 0: PCI bridge: Intel Corporation 440BX/ZX - 82443BX/ZX AGP bridge (rev 3). Master Capable. Latency=64. Min Gnt=128. Bus 0, device 4, function 0: ISA bridge: Intel Corporation 82371AB PIIX4 ISA (rev 2). Bus 0, device 4, function 1: IDE interface: Intel Corporation 82371AB PIIX4 IDE (rev 1). Master Capable. Latency=32. I/O at 0xd800 [0xd80f]. Bus 0, device 4, function 2: USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 1). IRQ 5. Master Capable. Latency=32. I/O at 0xd400 [0xd41f]. Bus 0, device 4, function 3: Bridge: Intel Corporation 82371AB PIIX4 ACPI (rev 2). IRQ 9. Bus 0, device 9, function 0: Ethernet controller: Lite-On Communications Inc LNE100TX (rev 33). IRQ 5. Master Capable. Latency=32. I/O at 0xd000 [0xd0ff]. Non-prefetchable 32 bit memory at 0xe3000000 [0xe30000ff]. Bus 0, device 12, function 0: VGA compatible controller: S3 Inc. ViRGE/DX or /GX (rev 1). IRQ 11. Master Capable. Latency=32. Min Gnt=4.Max Lat=255. Non-prefetchable 32 bit memory at 0xdc000000 [0xdfffffff].
This output shows a list of all PCI devices, sorted in the order of bus, device, and function. Beyond providing the name and version of the device, which is always nice to know when you forget the brand of your network interface card, this list also gives you detailed IRQ information so you can quickly look for conflicts.
This file gives information about memory usage on the slab level. Linux kernels greater than 2.2 use slab pools to manage memory above the page level. Commonly used objects have their own slab pools.
The /proc/slabinfo file can be rather long, but it starts off similar to this:
slabinfo - version: 1.1 kmem_cache 59 78 100 2 2 1 ip_fib_hash 10 113 32 1 1 1 ip_conntrack 0 0 352 0 0 1 urb_priv 0 0 32 0 0 1 uhci_desc 1038 1062 64 18 18 1 clip_arp_cache 0 0 128 0 0 1 ip_mrt_cache 0 0 96 0 0 1 tcp_tw_bucket 0 0 128 0 0 1 tcp_bind_bucket 6 113 32 1 1 1 tcp_open_request 0 0 96 0 0 1 inet_peer_cache 0 0 64 0 0 1 ip_dst_cache 26 40 192 2 2 1
The values in this file occur in the following order: cache name, number of active objects, number of total objects, size of the object, number of active slabs (blocks) of the objects, total number of slabs of the objects, and the number of pages per slab.
It should be noted that active in this case means to be in use. An active object is one that is in use, and an active slab is one that contains any used objects.
This file keeps track of a variety of different statistics about the system since it was last restarted. The contents of /proc/stat, which can be quite long, begins something like this:
cpu 7361636 3040186 1150480 23431255 cpu0 7361636 3040186 1150480 23431255 page 213089 98198 swap 28914 15951 intr 37566857 34983557 1313 0 4 4 128683 <CONTENT-SNIPPED> disk_io: (3,0):(171639,103942,1549132,67697,784888) ctxt 323724291 btime 988921599 processes 14882 kstat.input_fastpath: 0 kstat.input_slowpath: 0 kstat.inputqueue_got_packet: 0 kstat.inputqueue_no_packet: 0
Some of the more popular statistics include:
cpu — Measures the number of jiffies (1/100ths of a second) that the system has been in user mode, user mode with low priority (nice), system mode, and the idle task, respectively. The total for all CPUs is given at the top, and each individual CPU is listed below with its own statistics.
page — The number of pages the system has paged in and out from disk.
swap — The number of swap pages the system has brought in and out.
intr — The number of interrupts the system has experienced.
btime — The boot time, measured in the number of seconds since January 1, 1970, otherwise known as the epoch.
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 /proc files, swap provides for a very quick snapshot of every swap filename, type of swap space, and total and used sizes (in kilobytes). The priority column is useful when multiple swap files are in use, and some of them are preferred over others, such as if they are on faster hard disks. The lower the priority, the more likely the swap file will be used.
This file contains information about how long the system has on since its last restart. The output of /proc/uptime is quite minimal:
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, also in seconds, the machine has spent idle.
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.2-2 (firstname.lastname@example.org) (gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-79)) #1 Sun Apr 8 20:41:30 EDT 2001
This information is used for a variety of purposes, including providing the version data at the standard login prompt.