LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Finding number of CPUs. (https://www.linuxquestions.org/questions/linux-networking-3/finding-number-of-cpus-240063/)

r_213 10-07-2004 10:51 PM

Finding number of CPUs.
 
Is there any way to find the number of CPUs in Linux. The sar command (sar -cuq 5 ) gives the average values of all the CPUs present. Is there any other command or system file from where I can get the individual CPU count and its values. Plz help me.

Thanks and Regards,
Ranganathan

darthtux 10-07-2004 11:37 PM

I am on a one-processor machine right now but you can look in the proc directory

ls /proc | grep cpu

cat /proc/cpuinfo

r_213 10-07-2004 11:48 PM

Thanks for the reply.

I want to know one more thing. the sar command "sar -cuq 5" gives the output for all the CPUs. is there anyother way to get the values for each CPU?


All times are GMT -5. The time now is 01:48 AM.