![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| If Then Else Logic | jadionne | UNIX for Dummies Questions & Answers | 7 | 11-23-2007 04:27 AM |
| cannot get the logic | dineshr85 | Shell Programming and Scripting | 3 | 10-11-2007 08:34 AM |
| Script doesn't work, but commands inside work | cheongww | UNIX for Dummies Questions & Answers | 2 | 11-14-2006 10:52 PM |
| Automated FTP to variable directory with error check | songtam | UNIX for Dummies Questions & Answers | 3 | 04-10-2006 10:57 AM |
| Status check of Automated FTP | anijog | Shell Programming and Scripting | 5 | 03-04-2004 02:30 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Need logic for check automated Job work in awk or SED.
I have a Java program which will automatically trigger some scheduled job to update Db or some other work. I am tracking the jobs with log messages and finding out it is properly run or not. I want to write a script to capture it correctly on time.
Say Job1 is running on 15, 30, and 45 every hour then it leave an entry in the log file that “JOB1 is started”. Like this. Example for hour 11:00 pm means – Worker#Scheduler_Worker-3: 23:15:56 105 SendToCM: run() Entry where “SendToCM: run() Entry” starting log message which Java program write in the log message, '23:15:56' is the time . I need to check the last hour 15 , 30, 45 min log files to find out the entry is their or not then I intimate via mail to me. i have a logic but not tested yet. For 15 min I am checking with sed like this, sed -n "/: $h:15:00/,/: $h:15:01/p" schedulerTrace .log > Job1.log here $h contains the current hour and in the job1.log I’m checking again like count=grep –c “SendToCM: run() Entry” Job1.log. if count is zero then the JOB1 is not ran and I need to check exception. But this logic is very oblique to me. Could you me please help me on finding out a correct logic for this. Regards, Senthilkumar. |
| Bookmarks |
| Tags |
| awk, grep or, sed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|