Monday, June 27, 2022

Re: Additional information required for cputime

> Is there any other information or examples about that parameter ?
>
> SO far if found : `cputime = pp->p_rtime_sec + ((pp->p_rtime_usec + 500000)
> / 1000000);`
> implying this parameters is in seconds, and the kernel will send a SIGXCPU
> if the process is not finished after that time ?

This is consumed cpu time and not wall time. If you set this on gzip,
those might get close to 1:1, but for a process that sleeps a lot, a
cpu second may well take minutes, hours or days. This is the TIME
column in top, if you want to take a quick peek at how much time a
process consumes, compared to wall time.

--
May the most significant bit of your life be positive.

No comments:

Post a Comment