High-resolution user/system times?

High-resolution user/system times?

Valery Reznic valery_reznic at yahoo.com
Wed Jul 25 11:35:40 IDT 2012


Not really suggestion, but anyway...

If the process that quick why it is of such interest what time it spent in user space and in kernel space?

Valery




>________________________________
> From: Oleg Goldshmidt <pub at goldshmidt.org>
>To: Nadav Har'El <nyh at math.technion.ac.il> 
>Cc: linux-il at cs.huji.ac.il 
>Sent: Wednesday, July 25, 2012 11:25 AM
>Subject: Re: High-resolution user/system times?
> 
>
>
>
>
>On Wed, Jul 25, 2012 at 11:15 AM, Nadav Har'El <nyh at math.technion.ac.il> wrote:
>
>On Wed, Jul 25, 2012, Oleg Goldshmidt wrote about "Re: High-resolution user/system times?":
>>
>>> > Hi, as you know the time(1) command, and the times(2) system call is
>>> > able to separate a process's running time into "user" and "system" time,
>>> > measuring the CPU time in user space and kernel space respectively.
>>> >
>>> > However, these only have a jiffy (often 1/250 seconds) resultion.
>>>...
>>>
>>> man 2 getrusage ?
>>
>>Thanks.
>>
>>The manual page seems promising, talking about microseconds, but I don't
>>believe it actually has a microsecond resolution. I think it has the
>>same jiffy resolution that times() has. Do you believe that it does
>>have microsecond resolution?
>>
>
>No, I know it doesn't. Actually, I looked the kernel code up, I do think that HZ is 100 (by default), and jiffies_to_usecs is faking it.
>
>Maybe you need to resort to clock_gettime with CLOCK_REALTIME. Some mentioned related instrumentation earlier in this thread.
>
>
>
>>I think we're starting to build here a long list of manual-page bugs...
>>
>>
>>--
>>Nadav Har'El                        |        Wednesday, Jul 25 2012, 6 Av 5772
>>nyh at math.technion.ac.il             |-----------------------------------------
>>Phone +972-523-790466, ICQ 13349191 |Evening news begins with 'Good evening',
>>http://nadav.harel.org.il           |and then proceeds to say why it isn't.
>>
>
>
>-- 
>Oleg Goldshmidt | oleg at goldshmidt.org
>
>_______________________________________________
>Linux-il mailing list
>Linux-il at cs.huji.ac.il
>http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20120725/fdf21037/attachment-0001.html>


More information about the Linux-il mailing list