Error Monitoring script

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Error Monitoring script
# 1  
Old 11-04-2009
Error Monitoring script

I am runing a monly script in solaris server. If there is any error thrown by the script can be logged in the log. However we cannot open and trace the log every time. We need the monitor script which monitors log or scritpt, if it find some errors, it should shoot out a mail to me.
I have script which shoot out the email at the end of the script.I have written the script at the end of script.But I need the script which needs to monitor the log file or script directly if it grep of find any error in the log or script, immediately it should send a mail to me.
Please assit me to write this script.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

ldapsearch in monitoring script without bind password written in script

Hi I do a very simple monitoring of our OpenLDAP (runs in cronjob and generate alerts if unsuccessfull) $ ldapsearch -h hostname.domain -D "cn=monitor_user,ou=People,dc=organisation" -w "password" -b "dc=organisation" -x "(&(cn=monitor_user)(ou=People))" dn | grep -v version dn:... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

2. Red Hat

monitoring script

Hi, I ned to monitor the memory for the red-hat machine,when its reaches a threshold value like 2GB then a mail should be sent as soon as it finds the the value is met can you suggest me which is the best way to do this? (2 Replies)
Discussion started by: sriniv666
2 Replies

3. Shell Programming and Scripting

Script error monitoring

Hi I need to know will there be any location in unix(solaris) if any scripts under the cron fails will it be stored anywhere? (2 Replies)
Discussion started by: mskalyani
2 Replies

4. Shell Programming and Scripting

Monitoring script

Hi, I want to write script that monitors particular ports in a server. I completed the script but.... If the server is restarted i need manually start the script.. Is there any way i can make the script start by it self after the server reboot........ Thanks, Firestar (4 Replies)
Discussion started by: firestar
4 Replies

5. Shell Programming and Scripting

Help with Monitoring script

Hi Gurus, Currently I am learning UNIX through online forums and unix blogs. I have the below requirement. I need to write a script to monitor server processes. For example, there are 3 processes currently running on the server.(java, pmrepagent, pmserver). If any of the process goes down,... (2 Replies)
Discussion started by: svajhala
2 Replies

6. Fedora

"integer expression expected" error with drive space monitoring script

Hi guys, I am still kinda new to Linux. Script template I found on the net and adapted for our environment: #!/bin/sh #set -x ADMIN="" ALERT=10 df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do #echo $output ... (2 Replies)
Discussion started by: wbdevilliers
2 Replies

7. Shell Programming and Scripting

Error in script to automate the daily monitoring process of UNIX server and it's proc

hi friends, I am trying to automate the daily monitoring process of UNIX server and it's processes. the script are below i executed the above script using ksh -x in root login . It shows error at some lines . 1. i logged in using root ,but it... (8 Replies)
Discussion started by: rdhaprakasam
8 Replies

8. Shell Programming and Scripting

IP Monitoring Script

Dear All, I am new to Shell Programming, but I need a script which will monitor the different IP's in the live logs. Condition:- The script will monitor the logs continously and should print only those IP's which exists more than 3 times per day. Please do help me. Thanks and... (1 Reply)
Discussion started by: akhtar.bhat
1 Replies

9. Solaris

Monitoring Script

Hi, I want to write a script that will monitor cpu,mem usage and disk usage for entire day and data will be redirected to file, (4 Replies)
Discussion started by: manoj.solaris
4 Replies

10. UNIX for Advanced & Expert Users

monitoring script

i have a unix batch written in c, dealing with really time-consuming database operations i want to write a ksh script to monitor its performance. which items i should monitor? do you have any suggestions? 1)cputime 2)swap area 3)pmem 4) 5) what else? (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies
Login or Register to Ask a Question
SCRIPT(1)						    BSD General Commands Manual 						 SCRIPT(1)

script -- make typescript of terminal session SYNOPSIS
script [-akq] [-t time] [file [command ...]] DESCRIPTION
The script utility makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1). If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript. If the argument command is given, script will run the specified command with an optional argument vector instead of an interactive shell. The following options are available: -a Append the output to file or typescript, retaining the prior contents. -k Log keys sent to program as well as output. -q Run in quiet mode, omit the start and stop status messages. -t time Specify time interval between flushing script output file. A value of 0 causes script to flush for every character I/O event. The default interval is 30 seconds. The script ends when the forked shell (or command) exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-D (if ignoreeof is not set) for the C-shell, csh(1)). Certain interactive commands, such as vi(1), create garbage in the typescript file. The script utility works best with commands that do not manipulate the screen. The results are meant to emulate a hardcopy terminal, not an addressable one. ENVIRONMENT
The following environment variable is utilized by script: SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed. (Most shells set this variable automatically). SEE ALSO
csh(1) (for the history mechanism). HISTORY
The script command appeared in 3.0BSD. BUGS
The script utility places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects. It is not possible to specify a command without also naming the script file because of argument parsing compatibility issues. When running in -k mode, echo cancelling is far from ideal. The slave terminal mode is checked for ECHO mode to check when to avoid manual echo logging. This does not work when in a raw mode where the program being run is doing manual echo. BSD
January 22, 2004 BSD

Featured Tech Videos