• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 485
  • Last Modified:

capturing start and end time for a unix jobs / processes

I have a unix job which loads data into the oracle tables. upon completion it sends an email with  log file as an attachment.
This job kicks off several other intermedate shell scripits.

Is there a way to capture

1) start and end time for the main job which kicks off several intermediate jobs
2) start and end time for each of the intermediate jobs
0
vsuripeddi
Asked:
vsuripeddi
3 Solutions
 
yuzhCommented:
You can use script to do the job, eg:

#!/bin/ksh
echo "Job-1 start $(date)" >> /path-to/mylog
/path-to/job1             #run job 1
echo "Job-1 finish $(date)" >> /path-to/mylog

0
 
ahoffmannCommented:
(echo start `date` && /path-to/job1  && echo -n done || echo -n failed) && date
0
 
sisiroCommented:
Or use: logger -p command in your main script to log the start and end times.
0
 
neteducationCommented:
You can use bsm to log any start and end of processes of a specific user. try "man bsmconv" for more detail
0
 
ahoffmannCommented:
I'd suggest a split for first 3 suggestions
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Tackle projects and never again get stuck behind a technical roadblock.
Join Now