Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-23-2005, 07:11 PM   #1
Registered: Oct 2004
Posts: 58

Rep: Reputation: 15
/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
Old 04-24-2005, 08:24 AM   #2
Registered: Mar 2005
Location: singapore
Distribution: puppy and Ubuntu and ... erh ... redhat(sort of) :( ... + the venerable bsd and solaris ^_^
Posts: 658
Blog Entries: 8

Rep: Reputation: 31
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));



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
/proc/stat file problem for cpu usage arunka Programming 3 04-23-2014 02:08 PM
/proc/stat values don't add up ! mike0w Linux - General 0 10-25-2005 06:01 AM
New cpu values in /proc/stat? eldonz Linux - General 1 10-19-2005 01:16 PM
/proc/stat cpu info GDarkBladE Linux - Software 2 10-11-2005 04:16 PM
Calculating total %cpu usage from /proc/stat gaijin Programming 1 07-07-2004 03:45 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration