<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Not really suggestion, but anyway...<br></span></div><div><span>If the process that quick why it is of such interest what time it spent in user space and in kernel space?</span></div><div><br><span></span></div><div><span>Valery<br></span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight: bold;">From:</span></b> Oleg Goldshmidt <pub@goldshmidt.org><br> <b><span style="font-weight: bold;">To:</span></b> Nadav Har'El <nyh@math.technion.ac.il> <br><b><span style="font-weight:
bold;">Cc:</span></b> linux-il@cs.huji.ac.il <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, July 25, 2012 11:25 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: High-resolution user/system times?<br> </font> </div> <br>
<div id="yiv1557511487"><div dir="ltr"><font face="georgia,serif"><br></font><br><div class="yiv1557511487gmail_quote">On Wed, Jul 25, 2012 at 11:15 AM, Nadav Har'El <span dir="ltr"><<a rel="nofollow" ymailto="mailto:nyh@math.technion.ac.il" target="_blank" href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a>></span> wrote:<br>
<blockquote class="yiv1557511487gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Wed, Jul 25, 2012, Oleg Goldshmidt wrote about "Re: High-resolution user/system times?":<br>
<div class="yiv1557511487im">> > Hi, as you know the time(1) command, and the times(2) system call is<br>
> > able to separate a process's running time into "user" and "system" time,<br>
> > measuring the CPU time in user space and kernel space respectively.<br>
> ><br>
> > However, these only have a jiffy (often 1/250 seconds) resultion.<br>
</div>>...<br>
><br>
> man 2 getrusage ?<br>
<br>
Thanks.<br>
<br>
The manual page seems promising, talking about microseconds, but I don't<br>
believe it actually has a microsecond resolution. I think it has the<br>
same jiffy resolution that times() has. Do you believe that it does<br>
have microsecond resolution?<br></blockquote><div><br>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.<br><br>Maybe you need to resort to clock_gettime with CLOCK_REALTIME. Some mentioned related instrumentation earlier in this thread.<br>
<br></div><blockquote class="yiv1557511487gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I think we're starting to build here a long list of manual-page bugs...<br>
<div class="yiv1557511487im"><br>
--<br>
Nadav Har'El | Wednesday, Jul 25 2012, 6 Av 5772<br>
<a rel="nofollow" ymailto="mailto:nyh@math.technion.ac.il" target="_blank" href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a> |-----------------------------------------<br>
</div>Phone <a href="" rel="nofollow">+972-523-790466</a>, ICQ 13349191 |Evening news begins with 'Good evening',<br>
http://nadav.harel.org.il |and then proceeds to say why it isn't.<br>
</blockquote></div><br><br clear="all"><br>-- <br>Oleg Goldshmidt | <a rel="nofollow" ymailto="mailto:oleg@goldshmidt.org" target="_blank" href="mailto:oleg@goldshmidt.org">oleg@goldshmidt.org</a><br>
</div>
</div><br>_______________________________________________<br>Linux-il mailing list<br><a ymailto="mailto:Linux-il@cs.huji.ac.il" href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br><a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br><br><br> </div> </div> </blockquote></div> </div></body></html>