Thanks to all who replied real fast :
Madanagopalan.SUBRAMANIAN@gemplus.com
Dennis_Martens@health.qld.gov.au
vince.merrell@ssmb.com
bartlett@metro1.com
They all suggested to use the 'time' command in front of the command I wish
to time
In my example I may use :
time nohup ./uploaddq dqsall badall.out 1>>all.log 2>>all.err &
When the command has finished, it will show the "real" time it took and
also the user and system cpu times consumed.
real 0m0.695s
user 0m0.010s
sys 0m0.020s
My original post :
> I have a shell script that updates some Oracle server database running on
> Solaris 2.6. Is there a way to figure out how long this process took , the
> start and end time without modifying the script itself. I thought of some
way
> is to add 'date > logfile' before and after the process.
> For example (upload.sh):
> -------------
> date > upload-start.log
> nohup ./uploaddq dqsall badall.out 1>>all.log 2>>all.err &
> date > upload-end.log
> ------------
> Is there any other way to get this information from the system itself
without
> adding these 'date' lines?
Thanks,
Hisham
S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@sunmanagers.ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:19 CDT