Saturday, June 5, 2010

Ubuntu: time command

The time command comes very useful for long running scripts. It lets you know among other thigs, how long a particular command takes to run.

# sudo time updatedb

0.27user 1.00system 0:40.50elapsed 3%CPU (0avgtext+0avgdata 4256maxresident)k
119752inputs+11560outputs (1major+367minor)pagefaults 0swaps

The command output shows you:
user avgerage load
system average load
command elapsed time
CPU average use
memory average use
I/O inputs & outputs
memory page faults

No comments: