Hello,
It is probably because you have an SMP system and in the first
two cases the load got spread across two (or more) CPUs. tar -czf = tar
+ gzip so it is possible. You can try running something more
CPU-intensive like building a kernel with make -j2 and see that there
will be an even bigger difference between total and user+system. That is
because total time is just the time elapsed when you look at the clock
but user and kernel time means the sum of time on all CPUs on which the
command has been running.
Regards,
Daniel
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Vu Pham
Sent: Friday, August 07, 2009 8:47 PM
To: Red Hat Enterprise Linux 5 (Tikanga) discussion mailing-list
Subject: [rhelv5-list] elapsed time - user time - kernel time < 0 ?
I played around with the command /usr/bin/time and found some strange
values when I calculate the above time.
In the three below outputs, two of them show negatime time. What does it
mean with negative time for that calculation ?
Thanks,
Vu
[r...@i71 ~]# export TIME="%e %U %S"
[r...@i71 ~]# /usr/bin/time tar czf /tmp/tmp.etc.tar.gz /etc 2>&1 | tail
-1 | gawk '{print "Total="$1 ",User=" $2 ",System=" $3 ",Q time=" $1 -$2
-$3}'
Total=3.17,User=3.15,System=0.12,Q time=-0.1
[r...@i71 ~]# /usr/bin/time tar czf /tmp/tmp.etc.tar.gz /etc 2>&1 | tail
-1 | gawk '{print "Total="$1 ",User=" $2 ",System=" $3 ",Q time=" $1 -$2
-$3}'
Total=3.17,User=3.13,System=0.13,Q time=-0.09
[r...@i71 ~]# /usr/bin/time tar czf /tmp/tmp.etc.tar.gz /etc 2>&1 | tail
-1 | gawk '{print "Total="$1 ",User=" $2 ",System=" $3 ",Q time=" $1 -$2
-$3}'
Total=3.25,User=3.12,System=0.09,Q time=0.04
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list