Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how long does a process take to run?

Status
Not open for further replies.

langford

Technical User
Aug 25, 2001
13
0
0
GB
I would like to be able to write to the log that gets written by certain processes how long the process took. I could do this by running the command in a shell script with date either side of the command and work the rest out by myself but I am certain that it is possible with the time command but attempts so far have eluded me. I am beginning to think I dreamt ever seeing it!
 
You should be able to make use of the time command which is a shell reserved or there is also a time command which is installed. Either one of these should be what you need.
 

Can your system do process accounting?
Do a google on that.

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Hi Langford

It is simple...Just run this command syntax
syntax:
$time command(script)

eg;
$time date
Wed Aug 27 18:20:36 EDT 2003

real 0m0.01s
user 0m0.00s
sys 0m0.01s

From this one can conclude that date process/command took 1 sec time to complete execution.

sushveer
IBM certified specialist-p-series AIX5L System Administration
AIX/SOLARIS/WEBSPHERE-MQ/TIVOLI Administrator
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top