Wednesday, March 14, 2012

Linux CPU Information

You can cat the /proc/cpuinfo file to get information about your CPUs. Here are some commands.

List everything in cpuinfo

cat /proc/cpuino

Count Physical Processors

 cat /proc/cpuinfo | grep 'physical id' | sort -u

Count Cores and such

cat /proc/cpuinfo | grep processor | wc -l

Look at CPU stats (since midnight)

sar -u

Look at current CPU Stats (the -d 2 5 says run this every 2 seconds for 5 times)

sar -u -d 2 5


Post a Comment