Thursday, April 18, 2013

Display Number of Processors on Linux

http://www.howtogeek.com/howto/ubuntu/display-number-of-processors-on-linux/


cat /proc/cpuinfo | grep processor | wc -l
The command just looks in the /proc/cpuinfo file, pulls out the number of lines containing the word “processor” and passes them into wc (word count), which returns a count of the CPUs in the system.
Here’s what it returned on my remote server:
[root@root]# cat /proc/cpuinfo | grep processor | wc -l
4

No comments:

Post a Comment