Script error monitoring


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script error monitoring
# 1  
Old 09-01-2010
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  
Old 09-01-2010
Not sure if there is a special logging directory for all. but for each entery in cron you will have the specific log file attached. you can check that.

Code:
crontab -e

will display all the entries in the crontab and you can also see where the log is being stored.
# 3  
Old 09-01-2010
By default cron will send email to the user with "the output of the command." The man page makes no indication as to whether or not this includes stderr or is just stdout (I'd guess it's both, but I wouldn't be surprised if the flavour of UNIX doesn't make a difference too)

Personally, I always redirect my cron outputs to a known location, even if the script that is being executed immediately opens different stdout/err files.

Code:
* 10 * * * * /home/user/scooter/bin/somescript >>/usr2/logs/somescript.clog 2>&1

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

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

4. 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

5. 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="admin@mydomain.com" 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

6. Shell Programming and Scripting

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... (0 Replies)
Discussion started by: shijoe
0 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 monitortest1.sh 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