[mdlug] System call to get CPU Info

Ingles, Raymond Raymond.Ingles at compuware.com
Thu Apr 17 10:32:44 EDT 2008


> From: David Lane

> Is there a system call to get CPU information?

 Depends on what you're looking for. Linux generally avoids syscalls for that stuff,
and uses the /proc filesystem. For information on the physical CPUs installed in the
system, you can use "cat /proc/cpuinfo". For information on CPU usage, you can try
"cat /proc/stat" and "cat /proc/loadavg", though you'll need to do some digging to
understand what all the numbers mean.

 Sincerely,

 Ray Ingles                                         (313) 227-2317

 "Loyalty to the country always. Loyalty to the government when it
                    deserves it." - Mark Twain
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.



More information about the mdlug mailing list