?
Solved

capturing start and end time for a unix jobs / processes

Posted on 2005-02-24
8
Medium Priority
?
476 Views
Last Modified: 2013-12-27
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
Comment
Question by:vsuripeddi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 172 total points
ID: 13400886
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
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 164 total points
ID: 13406383
(echo start `date` && /path-to/job1  && echo -n done || echo -n failed) && date
0
 
LVL 1

Assisted Solution

by:sisiro
sisiro earned 164 total points
ID: 13406472
Or use: logger -p command in your main script to log the start and end times.
0
 
LVL 10

Expert Comment

by:neteducation
ID: 13503681
You can use bsm to log any start and end of processes of a specific user. try "man bsmconv" for more detail
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 14363683
I'd suggest a split for first 3 suggestions
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question