Automate Job monitoring


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automate Job monitoring
# 15  
Old 11-13-2012
No error but blank output file .

Code:
 autorep -j 1111111_XXXXX | awk 'NR>4 { print $1, $2 " " $3, $4 " " $5, $6 } ' OFS="," >> job_monitor.csv

This one is working fine
# 16  
Old 11-13-2012
That is weird! You can set debug and see what exactly is happening:-
Code:
#/bin/sh -xv

# 17  
Old 11-13-2012
Could you please delete the job name in one of your reply? Actual name of the job should NOT appear in the public forum.
Please delete ur reply which has a actual job name.

---------- Post updated at 10:05 PM ---------- Previous update was at 10:03 PM ----------

Code:
printf "Job Name, Last Start, Last End, ST" > job_monitor.csv
+ printf 'Job Name, Last Start, Last End, ST'
while read autorep_cmd
do
  eval "$autorep_cmd" | awk 'NR>4 { printf $1, $2 " " $3, $4 " " $5, $6 } ' OFS="," >> job_monitor.csv
done < job_cmd.csv
+ read autorep_cmd
' eval 'autorep -j Job_name
autorep -j Job_name
++ autorep -j $'Job_name\r'
+ awk 'NR>4 { printf $1, $2 " " $3, $4 " " $5, $6 } ' OFS=,
+ read autorep_cmd
' eval 'autorep -j Job_name
autorep -j Job_name
++ autorep -j $'Job_name\r'
+ awk 'NR>4 { printf $1, $2 " " $3, $4 " " $5, $6 } ' OFS=,
+ read autorep_cmd

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

Script to alert with email after a job got successful in monitoring tool

Hi guyz, Please send me a script which is to be sending an automatic email to particular mail id's when a job get complete with status successful. Please send me your script to my mail id : rehan.csjmu@gmail.com Thanks in Advance. ---------- Post updated at 11:33 AM ----------... (1 Reply)
Discussion started by: Rehan Ahmad
1 Replies

2. Shell Programming and Scripting

Commented cron job -- cron monitoring

Hi I have a requirement to write a shell script,that will check the all commented job in cron job.Please help !! (2 Replies)
Discussion started by: netdbaind
2 Replies

3. Shell Programming and Scripting

Script to Start a Job after finding the Old job completed

Hi Experts, I need a script advice to schedule 12 jobs ( SAS Codes execute back ground ). Algorithem: 1. Script checks first job. 2. Finds first job is done; invoke second job. 3. finds second job is done; invoke third job. .. Request you to please assist. (3 Replies)
Discussion started by: Jerald Nathan
3 Replies

4. Shell Programming and Scripting

Cron job for monitoring processes

I have to monitor several processes in my application . i get the listing of these processes using the command ps -ax i want to write a shell script that will monitor the processes and if a process goes missing then it will send an email to my gmail account. I want to run this... (6 Replies)
Discussion started by: asalman.qazi
6 Replies

5. Shell Programming and Scripting

Error in script to automate the daily monitoring process of UNIX server and it's proc

hi friends, I am trying to automate the daily monitoring process of UNIX server and it's processes. the script are below i executed the above script using ksh -x monitortest1.sh in root login . It shows error at some lines . 1. i logged in using root ,but it... (8 Replies)
Discussion started by: rdhaprakasam
8 Replies

6. Shell Programming and Scripting

Automate Log Monitoring Process

I am a new member of this forum and am also new to unix shell scripting. I joined the forum to seek for help to achieve my task as this forum helps people. here's what i do manually on daily basis 1)Loginto different unix box 2)Ftp the log files (morethan 50 each dir) to windows 3)use text pad... (3 Replies)
Discussion started by: sharugan
3 Replies

7. Programming

Job monitoring script

Hi, We are running a list of jobs (nearly 100 jobs). We have to monitor these jobs through their log files and based on job's exit status. If any one friend have this kind of scripts that will help me to create my own script. Please give me some codes. Your's loving friend. Love... (1 Reply)
Discussion started by: Love
1 Replies

8. Solaris

killing a unix job after the job process gets completed

Hi, Thanks in advance. i need to kill a unix background running job after that job process completes. i can kill a job by giving the following unix command kill -9 processid how to kill the job after the current process run gets completed ? Appreciate your valuable help. Thanks... (7 Replies)
Discussion started by: dtazv
7 Replies

9. Shell Programming and Scripting

killing unix job after the job process completes

Hi, Thanks in advance. i need to kill a unix background running job after that job process completes. i can kill a job by giving the following unix command kill -9 processid how to kill the job after the current process run gets completed ? Appreciate your valuable help. ... (1 Reply)
Discussion started by: dtazv
1 Replies

10. UNIX for Dummies Questions & Answers

automate an ftp job

Hi, I am trying to write and automate a ftp job that connects to a IBM mainframe and pulls the same files everyday. To do this I assumen I create a .netrc file in my solaris home directory, then I write a shell script. How do I envoke ftp from a ksh script and pass it the info in .netrc? I... (11 Replies)
Discussion started by: flowrats
11 Replies
Login or Register to Ask a Question