Re: /proc/pid/sched units

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Thanks for the help. My confusion is clear now.

On Sat, Jul 31, 2021 at 3:11 AM Michael Kerrisk (man-pages)
<mtk.manpages@xxxxxxxxx> wrote:
>
> Hello Shivank,
>
> On Wed, 28 Jul 2021 at 14:59, Shivank Garg <shivankgarg98@xxxxxxxxx> wrote:
> >
> > ---------- Forwarded message ---------
> > From: Shivank Garg <shivankgarg98@xxxxxxxxx>
> > Date: Wed, Jul 28, 2021 at 6:26 PM
> > Subject: /proc/pid/sched units
> > To: Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Linux MM
> > <linux-mm@xxxxxxxxx>, <util-linux@xxxxxxxxxxxxxxx>
> >
> >
> > Hi Everyone,
> >
> > I'm analyzing the cpu time taken ("se.sum_exec_runtime" in
> > /proc/$pid/sched) by process in different configurations for my
> > project work. But I was not able to get the time units for the values
> > displayed in the file. I tried searching it in source code -
> > kernel/sched/cputime.c,include/linux/sched.h etc. but it left me more
> > confused.
> >
> > Can you please answer me about the measurement units (is it
> > microseconds, nanoseconds, jiffles ...) ?
> >
> > Also, I was not able to find proper documentation for /proc/pid/sched.
> > Please point to me if it's already there. If not, I would love to
> > contribute toward documenting these variables. It would be very
> > helpful for newbies (like me) in future.
>
> It looks like se.sum_exec_runtime is milliseconds. In
> kernel/sched/debug.c, see proc_sched_show_task(), the definition of
> the PN() PNS(), and SPLIT_NS() macros, and the nsec_high(x) and
> nsec_low(x) functions.
>
> Thanks,
>
> Michael
>
>
> --
> Michael Kerrisk
> Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
> Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux