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 -l4
No comments:
Post a Comment