/proc directory stores lots of system status and hardware information. The proc (mounted at /proc) filesystem is a pseudo-filesystem which is used as an interface to kernel data structures. For example, your CPU related information such as number of CPUs, type of CPU (AMD or Intel) etc can be gathered from /proc/cpuinfo.
However, the output is not always easily readable (especially if you are Linux sys admin). You need to use a command called procinfo which gathers some system data from the /proc directory and prints it nicely formatted on the screen.
It is capable of displaying following Linux status information:
- Memory
- Bootup (the time the system was booted)
- Load average
- User (the amount of time spent running jobs in user space)
- Nice (the amount of time spent running niced jobs in user space)
- System (the amount of time spent running in kernel space)
- Idle (the amount of time spent doing nothing)
- Uptime (the time that the system has been up).
- Page in (the number of disk block paged into core from disk)
- Page out (the reverse of the above (What does that mean, anyways?) )
- Swap in (the number of memory pages paged in from swapspace)
- Swap out (the number of memory pages paged out to swapspace)
- context (the total number of context switches since bootup)
- disk 1-4 (the number of times your hard disks have been accessed)
- Interrupts
- Modules (the modules (loadable device drivers) installed on your machine) Character and Block Devices
- File Systems
Examples
$ procinfo
Output:
$ procinfo
Output:
Linux 2.6.5-7.252-bigsmp (geeko@buildhost) (gcc 3.3.3 ) #1 SMP Tue Feb 14 11:11:04 UTC 2006 4CPU [ora10g-host1.xxxx.in]
Memory: Total Used Free Shared Buffers
Mem: 4091932 2327480 1764452 0 209444
Swap: 4194784 4 4194780
Bootup: Fri Mar 10 15:26:44 2006 Load average: 2.00 2.00 2.00 3/108 20202
user : 17:25:52.25 4.5% page in : 0
nice : 3d 7:22:29.54 20.5% page out: 0
system: 0:17:45.90 0.0% swap in : 0
idle : 12d 0:33:54.22 74.7% swap out: 0
uptime: 40d 5:46:29.70 context :621430542
irq 0:3477339909 timer irq 10: 0 ohci_hcd
irq 1: 3237 i8042 irq 12: 9578 i8042
irq 2: 0 cascade [4] irq 14: 6678197 ide0
irq 4: 4 irq 15: 25978305 ide1
irq 8: 2 rtc irq 16: 44294194 eth0
irq 9: 0 acpi
You can find out detailed information with -a flag:
$ procinfo -a
Output:
Linux 2.6.5-7.252-default (geeko@buildhost) (gcc 3.3.3 ) #1 2CPU [suse9ent.nixcraft.com]
Memory: Total Used Free Shared Buffers
Mem: 4125168 4112656 12512 0 276512
Swap: 4200688 32 4200656
Bootup: Mon Apr 10 13:46:48 2006 Load average: 0.76 0.70 0.32 1/105 6641
user : 0:59:24.49 2.2% page in : 0
nice : 0:11:08.41 0.4% page out: 0
system: 0:06:51.10 0.2% swap in : 0
idle : 18d 15:46:46.95 1020.6% swap out: 0
uptime: 9d 8:37:33.35 context : 84375734
irq 0: 0 0 irq 54: 396314 ioc0
irq 28: 1800 cpe_poll irq 55: 30 ioc1
irq 29: 0 cmc_poll irq 56: 1842085 eth1
irq 31: 0 cmc_hndlr irq 57: 18
irq 48: 0 acpi irq232: 0 mca_rdzv
irq 49: 0 ohci_hcd irq238: 0 perfmon
irq 50: 1892 ohci_hcd irq239:1656130975 timer
irq 51: 0 ehci_hcd irq240: 0 mca_wkup
irq 52: 5939450 ide0 irq254: 792697 IPI
irq 53: 404118 eth0
Kernel Command Line:
BOOT_IMAGE=scsi0:\efi\SuSE\vmlinuz root=/dev/sda3 selinux=0 splash=silent elevator=cfq ro
Modules:
147 snd_pcm_oss 240 *snd_pcm 38 *snd_page_alloc 74 *snd_timer
57 *snd_mixer_oss 149 *snd 33 *soundcore 44 thermal
48 *processor 23 fan 28 button 78 usbserial
73 parport_pc 38 lp 104 *parport 700 *ipv6
113 hid 36 joydev 97 sg 98 st
51 sr_mod 93 ide_cd 90 *cdrom 84 ehci_hcd
63 ohci_hcd 35 evdev 244 tg3 63 *af_packet
40 *binfmt_misc 246 *usbcore 122 e100 32 *subfs
19 *nls_utf8 24 *nls_cp437 139 dm_mod 266 *ext3
165 *jbd 30 mptsas 30 mptfc 29 *scsi_transport
29 *mptspi 98 *mptscsih 131 *mptbase 52 *sd_mod
237 *scsi_mod
Character Devices: Block Devices:
1 mem 10 misc 1 ramdisk 71 sd
2 pty 13 input 3 ide0 128 sd
3 ttyp 14 sound 7 loop 129 sd
4 /dev/vc/0 21 sg 8 sd 130 sd
4 tty 29 fb 9 md 131 sd
4 ttyS 116 alsa 11 sr 132 sd
5 /dev/tty 128 ptm 65 sd 133 sd
5 /dev/console 136 pts 66 sd 134 sd
5 /dev/ptmx 180 usb 67 sd 135 sd
6 lp 188 ttyUSB 68 sd 253 device-mapper
7 vcs 254 snsc 69 sd 254 mdp
9 st 70 sd
File Systems:
ext3 [sysfs] [rootfs] [bdev]
[proc] [cpuset] [sockfs] [pfmfs]
[futexfs] [tmpfs] [pipefs] [eventpollfs]
[devpts] ext2 [ramfs] [hugetlbfs]
minix msdos vfat iso9660
[nfs] [nfs4] [mqueue] [rpc_pipefs]
[subfs] [usbfs] [usbdevfs] [binfmt_misc]
Other options
- -f : Run procinfo continuously full-screen (update status on screen, the default is 5 seconds, use -n SEC to setup pause)
- -Ffile : Redirect output to file (usually a tty). For example procinfo -biDn1 -F/dev/tty5