![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cron job starts new cron proccess | ron76 | SUN Solaris | 3 | 05-11-2008 10:07 PM |
| filtering the logs | prvnrk | Shell Programming and Scripting | 5 | 04-08-2008 06:57 PM |
| Cron and Pseudo-Cron | dingusmcghee | UNIX for Dummies Questions & Answers | 1 | 01-31-2008 09:58 AM |
| CRON usage for CRON job | skyineyes | UNIX for Dummies Questions & Answers | 1 | 01-17-2008 07:17 AM |
| /etc/cronlog.conf not working | chosie | AIX | 4 | 05-31-2005 01:48 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I can use 'crontabs –e' and do all the scheduling I like. However I would like to auto send myself just the cronjobs logs that fail. That is to say the PIDs that fail and the related lines with those PID’s only. (Not the full set of logs) Has anyone done this work? Or does an AIX 5.3 tool exists that will do this for me? If not I was thinking this could be a nice tool to use 'awk,' but I am not the best at 'awk.' I'm just a hack. My current filter* only sends me logs when I have errors but it gives me the full set of data at that time, and I have to search for Fail. I copy my file to a tmp and clean up when done. Then I have my rotation set just rigt so I do not spam myself with dup data. PS I have read man for the cron/crontab commands + others and have not seen anything like this yet. tia Keith * cronfile="/var/adm/cron/log" tmp="/tmp/cron.tmp.log" # COPY CRON FILE LOG TO TEMP TO SEND IN EMAIL LATER cp -p $cronfile $tmp #FILTER if [[ $(cat $tmp | grep Fail | wc -l) > "1" ]] then subject=$(print "Daily cron log $(date)" | tr ' ' '-') uuencode $tmp $tmp | mail -s $subject $USER < $tmp #end filter fi sleep 5;[[ -e $tmp ]] && rm $tmp Last edited by Keith Johnson; 01-10-2008 at 08:37 AM. |
|||
| Google The UNIX and Linux Forums |
| Forum Sponsor | ||
|
|