LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
LinkBack Search this Thread
Old 04-23-2005, 06:11 PM   #1
ahz
Member
 
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:
Code:
       /proc/stat
              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):
Code:
cpu  913097 309081 268613 30942701 155416 12813 0
 
Old 04-24-2005, 07:24 AM   #2
alred
Member
 
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
Code:
.........
.........

  seq_printf(p, "cpu%d %llu %llu %llu %llu %llu %llu %llu %llu\n",
          i,
         (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));

.......
.......
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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


All times are GMT -5. The time now is 04:53 PM.

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