5
 time a.out 
 106.130u 0.000s 1:46.28 99.8%   0+0k 0+0io 83pf+0w

As per my understanding of the man page:

  • the first value is the time since the code execution started and ended,
  • the second values is the time spent in usermode
  • the third one being in kernel mode

Is the 99.8% indicating time spent in kernel mode?

Also, what does this indicate?

0+0k 0+0io 83pf+0w .

The program definitely takes more than a minute to execute – then why is the first value so small?

0

1 Answer 1

5

From the manpage:

The default format is:

    %Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
    %Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps

So, 106 seconds spent in userspace, 0 seconds in kernelspace, 1 minute and 46 seconds elapsed "real" time.

As for "why is the first value so small" - it isn't. Note that 106 seconds == 60 seconds + 46 seconds == 1 minute 46 seconds, which is the time elapsed. I don't see a discrepancy there.

2
  • 1
    Thank you.. i was getting confused seeing the first u with the first value thinking it was microsecond. Really dumb
    – f-z-N
    Sep 21, 2011 at 9:10
  • 1
    @f-z-N I was thinking the same thing. There was nothing to indicate that it is seconds, and the next field does have an 's' suffix, so it is reasonable (in fact, should be expected) to be microseconds and seconds. Even after seeing Piskvor's "The default format is", it still didn't sink in immediately that u is for user and s is for system. In measurement, especially with time, u=micro and s=seconds is so deeply embedded into us that these suffixes really should not be used this way.
    – Loduwijk
    Oct 22, 2016 at 14:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .