Linux: How to get CPU and memory information

Linux FAQ: How can I find Linux processor and memory information? (Also written as, How can I find Linux CPU information?, How can I find Linux RAM information?)

Back to top

How to show the Linux CPU/processor

To see what type of processor/CPU your computer system has, use this Linux command:

cat /proc/cpuinfo

As you can see, all you have to do is use the Linux cat command on a special file on your Linux system. (See below for sample processor output.)

Back to top

How to show Linux memory information

To see your Linux memory information and memory stats use this command:

cat /proc/meminfo

(See below for sample output.)

Back to top

Linux processor command output

When I issue that Linux processor information command on my current hardware system, I see this output:

# cat /proc/cpuinfo

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 4
model name	: Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping	: 1
cpu MHz		: 3007.103
cache size	: 1024 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	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pni monitor ds_cpl cid xtpr
bogomips	: 6016.05

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 15
model		: 4
model name	: Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping	: 1
cpu MHz		: 3007.103
cache size	: 1024 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	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pni monitor ds_cpl cid xtpr
bogomips	: 6012.84

From that output I can see my current system is a two-processor Intel system, with additional information about the Intel CPU (CPUs, actually).

Back to top

Linux memory information command

When I issue the Linux memory information command, I see the following output:

# cat /proc/meminfo

MemTotal:      2067508 kB
MemFree:         92788 kB
Buffers:        246168 kB
Cached:        1362296 kB
SwapCached:          0 kB
Active:        1073132 kB
Inactive:       637304 kB
HighTotal:     1171392 kB
HighFree:         7228 kB
LowTotal:       896116 kB
LowFree:         85560 kB
SwapTotal:     2096472 kB
SwapFree:      2096352 kB
Dirty:            6584 kB
Writeback:           0 kB
AnonPages:      101832 kB
Mapped:          20440 kB
Slab:           255360 kB
PageTables:       1760 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:   3130224 kB
Committed_AS:   306204 kB
VmallocTotal:   114680 kB
VmallocUsed:      3708 kB
VmallocChunk:   110860 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     4096 kB

As you can see, my current Linux system has 2 GB RAM, with all the additional memory information shown there.

Back to top

Summary: Linux processor and memory commands

I hope these Linux processor and memory commands have been helpful. When you have some spare time, take a look at the /proc filesystem on your Linux system for other system information you can find, including /proc/loadavg, /proc/vmstat, and much more.

Back to top

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.