Help with Capturing time from Autosys logs


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Help with Capturing time from Autosys logs
# 1  
Old 03-12-2017
Computer Help with Capturing time from Autosys logs

Hi Guys, I'm very new to Shell scripting and have to design a code which I'm not able to find a way to. I will try to explain the aim in detail and shall be obliged if anyone could help me with the coding snippet.
I have an input file who's every row has a few details about an autosys Job. I shall write down the first entry of the file so that should give an idea :-

Code:
1,,Task Name,Application Name,Frequency of Job,expected starting Date and Time(2017-03-14 01:00 AM), Box Job name, Command Job Name

So in each row of the file there is a command Job name, for which there is an expected starting date and time in the input file itself. These two things are given in the input file itself. I have to now extract the latest log of this command job, from it's header extract the start time and compare it with the expected start date and time in the input file, if the extracted date and time from the log are greater than the expected one, it is indeed the log for that day and not a previous log. Also, the time in the log is of 24 hour format and the one in the input file is 12 hour.
Furthermore, for every row, after doing the above analysis, I have to add two more columns which are completion time if it is has completed and the current status of the Job i.e Scheduled, Running, Completed and failed.
If the Job has completed or failed, the log's last line shows "++++COMPLETED++++" or "++++FAILED++++" so maybe that can be used.

Please help me in coding the above scenario. Any assistance shall be of great help. Please help guys!!



Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 03-12-2017 at 05:31 PM.. Reason: Added CODE tags.
# 2  
Old 03-12-2017
Welcome to the forum.

To put people in a position to decently help you, a clear and precise specification of the problem is absolutely compulsory, including OS version, problem description, input sample, desired output, and preferred tools (like awk, sed, shell script, else).

Looking at your above post, only a fraction of these is supplied. We find one (of two) input file's structure (NO data!) - that's it. Wildly guessing, we could propose sth. that might do what we feel is what you request, but chances are small we hit the bull's eye.

Why don't you start over and supply a decent spec?

Last edited by RudiC; 03-12-2017 at 06:00 PM..
This User Gave Thanks to RudiC For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script for capturing FTP logs

I have a script #!/bin/bash HOST=ftp.example.com USER=ftpuser PASSWORD=P@ssw0rd ftp -inv $HOST <<EOF user $USER $PASSWORD cd /path/to/file mput *.html bye EOF the script executes sucessfully I need to capture the FTP logs to a logfile should contain FTP Login successful ... (1 Reply)
Discussion started by: rajeshas83
1 Replies

2. Shell Programming and Scripting

Help in capturing Time from Autosys Logs

Hi Guys, I'm very new to Shell scripting and have to design a code which I'm not able to find a way to. I will try to explain the aim in detail and shall be obliged if anyone could help me with the coding snippet. I have an input file who's every row has a few details about an autosys Job. I shall... (0 Replies)
Discussion started by: Crusnik02
0 Replies

3. Shell Programming and Scripting

Capturing time stamp in file name

I have a file that is created via a perl script where the file is named like so: 01-07-2016_10:17:08. I am running a shell script that needs to take this file and print it. I can capture the date portion fine, but I am unsure how to capture the time stamp, since there will be a difference from what... (1 Reply)
Discussion started by: ldorsey
1 Replies

4. Shell Programming and Scripting

Capturing the killed process logs

I have two set of questions. 1) To skip killing some process automatically. 2) To kill other process and capture their log. I have set of process, some needs to be killed gracefully and others should be skipped. Listed are the process. adm 1522... (1 Reply)
Discussion started by: murali1687
1 Replies

5. Emergency UNIX and Linux Support

Capturing console (/dev/ttyS1) logs

Hi, I have been trying to capture console logs from the init script. When the ramfs is mounted, i check if usb is connected , if conncted, i mount it and redirected the console logs like so: cat & /dev/ttyS1 >> /mnt/logs.txt I'm getting /bin/sh : /dev/ttyS1 :permission denied ... (8 Replies)
Discussion started by: xerox
8 Replies

6. Shell Programming and Scripting

Capturing FTP logs

Hi Guys, I am trying to capture the FTP Logs in a log file. I am using the below code. ftp -d -n -v $Remote_Host << EOD > $Ftp_LOG; Since iam running the script in debug mode, i am able to see that the ftp is done and the file has been transferred. But the log file does not have... (7 Replies)
Discussion started by: mac4rfree
7 Replies

7. UNIX for Dummies Questions & Answers

capturing real time

Newbie question: I wrote korn shell script that lets me connect to a cisco switch thru telnet from sun server. I'm wodering if or what command i would use to capture info that is being sent to standard output when the script is running. Putting part of my script below and results. #!/bin/ksh... (2 Replies)
Discussion started by: wisher115
2 Replies

8. UNIX for Dummies Questions & Answers

capturing the time stamp to get hours

Hi All, I am working on a korn shell script. I have a problem.i am calculating the next 27 hours from the time stamp. say TSTAMP=20060724000000 if i add 27 hours to the above time stamp, i will get 20060724143000 this is the code: YEAR=`echo $TSTAMP | awk... (0 Replies)
Discussion started by: pavan_test
0 Replies

9. UNIX for Dummies Questions & Answers

capturing the time stamp

Hi All, I am working on a korn shell script. i have a file such as: DS.PETSCO.20060601203514.20060531.ctl_20060717124431 i have 2 problems here. 1) i have to capture the time stamp from the above file i.e this number 20060717124431. format of time stamp is YYYYMMDDHHMMSS. can... (4 Replies)
Discussion started by: pavan_test
4 Replies
Login or Register to Ask a Question