![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| server monitor script... | zedex | Shell Programming and Scripting | 1 | 06-01-2008 04:10 PM |
| script execute or no execute | Kespinoza97 | Shell Programming and Scripting | 4 | 06-23-2007 09:27 AM |
| need help doing a script to monitor if files are go through | jonathan184 | Shell Programming and Scripting | 0 | 05-15-2007 11:47 AM |
| load monitor script | locabuilt | UNIX for Advanced & Expert Users | 7 | 01-19-2007 02:37 PM |
| Hep with script to monitor directory | cmf00186 | UNIX for Dummies Questions & Answers | 2 | 10-25-2006 02:42 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
script to monitor partition cant execute
Hi...
I'm trying to run this script by using cronjob but it doesnt work. The purpose of this script is to monitor my oracle database partition when the size is less than 1gb, the script will trigger an email to my email address to alert about partition size ------------------------------------------------------------------------- check_filesystem_size.ksh ------------------------------------------------------------------------- #!/bin/ksh for i in `df -k|grep /u0|awk '{ print $4 }'` do # Convert the file size to a numeric value filesize=`expr i` # If any filesystem has less than 1000k, issue an alert if [ $filesize -lt 1000 ] then mailx -s "Oracle filesystem $i has less than 1000k free."\ adzuan@nc.com.my fi done ---------------------------------------------------------------------- Crontab line: 0 0 * * * /ek_ora/script/check_filesystem_size.ksh > dev/null >&1 ---------------------------------------------------------------------- The error from /var/mail/oracle Your "cron" job on jupm-wp11 /ek_ora/script/check_oracle_filesystem.ksh > /dev/null >&1 produced the following output: sh: /ek_ora/script/check_oracle_filesystem.ksh: not found ----------------------------------------------------------------------- Can anybody tell me why the script doesnt work?? Last edited by adzuanamir; 06-25-2008 at 12:43 AM.. |
|
||||
|
hi Duke
i changed to expr $i i run the script like this : ---------------------------------------- bash-3.00$ set -xv bash-3.00$ ./check_oracle_filesystem.ksh ./check_oracle_filesystem.ksh + ./check_oracle_filesystem.ksh ---------------------------------------- it just hung.... |
|
||||
|
Hi There
Yeah my bad at the crontab I just change the value to the right file name at the crontab But although i run manually, still got error: ---------------------------------------------------------------------- -bash-3.00$ sh -x ./ek_ora/script/check_oracle_filesystem.ksh > a.out + + df -k awk { print $4 } + grep /ek_ + expr 0 filesize=0 + [ 0 -lt 100 ] + mailx -s Oracle filesystem 0 has less than 100k free. adzuan@nc.com.my --------------------------------------------------------------------- The script is just hung there.... |
|
||||
|
Hi csenewbie
First, i'm not very familiar with the mailx command either its right or not. Kindly can u give me the right command in order to run mailx command successfully. I'll test this first. |
| Sponsored Links | ||
|
|