Tuesday, April 22, 2014

How to count Physical CPU in Linux

Many times we will have requirement to know the no of cores and processors information as DBA. Below are the commands used to identify in Cores and processors information in linux server.
1. How to count Physical CPU in Linux
# cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
2
2. How to count the CPU cores?
# cat /proc/cpuinfo | grep "cpu cores" | uniq
2
 
3. How to count the Virtual Processors?
# cat /proc/cpuinfo | grep "^processor"
processor : 0
processor : 1
processor : 2
processor : 3

No comments:

Post a Comment