1

I am trying to compare two tools execution time, which I have installed in my debian linux server. Now, I have to give two command line commands to execute those two tools.

For example say,

cat file1 file2 file3 > file4

Now, I am using command time to find execution time of the command:

time cat file1 file2 file3 > file4

And here is the output:

10906.60user 63.66system 3:50:09elapsed 79%CPU (0avgtext+0avgdata 20190800maxresident)k
39411208inputs+7475408outputs (434703major+7703726minor)pagefaults 0swaps

Can anybody help me:

is 3:50:09elapsed means process takes 3 hours 50 minutes 9 seconds in WALL-CLOCK-TIME or not ?

1 Answer 1

3

Yes, that is exactly what it means. You can see the default format string on the man page for the utility, and the definitions for each of the variables that can be inserted into the output. %E, which generates that number (3:50:09), represents

Elapsed real time (in [hours:]minutes:seconds).

4
  • Thanks a lot. Actually, I am little bit confused with REAL TIME (Or WALL CLOCK TIME) vs ELAPSED TIME. Are they same, I mean WALL CLOCK TIME and ELAPSED TIME ?
    – Arpssss
    Commented Jun 21, 2012 at 20:00
  • @Arpssss I believe they are. Real / elapsed / wall clock time is how long between the start and end of the program, e.g., how long the program took to run (as would be measured by a wall clock, hence the name). This is in contrast to CPU time (user time + system time), which measures how much time the CPU spends actually executing the program, which might be less, since the CPU can sleep while the program is waiting on something, such as user input. Commented Jun 21, 2012 at 20:12
  • 1
    "the CPU can sleep while the program is waiting on something" - Actually it's the program that sleeps (i.e. the scheduler puts the process on the "sleep" or waiting-for-I/O list) while the CPU schedules another program/process or enters the idle loop. If no other process is ready to run, then the idle loop could allow the CPU to enter somekind of low power state.
    – sawdust
    Commented Jun 22, 2012 at 6:14
  • @sawdust +1 Very true. I was thinking about a simplified system which had 1 CPU and 1 process, but forgot to specify the details as such. Commented Jun 22, 2012 at 14:06

You must log in to answer this question.

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