monitoring multiple jobs Unix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting monitoring multiple jobs Unix
# 1  
Old 10-08-2009
monitoring multiple jobs Unix

I have a list of jobs. their expected start time and their expected duration.

my needs are
  • monitor multiple jobs (starting at different time and their execution time also differs)
  • Need to mail if any of the job running longer than its expected duration.
Whats the efficient way to scripting & scheduling to monitor the script..??
# 2  
Old 10-08-2009
I would make a wrapper script that would do the following:

Code:
Set a trap for child exit
On child trap, exit because we didn't exceed time

Get commmand and time from command line
execute command in background 

while time < expected
 sleep short time (1 minute?)
 if command not running then exit
end while

Email alert

You don't want to sleep in a shell for the expected time because you won't get the child exit trap until you wake up if the monitored command exited earlier.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to run multiple cron jobs?

I have two scripts which I'm tying to run one after the other- this is what I've tried: 00 14 * * * /path/one.sh && /path/two.sh I've also tried putting each script on a different line: 00 14 * * * /path/one.sh 00 14 * * * /path/two.sh Can this be done? (1 Reply)
Discussion started by: $shell_Learner
1 Replies

2. Shell Programming and Scripting

Shell script to run multiple jobs and it's dependent jobs

I have multiple jobs and each job dependent on other job. Each Job generates a log and If job completed successfully log file end's with JOB ENDED SUCCESSFULLY message and if it failed then it will end with JOB ENDED with FAILURE. I need an help how to start. Attaching the JOB dependency... (3 Replies)
Discussion started by: santoshkumarkal
3 Replies

3. UNIX for Advanced & Expert Users

Submitting multiple qsub jobs

Hi all, Today, I want to ask how to submit multiple qsub jobs. I want to submit 100 .sh files for the simulations. The name of files is run_001.sh, run_002.sh, run_003.sh, ..... ..... run_100.sh Submitting each file manually are time-consuming, hence, I want to make another .sh file... (11 Replies)
Discussion started by: syg3434
11 Replies

4. Shell Programming and Scripting

UNIX script to check multiple jobs runninng status

Hi Folks, Please help me ,I need a unix shell script to check for multiple jobs running. if there are multiple backup Jobs running then it should be trigger an email . Thanks, Anand T (1 Reply)
Discussion started by: nandu67
1 Replies

5. Shell Programming and Scripting

How to View multiple Cron jobs

Hi, I ran two crontab commands using: crontab program1 crontab program2 However when I type crontab -l only the second cron job shows up, how do I see all cron jobs running and how do I edit all at the same time Thanks in Advance S:D (10 Replies)
Discussion started by: walforum
10 Replies

6. Shell Programming and Scripting

Multiple jobs reading from same file

I have a sequence of tasks that I routinely run and I'm trying to parallelize certain portions of the sequence. Specifically, there are 3 tasks which all read from the same file, each performing different operations and writing to their own seperate file. I was wondering if I could execute these... (3 Replies)
Discussion started by: erichpowell
3 Replies

7. UNIX for Advanced & Expert Users

Problem Running qsub multiple jobs

Hello, I have a perl script that takes in one file of input and outputs to a file. I would like to run this script on several input files, and I would like to run it with qsub, something like this: Input files: FileListDssp.txt.numaa FileListDssp.txt.numab FileListDssp.txt.numac etc.. ... (1 Reply)
Discussion started by: InfoSeeker
1 Replies

8. Shell Programming and Scripting

Multiple jobs in perl

Hello, I would like to write a perl script which executes several jobs. The key thing is I only want 4 jobs to be executed at one time (that's because my machine as 4 cpu, and I want one job per cpu). Is there any way that I can get perl to co-operate with me in this? Thanks! (1 Reply)
Discussion started by: amcrisan
1 Replies

9. AIX

comment jobs in cron for multiple accounts

Hi, We have several jobs scheduled in cron in AIX. Before every release we need to comment those jobs and uncomment those after the release is over. There are several accounts whose cron entries need to be commented. Can anyone provide me with a script which can put a '#' before each line in... (3 Replies)
Discussion started by: shibajighosh
3 Replies

10. UNIX for Dummies Questions & Answers

Monitoring Server Jobs, Roles, and Performance via Command Line

Hey guys, I have an up and coming interview (tomorrow) and during the discussion via phone I was asked if I was familiar with "monitoring jobs in Linux/UNIX using the command line." Now, I currently work in the MS world and I am underneath the NOC hear at my company so I have had no reason to do... (2 Replies)
Discussion started by: Steve M
2 Replies
Login or Register to Ask a Question