Wednesday 7 February 2007

Linux System Info commands

Here is a list of commands that display various system parameters. To display all memory parameters enter :
thanassis@lxBakalidis:~> cat /proc/meminfo
MemTotal:      2074792 kB
MemFree:        844804 kB
Buffers:        207508 kB
Cached:         548016 kB
SwapCached:          4 kB
Active:         718768 kB
Inactive:       379272 kB
HighTotal:     1178048 kB
HighFree:       314284 kB
LowTotal:       896744 kB
LowFree:        530520 kB
SwapTotal:     1534168 kB
SwapFree:      1534068 kB
Dirty:              12 kB
Writeback:           0 kB
AnonPages:      342464 kB
Mapped:         122896 kB
Slab:            53424 kB
PageTables:       2412 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:   2571564 kB
Committed_AS:   633536 kB
VmallocTotal:   114680 kB
VmallocUsed:      8600 kB
VmallocChunk:   105820 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     4096 kB
The following command can be combined with grep to display only the requested result. So in order to determine the amount of free swap space a command like :
thanassis@lxBakalidis:~> grep SwapFree  /proc/meminfo
SwapFree:      1534068 kB
CPU information is located at /proc/cpuinfo.
thanassis@lxBakalidis:~> cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping        : 9
cpu MHz         : 2793.351
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
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 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips        : 5590.66

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping        : 9
cpu MHz         : 2793.351
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
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 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips        : 5586.76
The number of a available disks, their capacity and mount points is given by df. Remember to use -h in order for df to display data in hman readable form.
thanassis@lxBakalidis:~> df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda2              20G  5,5G   14G  30% /
udev                 1014M  100K 1013M   1% /dev
/dev/hda3              16G  4,7G   12G  30% /home
//thersephassa/Data    75G   74G  1,6G  98% /mnt/Culture
I 'll get back to this post as soon as I have mor commands.

No comments :