![]() |
|
|
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 |
| Not able to compile Pro*c file due - give errors and points to /usr/include/.. file | shafi2all | High Level Programming | 0 | 05-09-2008 03:27 AM |
| How to track the modification history on file in unix | RSPDaemon | UNIX for Dummies Questions & Answers | 5 | 03-28-2008 02:39 AM |
| Keep track of file name completions with Viewglob | iBot | UNIX and Linux RSS News | 0 | 02-21-2008 05:30 AM |
| Possible to track FTP user last login? Last and Finger don't track them. | LordJezo | UNIX for Dummies Questions & Answers | 1 | 11-08-2007 01:21 PM |
| File I/O ERRORS.. PLS HELP.. | SwetaShah | High Level Programming | 0 | 09-26-2005 04:44 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
OS: SuSE Linux Enterprise Server 10 Goal: To track the errors in log file, If they exits users will be notify by email. We have a script below: Code:
SrchKey="SRVE0242I:" LogFile=/PATHtemOut.log MailTo="DN@mail.com http:// ! -f PATH/alert.last && touch PATH/alert.last egrep $SrchKey $LogFile > PATH/alert.new if http:// -s PATH/alert.new ;then diff PATH/alert.new PATH/alert.last > PATH/alert.msg cp PATH/alert.new PATH/alert.last http:// -s PATH/alert.msg && mailx -v -s "$SrchKey Alert" $MailTo < PATH/alert.msg else echo "Nothing to report, sir." | mailx -s "No Alert Today" ${MailTo} fi OUT PUT: Received email Subject:SRVE0242I: Alert Message: "1d0 < Binary file /PATH/log/SystemOut.log matches" 1) We have multiple error messages, how to add more messages in the script? 2) If one of the message does not exits we should receive message for other existing error code or messages. thanks D Last edited by Franklin52; 05-22-2009 at 06:59 AM.. Reason: adding code tags |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|