login
Header Space

 
 

Last field in /proc/stat

May 19, 2007 - 6:39am
Submitted by Anonymous on May 19, 2007 - 6:39am.
Linux

Hi,

when I do

cat /proc/stat

I receive as output this kind of response for the cpu

cpu 13548 55 3873 734601 8989 2259 6208 0

I can identify the meaning of all the field but the last one. What is the meaning of this field? And in which part of the kernel is taken this value (0)?

Thanks in advance,
Daniele

/bin/grep is your

May 19, 2007 - 10:51am
Anonymous (not verified)

/bin/grep is your friend.

fs/proc/proc_misc.c:498:

      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)); 

kernel/sched.c:3113:

/*
 * Account for involuntary wait time.
 * @p: the process from which the cpu time has been stolen
 * @steal: the cpu time spent in involuntary wait
 */
void account_steal_time(struct task_struct *p, cputime_t steal)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary