-   Programming (
-   -   /proc/stat cpu (

ahz 04-23-2005 07:11 PM

/proc/stat cpu
/proc/stat has extra info not documented in man 5 proc. What are the extra 3 numbers on the cpu line?

man 5 proc:

              kernel/system statistics.  Varies with architecture.  Common entries include:

              cpu  3357 0 4313 1362393
                    The number of jiffies (1/100ths of a second) that the system spent in user mode, user mode  with  low
                    priority  (nice),  system  mode, and the idle task, respectively.  The last value should be 100 times
                    the second entry in the uptime pseudo-file.

cat /proc/stat (first line):

cpu  913097 309081 268613 30942701 155416 12813 0

alred 04-24-2005 08:24 AM

there is an eighth field in Kernel v2.6.11 /fs/proc/proc_misc.c


  seq_printf(p, "cpu%d %llu %llu %llu %llu %llu %llu %llu %llu\n",
        (unsigned long long)cputime64_to_clock_t(user),
        (unsigned long long)cputime64_to_clock_t(nice),
        (unsigned long long)cputime64_to_clock_t(system),
        (unsigned long long)cputime64_to_clock_t(idle),
        (unsigned long long)cputime64_to_clock_t(iowait),
        (unsigned long long)cputime64_to_clock_t(irq),
        (unsigned long long)cputime64_to_clock_t(softirq),
        (unsigned long long)cputime64_to_clock_t(steal));


All times are GMT -5. The time now is 06:46 PM.