Monday, April 14, 2008

Linux tips: see machine HW config

Virtual directory /proc holds virtual files :
version
mounts
modules
meminfo
filesystems
driver
devices
uptime
stat
scsi
etc...
... and virtual dirs per all running processes.

To see the values just "cut" the corresponding file, e.g.

$ cat /proc/version
Linux version 2.4.21-27.ELsmp (bhcompile@bugs.build.redhat.com) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-47)) #1 SMP Wed Dec 1 21:59:02 EST 2004
$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) MP CPU 3.16GHz
stepping : 1
cpu MHz : 3169.446
cache size : 1024 KB
physical id : 0
siblings : 2
runqueue : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
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 lm
bogomips : 6317.67
...

$ cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 8396136448 8349917184 46219264 0 98226176 6759067648
Swap: 8587182080 38506496 8548675584
MemTotal: 8199352 kB
MemFree: 45136 kB
MemShared: 0 kB
...

No comments:

Post a Comment