An Online Reference To Your System Exists In `/proc'

Wanting to know about the hardware, devices and performance of your Linux system? The /proc filesystem provides much of this information in easy to read text files.

Whats in /proc

Process information

70 18:29/home/code> ps -ax | grep vi
  531  p3 S    0:00 vi proc.txt 
71 18:29/home/code> cd /proc/531/
72 18:29/proc/531> l
total 0
-r--r--r--   1 code     code            0 Apr 15 18:29 cmdline
lrwx------   1 code     code           64 Apr 15 18:29 cwd -> [0306]:2272
-r--------   1 code     code            0 Apr 15 18:29 environ
lrwx------   1 code     code           64 Apr 15 18:29 exe -> [0803]:8106
dr-x------   1 code     code            0 Apr 15 18:29 fd/
pr--r--r--   1 code     code            0 Apr 15 18:29 maps|
-rw-------   1 code     code            0 Apr 15 18:29 mem
lrwx------   1 code     code           64 Apr 15 18:29 root -> [0803]:2
-r--r--r--   1 code     code            0 Apr 15 18:29 stat
-r--r--r--   1 code     code            0 Apr 15 18:29 statm
-r--r--r--   1 code     code            0 Apr 15 18:29 status
73 18:30/proc/531> cat cmdline ; echo ""
vi proc.txt
74 18:31/proc/531/cwd> pwd
/home/code/sluugls/1997/apr/presentation
75 18:31/proc/531/cwd> cd -
76 18:31/proc/531> l fd/
total 0
lrwx------   1 code     code           64 Apr 15 18:32 0 -> [0803]:10777
lrwx------   1 code     code           64 Apr 15 18:32 1 -> [0803]:10777
lrwx------   1 code     code           64 Apr 15 18:32 2 -> [0803]:10777
lrwx------   1 code     code           64 Apr 15 18:32 3 -> [0306]:2340
77 18:32/proc/531> ls -ald /dev/hda6
brw-rw----   1 root     disk       3,   6 Dec 29 03:04 /dev/hda6
78 18:32/proc/531> find /home -inum 2340 -print
/home/code/sluugls/1997/apr/presentation/proc.txt.swp

System Information

** /proc/mounts **
rootfs / ext2 rw 0 0
/dev/sda5 /usr ext2 rw 0 0
/dev/sda6 /usr/local ext2 rw 0 0
/dev/sda7 /usr/src ext2 rw 0 0
/dev/sda8 /tmp ext2 rw 0 0
/dev/sda2 /var ext2 rw 0 0
/dev/hda6 /home ext2 rw 0 0
/dev/hdb1 /opt ext2 rw 0 0
none /proc proc rw 0 0

** /proc/locks **
1: POSIX  ADVISORY  WRITE 209 08:02:6073 0 2147483647 037ae598 00000000 03f979d8 00000000 00000000
1: 210 211 212 213 356 355 360
2: FLOCK  ADVISORY  WRITE 0 08:02:6068 0 2147483647 03f979d8 037ae598 03f97958 00000000 00000000
2:
3: FLOCK  ADVISORY  WRITE 0 08:02:6053 0 2147483647 03f97958 03f979d8 03f978d8 00000000 00000000
3:
4: FLOCK  ADVISORY  WRITE 0 08:02:6034 0 2147483647 03f978d8 03f97958 00000000 00000000 00000000
4:

** /proc/cmdline **
BOOT_IMAGE=linux ro root=803

** /proc/ioports **
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0080-009f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : npu
01f0-01f7 : ide0
0220-022f : sound blaster
02f8-02ff : serial(auto)
0300-030f : 3c509
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial(auto)
ec00-ecbe : aic7xxx

** /proc/dma **
 1: Sound Blaster8
 4: cascade
 5: Sound Blaster16

** /proc/filesystems **
	ext2
	minix
nodev	proc

** /proc/interrupts **
 0:   326690   timer
 1:    12186   keyboard
 2:        0   cascade
 4:    30679 + serial
 5:        8   sound blaster
10:     6111 + aic7xxx
12:        0   3c509
13:        1   math error
14:     8666 + ide0

** /proc/devices **
Character devices:
 1 mem
 2 pty
 3 ttyp
 4 ttyp
 5 cua
 7 vcs
14 sound

Block devices:
 3 ide0
 8 sd
 9 md
11 sr

** /proc/stat **
cpu  2778 0 3209 320705
disk 8178 731 0 0
disk_rio 5154 368 0 0
disk_wio 3024 363 0 0
disk_rblk 10308 742 0 0
disk_wblk 6048 726 0 0
page 21835 4920
swap 1 0
intr 384343 326692 12186 0 0 30679 8 0 0 0 0 6111 0 0 1 8666 0
ctxt 203569
btime 861126846
processes 901

** /proc/modules **
sound             21		0 (autoclean)

** /proc/sys/kernel/hostname **
bluenote.local-linux.net

** /proc/sys/kernel/version **
#1 Sat Dec 7 19:07:57 GMT 1996

** /proc/sys/kernel/osrelease **
2.0.18

** /proc/sys/kernel/ostype **
Linux

** /proc/scsi/aic7xxx/0 **
Adaptec AIC7xxx driver version: 3.4/3.2/3.1

Compile Options:
  AIC7XXX_RESET_DELAY    : 15
  AIC7XXX_TWIN_SUPPORT   : Enabled
  AIC7XXX_TAGGED_QUEUEING: Disabled
  AIC7XXX_PAGE_ENABLE    : Disabled
  AIC7XXX_PROC_STATS     : Disabled

Adapter Configuration:
          SCSI Adapter: AHA-2940
                        (AIC-787x chipset)
              Host Bus: Single
               Base IO: 0xec00
                   IRQ: 10
                  SCBs: Used 2, HW 16, Page 16
            Interrupts: 6111
         Serial EEPROM: True
  Extended Translation: Enabled
        SCSI Bus Reset: Enabled
            Ultra SCSI: Disabled
     Target Disconnect: Enabled

** /proc/scsi/scsi **
Attached devices: 
Host: scsi0 Channel: 00 Id: 03 Lun: 00
  Vendor: SEAGATE  Model: ST32430N         Rev: 0510
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: SONY     Model: CD-ROM CDU-76S   Rev: 1.1c
  Type:   CD-ROM                           ANSI SCSI revision: 02

** /proc/net/dev **
Inter-|   Receive                  |  Transmit
 face |packets errs drop fifo frame|packets errs drop fifo colls carrier
    lo:    355    0    0    0    0      355    0    0    0     0    0
  eth0:      0    0    0    0    0       56    0    0    0     0    0

** /proc/net/sockstat **
sockets: used 89
SOCK_ARRAY_SIZE=256
TCP: inuse 35 highest 53
UDP: inuse 11 highest 12
RAW: inuse 1 highest 1
PAC: inuse 0 highest 0

** /proc/cpuinfo **
processor	: 0
cpu		: 686
model		: Pentium Pro
vendor_id	: GenuineIntel
stepping	: 2
fdiv_bug	: no
hlt_bug		: no
fpu		: yes
fpu_exception	: yes
cpuid		: yes
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic 11 mtrr pge mca cmov
bogomips	: 149.50

** /proc/pci **
PCI devices found:
  Bus  0, device  19, function  0:
    VGA compatible controller: Matrox Millenium (rev 1).
      Medium devsel.  Fast back-to-back capable.  IRQ 11.  
      Non-prefetchable 32 bit memory at 0xffafc000.
      Prefetchable 32 bit memory at 0xfe000000.
  Bus  0, device  18, function  0:
    SCSI storage controller: Adaptec AIC-7871 (rev 3).
      Medium devsel.  Fast back-to-back capable.  IRQ 10.  Master Capable.  Latency=64.  Min Gnt=8.Max Lat=8.
      I/O at 0xec00.
      Non-prefetchable 32 bit memory at 0xffafb000.
  Bus  0, device   7, function  1:
    IDE interface: Intel 82371SB Natoma/Triton II PIIX (rev 0).
      Medium devsel.  Fast back-to-back capable.  Master Capable.  Latency=32.  
      I/O at 0xffa0.
  Bus  0, device   7, function  0:
    ISA bridge: Intel 82371SB Natoma/Triton II PIIX (rev 1).
      Medium devsel.  Fast back-to-back capable.  Master Capable.  No bursts.  
  Bus  0, device   0, function  0:
    Host bridge: Intel 82441FX Natoma (rev 2).
      Medium devsel.  Fast back-to-back capable.  Master Capable.  Latency=32.  

** /proc/version **
Linux version 2.0.18 (root@bluenote.local-linux.net) (gcc version 2.7.2) #1 Sat Dec 7 19:07:57 GMT 1996

** /proc/meminfo **
        total:    used:    free:  shared: buffers:  cached:
Mem:  64950272 45236224 19714048 37285888  3833856 20434944
Swap: 45412352        0 45412352
MemTotal:     63428 kB
MemFree:      19252 kB
MemShared:    36412 kB
Buffers:       3744 kB
Cached:       19956 kB
SwapTotal:    44348 kB
SwapFree:     44348 kB

** /proc/uptime **
3267.50 3207.05

** /proc/loadavg **
0.00 0.00 0.00 2/54 951

This information was generated using the following script. Some information was removed for presentation purposes. Print this report and store with other important system documentation.

#!/bin/sh
for i in `find /proc -print`
do
  if [ -f $i ] ; then
    echo "** $i **"
    cat $i
    echo ""
  fi
done

Monitoring /proc Data

April 1997 Linux Journal The /proc File System And ProcMeter

procmeter v2.2 screen capture


Last Modified: 15 April 1997

St. Louis Unix Users Group - Linux SIG