View system information with /proc/cpuinfo and /proc/meminfo

by
on
December 9, 2008

There are 2 files available on a Linux system which will give a user a wealth of information about a system. These files, /proc/cpuinfo and /proc/meminfo are written by the Linux kernel and tell you important details about your cpu and memory.

Both files are read-only and can be viewed with any text editor. This information may be overkill for most users but there are a variety of important fields to look for.

The cpuinfo file provides important stats including model name, cpu cores, cpu MHz, cache size, and flags which show what instruction sets are available on the processor. Systems with multiple processors or multiple cores will have separate entries for each.

Here for example is the output of my /proc/cpuinfo file:

$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     T8300  @ 2.40GHz
stepping	: 6
cpu MHz	: 800.000
cache size	: 3072 KB
physical id	: 0
siblings	: 2
core id	: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
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 syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm ida
bogomips	: 4787.93
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     T8300  @ 2.40GHz
stepping	: 6
cpu MHz	: 800.000
cache size	: 3072 KB
physical id	: 0
siblings	: 2
core id	: 1
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
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 syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm ida
bogomips	: 4787.96
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

The important fields to look for in the meminfo file include MemTotal, MemFree, and SwapTotal.

The output of the /proc/meminfo file :

$ cat /proc/meminfo
MemTotal:      4054116 kB
MemFree:       3187648 kB
Buffers:         19852 kB
Cached:         288692 kB
SwapCached:          0 kB
Active:         527556 kB
Inactive:       196060 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:             208 kB
Writeback:           0 kB
AnonPages:      415096 kB
Mapped:         103684 kB
Slab:            50592 kB
SReclaimable:    23924 kB
SUnreclaim:      26668 kB
PageTables:      15756 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
WritebackTmp:        0 kB
CommitLimit:   2027056 kB
Committed_AS:   870676 kB
VmallocTotal: 34359738367 kB
VmallocUsed:    115908 kB
VmallocChunk: 34359621627 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
HugePages_Surp:      0
Hugepagesize:     2048 kB
DirectMap4k:     86472 kB
DirectMap2M:   4106240 kB

No Comments
system administration
, , , , , , , , , ,

Related posts:

  1. View process environment details with proc
  2. How to release the Linux disk cache

Comments (0)

No comments yet

Trackbacks (0)

No trackbacks yet

Leave a Comment

(displayed with your post)
(will not be published)
(optional)

Copyright 2008-2010 WiredRevolution.com. All rights reserved.