The Unix Time Command : tips & tricks

If you have a program ./prog.e then in the bash/ksh shell you can type this command and the output on the screen details how long the code took to run:
$ time ./prog.e
real   24m10.951s user    6m2.390s sys     0m15.705s

Real time – Elapsed time from beginning to end of program (or wall clock time).The real time is the total  time of execution.
CPU time – Divided into User time and System time.
User time – time used by the program itself and any library subroutines it calls.The user time is the time spent processing at the user/application process level.
System time – time used by the system calls invoked by the program (directly or indirectly).The sys time is the time spent by the system at the system/kernel level.

If the wall clock time is consistently much longer than the total of the system and user time, then the fetching of data to and from hard drives may be taking a good deal of time. In parallel codes, the code may be spending a good deal of time waiting on communication between processors.

By this command you can check your script performance.

happy scripting 🙂


njoy the simplicity…….


About victimizeit
This is Atul.. working for IBM as a DataStage Developer. I may not be an expert on any particular DataStgae technology, but I'm sure I do know a few things about DB2, AIX, Unix, Windows, and DataBase. In this blog, I'll give out some tips on these subjects. If you find them useful, great, I'll be happy. Thanks for stopping by !!

One Response to The Unix Time Command : tips & tricks

  1. Anonymous says:

    just what I needed to know. Thanks

What is your opinion ?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: