It is currently Mon, 25 Sep 2023 10:24:50 GMT



 
Author Message
 Needfull Things: script that monitors a sap log file for specific words
I am after a script that monitors a sap log file for specific words like
"spool full" or "user logged".  If these words are added to the
log file then I need the next word mailed to me as this usually means
there is a problem on a machine

Does anyone have any examples or ideas?



 Sat, 29 Apr 2006 00:42:03 GMT   
 Needfull Things: script that monitors a sap log file for specific words

#!/bin/ksh

tail -f log_file |

egrep 'spool full|user logged' |
while IFS= read -r line; do
   print -r "$line" | mailx -s "Alert: $line" someone@somewhere
done

--
Kevin Rodgers



 Sat, 29 Apr 2006 01:08:24 GMT   
 Needfull Things: script that monitors a sap log file for specific words

man grep
man mail mailx nail

--
William Park, Open Geometry Consulting, <opengeome...@yahoo.ca>
Linux solution for data management and processing.



 Sat, 29 Apr 2006 04:13:13 GMT   
 Needfull Things: script that monitors a sap log file for specific words
Hi Thanks a lot for your help..

I will check the skipt

bye



 Sat, 29 Apr 2006 20:43:38 GMT   
 Needfull Things: script that monitors a sap log file for specific words

'apt-get install logcheck' and write the rules you need.



 Sun, 30 Apr 2006 18:33:07 GMT   
 
   [ 5 post ] 

Similar Threads

1. Needfull Things: after a script that monitors a sap log file for specific words

2. Find and replace specific word in file

3. How to substitute a specific word in text files

4. Check file for specific words

5. Script to Monitor Specific FIel system and send alert

6. how to monitor a specific file ?

7. How to get DHCPd to log to a specific file

8. Log file gzipping and numbering thing

9. Ignore specific hosts in log files ?

10. some things in my messags log file making me queasy


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software