Hi, I am measuring cpu runtime for a couple of processes, and is using /proc/schedstat and /proc/[pid]/schedstat to do so. According to the schedstat doc (https://www.kernel.org/doc/Documentation/scheduler/sched-stats.txt) the last three values are in jiffies. Doing something like
root@gvp4-base-pd-b-rev1:~# cat /proc/schedstat | grep cpu3; sleep 2; cat /proc/schedstat | grep cpu3; cpu3 0 0 0 0 0 0 41155818663320 17173365985560 1011370906 cpu3 0 0 0 0 0 0 41157858979020 17176095339120 1011430425 on a heavy loaded system seems to suggest that at least the sum of running tasks is in nanoseconds, not jiffies. Which I also think looks correct when checking the code. For /proc/[pid]/schedstat the documentation is a bit vague on unit, but I interpret it to be the same as the corresponding global values. Which would mean jiffies. Also here it looks to be in nanoseconds on my system though. Am I just confused? is it configuration/system dependent? or is the doc just plain wrong? Thanks, Thommy Jakobsson