![]() |
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 |
| 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 |
| invoking a shell script inside cgi shell script | smriti_shridhar | Shell Programming and Scripting | 2 | 07-09-2008 01:50 AM |
| Accessing variables of one shell script in another shell script | looza | Shell Programming and Scripting | 2 | 06-30-2008 07:13 PM |
| How to pass a parameter from one Shell-script to another Shell-script | subodhbansal | Shell Programming and Scripting | 2 | 09-22-2007 05:19 AM |
| How to Run a shell script from Perl script in Parent shell? | hifake | Shell Programming and Scripting | 16 | 08-28-2007 08:42 PM |
| Have a shell script call another shell script and exit | heprox | Shell Programming and Scripting | 2 | 11-20-2006 08:17 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
shell script -- need help
check all the file system if any file system is using above 80% space then an automatic mail with all mount point details send to abc@yahoo.com on each monday at 5:30pm.Please help me on this script.
Thanks in advance Rohit |
|
||||
|
Hi ,
I use df then I found that kind of filesystem.Please look into it. [efare@e1dsgalnggf10] $ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 2747140 417256 2190336 17% / /dev/sda1 175900 16085 150733 10% /boot none 16637248 0 16637248 0% /dev/shm /dev/sda9 14167456 4996728 8451044 38% /home /dev/sda6 3752552 1372648 2189280 39% /opt /dev/sda8 1832060 54520 1684476 4% /tmp /dev/sda5 4580244 2299052 2048528 53% /usr /dev/sda7 3668032 2625440 856264 76% /var ecmcc03:/ecmvobstore 31260672 16519168 14741504 53% /ecmvobstore ecmcc04:/vwsstg 103001368 29822408 67946736 31% /vwsstg e1dsgalnggfns01:/vol/dev_logstats 75157224 39457656 35699568 53% /dev_logstats e1dsgalnggfns02:/vol/dev_tools 288102672 251549088 36553584 88% /dev_tools e1dfgalnggfns02:/vol/dev_tools/LINUXMTP-4 288102672 251549088 36553584 88% /dev_tools/MTP e1dfgalnggfns02:/vol/dev_tools/LOCAL4-T2 288102672 251549088 36553584 88% /usr/local e1dfgalnggfns02:/vol/dev_tools/LOCAL4-T2 288102672 251549088 36553584 88% /dev_tools/efare1/dist/sparc e1dsgalnggfns02:/vol/dev_tools/efare1/dist/sparc/home 288102672 251549088 36553584 88% /dev_tools/efare1/dist/sparc/home /dev/mvfs 2747140 417256 2190336 17% /view /ecmvobstore/scm_scripts.vbs 31260672 16519168 14741504 53% /vob/scm_scripts /ecmvobstore/ctg.vbs 31260672 16519168 14741504 53% /vob/ctg /ecmvobstore/css.vbs 31260672 16519168 14741504 53% /vob/css /ecmvobstore/test_dst.vbs 31260672 16519168 14741504 53% /vob/test_dst /ecmvobstore/efs.vbs 31260672 16519168 14741504 53% /vob/efs e1dsgalnggfns01:/vol/dev_histgold2 3114417528 3027308912 87108616 98% /uefare1/dev_histgold2 e1dsgalnggfns01:/vol/dev_histgold1 3114417528 3035423568 78993960 98% /uefare1/dev_histgold1 Is this script run on this output.Beacuse mailsent when it is above 80%. Last edited by rohit22hamirpur; 11-26-2008 at 06:34 PM.. Reason: clarify more |
|
||||
|
Hi,
please try this flag=0 touch /tmp/testaja.txt bdf|awk '{print $5" "$6}'|while read output; do persen=$(echo $output |awk -F "%" '{print $1}') dir=$(echo $output |awk '{print $2}') if [ $persen -gt 80 ]; then echo "$dir $persen" >> /tmp/testaja.txt flag=1 fi done if [ $flag -eq 1]; then mail yourmail@somewhere.com < /tmp/testaja.txt fi thanks |
|
||||
|
Hi Adhit,
I will try this script. Thanks in advance- Rohit Last edited by rohit22hamirpur; 12-03-2008 at 07:06 PM.. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| shell script, shell scripting, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|