LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can someone explain the output of /proc/pid/sched (http://www.linuxquestions.org/questions/linux-newbie-8/can-someone-explain-the-output-of-proc-pid-sched-4175412750/)

vinaywagh 06-21-2012 08:42 PM

Can someone explain the output of /proc/pid/sched
 
Guys,

I am trying to understand the output of the /proc/pid/sched. I could not find anything on the web either. Here is the output I see on my system.

root@slot7:/root> cat /proc/10556/sched
send_tipc (10556, #threads: 1)
---------------------------------------------------------
se.exec_start : 29266438.441437
se.vruntime : 762810.236743
se.sum_exec_runtime : 195.169059
se.avg_overlap : 0.322470
se.avg_wakeup : 3.999993
nr_switches : 3515
nr_voluntary_switches : 3466
nr_involuntary_switches : 49
se.load.weight : 29154
policy : 0
prio : 105
clock-delta : 102

What do each of these values mean. Is the unit nano seconds ?

Thanks,
Vinay

Babertje 06-22-2012 02:18 PM

FYI See: http://linux.about.com/od/commands/l/blcmdl5_proc.htm
This forum will be to short to tell you all about it

vinaywagh 06-22-2012 06:59 PM

Quote:

Originally Posted by Babertje (Post 4709491)
FYI See: http://linux.about.com/od/commands/l/blcmdl5_proc.htm
This forum will be to short to tell you all about it

The link you mentioned does not have the /proc/pid/sched file in it. I have read the proc man page and it does not answer the question, it somehow leaves out the sched file. There does not seem to a single forum where I find this information. I was hoping someone on this forum would know.

vinaywagh 06-26-2012 05:15 PM

A colleague of mine is familiar with the data. The file seems to be new and probably came in as part of CFS. Here is information on some of the data

se.exec_start : 29266438.441437
se.vruntime : 762810.236743
se.sum_exec_runtime : 195.169059
sum_exec_runtime is the CPU time used by the thread (if you add up the utime and stime for the thread it should match this value except this is in nano-secs. vruntime is virtual run time, it kind of is the same as the sum_exec_runtime scaled by the load.weight below. The scheduler uses this field to arrange the ready queue in a Red and Black tree and the one with the least vruntime is always picked to run next. I think exec_start is the current time when this thread is picked up to run, not sure.

se.avg_overlap : 0.322470
se.avg_wakeup : 3.999993
avg_wakeup gives the average time the thread spent blocking.

nr_switches : 3515
This is the # of context switches.

nr_voluntary_switches : 3466
Voluntary switches, I.e the thread blocked and hence another thread is picked up.

nr_involuntary_switches : 49
involuntary – the scheduler kicked the thread out as there is another hungry thread is ready to run.

se.load.weight : 29154
load.weight is based on the nice value, nice value range from –19 to 20, plays a role in calculating the time slice (note CFS supports variable time slice, a process with nice value of –1 gets ~ 5% more time-slice than a process with nice 0)

policy : 0
prio : 105
prio 0-99 are real-time priorities, 100-139 are CFS scheduling priority. 105 indicates you are running with –15
clock-delta : 102

syg00 06-26-2012 09:02 PM

Thanks for responding back with that info. here is a little more from the CFS author.


All times are GMT -5. The time now is 10:59 PM.