Remember your dreams

Remember your dreams
Remember your dreams

Wednesday, June 30, 2010

Display the number of processors on Linux

On a hyperthreaded system it can be confusing to determine exactly how many CPU's and Cores a machine has in use. Using the /proc/cpuinfo command will provide the information, but you want to isolate the processor id and core id information for an accurate count.

I am on Red Hat Enterprise 5

-- Type uname -r to display the kernel release
#
# uname -r
2.6.18-164.el5

-- cpuinfo provides the information.
# cat /proc/cpuinfo

-- Isolate the number of processors.
# grep "physical id" /proc/cpuinfo | sort -u | wc -l
2

-- Isolate the number of cores
# grep "core id" /proc/cpuinfo | sort -u | wc -l
4

No comments:

Post a Comment

Proactive Oracle DBA

This is a series of posts. I am working this to share some of the many scripts I schedule to automatically run to alert me of any current o...