<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Shell script to watch the disk space</title> <atom:link href="http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Amer Siddique</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-178259</link> <dc:creator>Amer Siddique</dc:creator> <pubDate>Mon, 09 Jan 2012 11:35:02 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-178259</guid> <description>This script is working fine
&lt;pre&gt;
#!/bin/sh
df -H &#124; grep -vE &#039;^Filesystem&#124;tmpfs&#124;cdrom&#039; &#124; awk &#039;{ print $5 &quot; &quot; $6 }&#039; &#124; while read output;
do
echo $output
usep=$(echo $output &#124; awk &#039;{ print $1}&#039; &#124; cut -d&#039;%&#039; -f1  )
echo $usep
partition=$(echo $output &#124; awk &#039;{ print $2 }&#039; )
if [ $usep -ge 90 ]; then
echo &quot;Running out of space \&quot;$partition ($usep%)\&quot; on $(hostname) as on $(date) :  $usep%&quot; &#124;
mail -s &quot;Alert: Critical Almost out of disk space $partition $usep%&quot;
Someone@email.com  fi
if [ $usep -ge 85 ]; then
echo &quot;Running out of space \&quot;$partition ($usep%)\&quot; on $(hostname) as on $(date) :  $usep%&quot; &#124;
mail -s &quot;Alert: Warning Almost out of disk space $partition $usep%&quot; amer.siddique@bskyb.com
fi
done
&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>This script is working fine</p><pre>
#!/bin/sh
df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $6 }' | while read output;
do
  echo $output
  usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1  )
  echo $usep
  partition=$(echo $output | awk '{ print $2 }' )
  if [ $usep -ge 90 ]; then
    echo "Running out of space \"$partition ($usep%)\" on $(hostname) as on $(date) :  $usep%" |
     mail -s "Alert: Critical Almost out of disk space $partition $usep%"
<a href="mailto:Someone@email.com">Someone@email.com</a>  fi
 if [ $usep -ge 85 ]; then
    echo "Running out of space \"$partition ($usep%)\" on $(hostname) as on $(date) :  $usep%" |
     mail -s "Alert: Warning Almost out of disk space $partition $usep%" <a href="mailto:amer.siddique@bskyb.com">amer.siddique@bskyb.com</a>
  fi
done
</pre>]]></content:encoded> </item> <item><title>By: stainless</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-178210</link> <dc:creator>stainless</dc:creator> <pubDate>Sun, 08 Jan 2012 16:07:47 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-178210</guid> <description>Ok this is the slightly modified version, tested and working on different versions of linux ...Enjoy!
#!/bin/bash
&gt; alert.txt
HOST=$(hostname)
THRES=20
COUNT=1
df -HP &#124; grep -vE &#039;Filesystem&#124;tmpfs&#039; &#124; awk &#039;{ print $5 &quot; &quot; $6 }&#039; &#124;
while read space;
do
DISK=$(echo $space &#124; cut -d &quot;%&quot; -f1)
DRIVENAME=$(echo $space &#124; cut -d &quot; &quot; -f2)
if [ &quot;$DISK&quot; -ge &quot;$THRES&quot; ]
then
echo You have used &quot;$DISK&quot;% on drive &quot;$DRIVENAME&quot; on server &quot;$HOST&quot; &gt;&gt;alert.txt
fi
done
echo alert.txt &#124; mail -s &quot;Disk space Alert on server $HOST&quot; root</description> <content:encoded><![CDATA[<p>Ok this is the slightly modified version, tested and working on different versions of linux &#8230;Enjoy!</p><p>#!/bin/bash</p><p>&gt; alert.txt</p><p>HOST=$(hostname)</p><p>THRES=20</p><p>COUNT=1</p><p>df -HP | grep -vE &#8216;Filesystem|tmpfs&#8217; | awk &#8216;{ print $5 &#8221; &#8221; $6 }&#8217; |<br
/> while read space;</p><p>do</p><p>DISK=$(echo $space | cut -d &#8220;%&#8221; -f1)<br
/> DRIVENAME=$(echo $space | cut -d &#8221; &#8221; -f2)</p><p> if [ "$DISK" -ge "$THRES" ]</p><p> then</p><p> echo You have used &#8220;$DISK&#8221;% on drive &#8220;$DRIVENAME&#8221; on server &#8220;$HOST&#8221; &gt;&gt;alert.txt</p><p> fi</p><p>done<br
/> echo alert.txt | mail -s &#8220;Disk space Alert on server $HOST&#8221; root</p> ]]></content:encoded> </item> <item><title>By: pk</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-173616</link> <dc:creator>pk</dc:creator> <pubDate>Sun, 28 Aug 2011 16:07:47 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-173616</guid> <description>I need to know the the usage of particular filesystem on 10 days back. Is it possible to use two or more df option in single line? If yes then how can we use twp grep statement in single line? Thanks in advance !!
I used below line:df -H &#124; grep d30 &#124; awk &#039;{print $5 &quot; &quot; $1}&#039; &#124; main_prog
But it is not sending any email.</description> <content:encoded><![CDATA[<p>I need to know the the usage of particular filesystem on 10 days back. Is it possible to use two or more df option in single line? If yes then how can we use twp grep statement in single line? Thanks in advance !!</p><p>I used below line:df -H | grep d30 | awk &#8216;{print $5 &#8221; &#8221; $1}&#8217; | main_prog</p><p>But it is not sending any email.</p> ]]></content:encoded> </item> <item><title>By: romsieze</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-172844</link> <dc:creator>romsieze</dc:creator> <pubDate>Thu, 28 Jul 2011 17:52:28 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-172844</guid> <description>OP- You rock. You saved my arse this time around.....</description> <content:encoded><![CDATA[<p>OP- You rock. You saved my arse this time around&#8230;..</p> ]]></content:encoded> </item> <item><title>By: Juan Nicolas</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-172334</link> <dc:creator>Juan Nicolas</dc:creator> <pubDate>Fri, 08 Jul 2011 05:55:31 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-172334</guid> <description>Great script, very simple and works like a charm. i have a question tho, could someone help me to make this script to run a gzip command and monitor the pid in order to start another gzip after the first pid ends? Is it possible to do that, well, in scripts all is possible :)
I need to run 2 gzips on differents directories but can&#039;t run them at the same time since this will eat my cpu and the disk IO will be very high. I need to start one and then the other. Thanks in advance</description> <content:encoded><![CDATA[<p>Great script, very simple and works like a charm. i have a question tho, could someone help me to make this script to run a gzip command and monitor the pid in order to start another gzip after the first pid ends? Is it possible to do that, well, in scripts all is possible :)</p><p>I need to run 2 gzips on differents directories but can&#8217;t run them at the same time since this will eat my cpu and the disk IO will be very high. I need to start one and then the other. Thanks in advance</p> ]]></content:encoded> </item> <item><title>By: BABU</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-171990</link> <dc:creator>BABU</dc:creator> <pubDate>Fri, 17 Jun 2011 12:01:15 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-171990</guid> <description>Please provide me rhe query for solaris and HP-UX and IBM-AIX
Very urgent  please</description> <content:encoded><![CDATA[<p>Please provide me rhe query for solaris and HP-UX and IBM-AIX</p><p>Very urgent  please</p> ]]></content:encoded> </item> <item><title>By: Stefan</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-171809</link> <dc:creator>Stefan</dc:creator> <pubDate>Wed, 08 Jun 2011 20:00:57 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-171809</guid> <description>to remove non-local drives it would be better so use the &quot;-l&quot; option of df (substitute &quot;df -H&quot; with &quot;df -lH&quot;).</description> <content:encoded><![CDATA[<p>to remove non-local drives it would be better so use the &#8220;-l&#8221; option of df (substitute &#8220;df -H&#8221; with &#8220;df -lH&#8221;).</p> ]]></content:encoded> </item> <item><title>By: Stefan</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-171808</link> <dc:creator>Stefan</dc:creator> <pubDate>Wed, 08 Jun 2011 19:38:58 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-171808</guid> <description>One reason for &quot;integer expression expected&quot;-errors is that if &quot;$usep&quot; is empty the test fails. Just test if &quot;$usep&quot; is empty and do nothing if so:
&lt;strong&gt;if [ ! &quot;$usep&quot; == &quot;&quot; ] ; then&lt;/strong&gt;
if [ $usep -ge $ALERT ] ; then
echo &quot;Running out of space \&quot;$partition ($usep%)\&quot; on server $(hostname), $(date)&quot; &#124; \
mail -s &quot;Alert: $(hostname) almost out of disk space $usep%&quot; $ADMIN
fi
&lt;/strong&gt; fi&lt;/strong&gt;</description> <content:encoded><![CDATA[<p>One reason for &#8220;integer expression expected&#8221;-errors is that if &#8220;$usep&#8221; is empty the test fails. Just test if &#8220;$usep&#8221; is empty and do nothing if so:</p><p><strong>if [ ! "$usep" == "" ] ; then</strong><br
/> if [ $usep -ge $ALERT ] ; then<br
/> echo &#8220;Running out of space \&#8221;$partition ($usep%)\&#8221; on server $(hostname), $(date)&#8221; | \<br
/> mail -s &#8220;Alert: $(hostname) almost out of disk space $usep%&#8221; $ADMIN<br
/> fi<br
/> fi</p> ]]></content:encoded> </item> <item><title>By: hypersmil</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-170716</link> <dc:creator>hypersmil</dc:creator> <pubDate>Wed, 20 Apr 2011 09:41:56 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-170716</guid> <description>there are some issues with this script
- it won&#039;t work with non english output from df
&lt;pre&gt;
Dateisystem             Size   Used  Avail Use% Eingehängt auf
/dev/sda1              9,9G   3,3G   6,1G  35% /
none                    17G   213k    17G   1% /dev
none                    17G      0    17G   0% /dev/shm
none                    17G   103k    17G   1% /var/run
none                    17G      0    17G   0% /var/lock
none                   9,9G   3,3G   6,1G  35% /var/lib/ureadahead/debugfs
/dev/sda2               64G    17G    48G  26% /usr/local
/dev/md0               147G    43G   105G  29% /mnt
/dev/sde1              400G   203G   198G  51% /mnt/usbdisk
&lt;/pre&gt;
change &lt;pre&gt;
grep -vE &quot;^Filesystem&#124;tmpfs&#124;cdrom&quot;
&lt;/pre&gt;
to &lt;pre&gt;
grep -vE &quot;^Dateisystem&#124;tmpfs&#124;cdrom&quot;
&lt;/pre&gt;
or you could change it to &lt;pre&gt;
grep -vE &quot;^[^/]&#124;tmpfs&#124;cdrom&quot;
&lt;/pre&gt;
to remove all lines not starting with a / which would also remove mounted network shares (sshfs, nfs etc.)
additionally you could change the df command to
&lt;pre&gt;
df -hP fuse.sshfs -x nfs
&lt;/pre&gt;
to remove mounted network devices
another problem arises from the use of &quot;sh&quot; instead of bash -
it won&#039;t work -
change the first line to &lt;pre&gt;
#!/bin/bash
&lt;/pre&gt;
to improve the error reporting you could also add the hostname to the subject line
&lt;pre&gt;
mail -s &quot;Alert: $(hostname) almost out of disk space $usep%&quot; $ADMIN
&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>there are some issues with this script</p><p>- it won&#8217;t work with non english output from df</p><pre>
Dateisystem             Size   Used  Avail Use% Eingehängt auf
/dev/sda1              9,9G   3,3G   6,1G  35% /
none                    17G   213k    17G   1% /dev
none                    17G      0    17G   0% /dev/shm
none                    17G   103k    17G   1% /var/run
none                    17G      0    17G   0% /var/lock
none                   9,9G   3,3G   6,1G  35% /var/lib/ureadahead/debugfs
/dev/sda2               64G    17G    48G  26% /usr/local
/dev/md0               147G    43G   105G  29% /mnt
/dev/sde1              400G   203G   198G  51% /mnt/usbdisk
</pre><p>change<pre>
    grep -vE "^Filesystem|tmpfs|cdrom"
</pre><p>to<pre>
    grep -vE "^Dateisystem|tmpfs|cdrom"
</pre><p>or you could change it to<pre>
  grep -vE "^[^/]|tmpfs|cdrom"
</pre><p>to remove all lines not starting with a / which would also remove mounted network shares (sshfs, nfs etc.)</p><p>additionally you could change the df command to</p><pre>
  df -hP fuse.sshfs -x nfs
</pre><p>to remove mounted network devices</p><p>another problem arises from the use of &#8220;sh&#8221; instead of bash &#8211;<br
/> it won&#8217;t work -<br
/> change the first line to<pre>
#!/bin/bash
</pre><p>to improve the error reporting you could also add the hostname to the subject line</p><pre>
mail -s "Alert: $(hostname) almost out of disk space $usep%" $ADMIN
</pre>]]></content:encoded> </item> <item><title>By: Sri</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-170558</link> <dc:creator>Sri</dc:creator> <pubDate>Mon, 11 Apr 2011 20:31:17 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-170558</guid> <description>hi
iam getting the below for my shell script for space alert on linus server
/home/oracle/dba/scripts &gt; ./space_alert.sh
./space_alert.sh: line 15: [: /dbbackup: integer expression expected
after that i have user df -HP command to append it .. but iam not able to get the ouput through mail
#!/bin/bash
SENT_TO=&quot;dba-support@marlabs.com&quot;
LOGFILE=/home/oracle/dba/scripts/log/disk_alert.log
ALERT=10
EXCLUDE_LIST=&quot;/dbbackup&quot;
if [ -f ${LOGFILE} ]; then
rm $LOGFILE
fi
df -HP &#124; grep -vE &#039;^Filesystem&#124;tmpfs&#124;cdrom&#124;product&#124;mapper&#039; &#124; awk &#039;{ print $5 &quot; &quot; $6 }&#039; &#124; while read output;
do
usep=$(echo $output &#124; awk &#039;{ print $1}&#039; &#124; cut -d&#039;%&#039; -f1  )
partition=$(echo $output &#124; awk &#039;{ print $2 }&#039; )
if [ $usep -ge $ALERT ]; then
if [ ! -f ${LOGFILE} ]; then
touch $LOGFILE
fi
echo &quot;Running out of space on $partition ($usep%) on $(hostname) as on $(date)&quot; &gt;&gt; ${LOGFILE}
echo &quot;&quot; &gt;&gt; ${LOGFILE}
fi
done
if [ -f ${LOGFILE} ]; then
/bin/mail -s &quot;space_alert.sh - $(hostname) - Almost out of disk space&quot; $SENT_TO &lt; ${LOGFILE}
fi
#rm $LOGFILE
Please help on this
thanks</description> <content:encoded><![CDATA[<p>hi<br
/> iam getting the below for my shell script for space alert on linus server<br
/> /home/oracle/dba/scripts &gt; ./space_alert.sh<br
/> ./space_alert.sh: line 15: [: /dbbackup: integer expression expected</p><p>after that i have user df -HP command to append it .. but iam not able to get the ouput through mail<br
/> #!/bin/bash</p><p>SENT_TO="dba-support@marlabs.com"<br
/> LOGFILE=/home/oracle/dba/scripts/log/disk_alert.log<br
/> ALERT=10<br
/> EXCLUDE_LIST="/dbbackup"<br
/> if [ -f ${LOGFILE} ]; then<br
/> rm $LOGFILE<br
/> fi</p><p>df -HP | grep -vE &#8216;^Filesystem|tmpfs|cdrom|product|mapper&#8217; | awk &#8216;{ print $5 &#8221; &#8221; $6 }&#8217; | while read output;<br
/> do<br
/> usep=$(echo $output | awk &#8216;{ print $1}&#8217; | cut -d&#8217;%&#8217; -f1  )<br
/> partition=$(echo $output | awk &#8216;{ print $2 }&#8217; )<br
/> if [ $usep -ge $ALERT ]; then<br
/> if [ ! -f ${LOGFILE} ]; then<br
/> touch $LOGFILE<br
/> fi<br
/> echo &#8220;Running out of space on $partition ($usep%) on $(hostname) as on $(date)&#8221; &gt;&gt; ${LOGFILE}<br
/> echo &#8220;&#8221; &gt;&gt; ${LOGFILE}<br
/> fi<br
/> done</p><p>if [ -f ${LOGFILE} ]; then<br
/> /bin/mail -s &#8220;space_alert.sh &#8211; $(hostname) &#8211; Almost out of disk space&#8221; $SENT_TO &lt; ${LOGFILE}<br
/> fi</p><p>#rm $LOGFILE</p><p>Please help on this</p><p>thanks</p> ]]></content:encoded> </item> <item><title>By: charles</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-170433</link> <dc:creator>charles</dc:creator> <pubDate>Fri, 01 Apr 2011 23:49:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-170433</guid> <description>Very nice, with some minor changes it works beautifully!!!
Thanks for helping out the coding-handicapped!</description> <content:encoded><![CDATA[<p>Very nice, with some minor changes it works beautifully!!!<br
/> Thanks for helping out the coding-handicapped!</p> ]]></content:encoded> </item> <item><title>By: swarajsingh</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-169657</link> <dc:creator>swarajsingh</dc:creator> <pubDate>Tue, 08 Mar 2011 14:27:19 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-169657</guid> <description>&lt;pre&gt;#! /bin/sh
clear;
#echo &quot;enter erver no gibe the serer names u want to checkthe space inside&quot;;
a=xldn2094dap;
b=xldn2095dap;
c=xldn1844dap;
d=xldn1845dap;
e=xldn1599vdap;
f=xldn1600vdap;
echo &quot;for server $a&quot;
ssh -q $a  &quot;df -k /sbclocal&quot;;     #df -k /sbcloca--sbclocal is folder where we spaces r checked
echo &quot;               &quot;
echo &quot;for server $b&quot;
ssh -q $b  &quot;df -k /sbclocal&quot;;
echo &quot;            &quot;;
echo &quot;for server $c&quot;
ssh -q $c  &quot;df -k /sbclocal&quot;;
echo &quot;           &quot;;
echo &quot;for server $d&quot;
ssh -q $d  &quot;df -k /sbclocal&quot;;
echo &quot;                   &quot;;
echo &quot;for server $e&quot;
ssh -q $e  &quot;df -k /sbclocal&quot;;
exit;
&lt;/pre&gt;</description> <content:encoded><![CDATA[<pre>#! /bin/sh
clear;
#echo "enter erver no gibe the serer names u want to checkthe space inside";
 a=xldn2094dap;
 b=xldn2095dap;
c=xldn1844dap;
d=xldn1845dap;
e=xldn1599vdap;
 f=xldn1600vdap;
 echo "for server $a"
  ssh -q $a  "df -k /sbclocal";     #df -k /sbcloca--sbclocal is folder where we spaces r checked
echo "               "
 echo "for server $b"
ssh -q $b  "df -k /sbclocal";
echo "            ";
 echo "for server $c"
  ssh -q $c  "df -k /sbclocal";
echo "           ";
 echo "for server $d"
   ssh -q $d  "df -k /sbclocal";
echo "                   ";
echo "for server $e"
 ssh -q $e  "df -k /sbclocal";
exit;
</pre>]]></content:encoded> </item> <item><title>By: souvik</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-161375</link> <dc:creator>souvik</dc:creator> <pubDate>Thu, 18 Nov 2010 13:24:23 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-161375</guid> <description>hi,
the above scripts have been really helpful but can u give me a generalized way of extracting the necessary mount points in different servers. i am avoiding the way to hard code the mount point.
Thanks..</description> <content:encoded><![CDATA[<p>hi,</p><p>the above scripts have been really helpful but can u give me a generalized way of extracting the necessary mount points in different servers. i am avoiding the way to hard code the mount point.</p><p>Thanks..</p> ]]></content:encoded> </item> <item><title>By: Evert Mouw</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-161369</link> <dc:creator>Evert Mouw</dc:creator> <pubDate>Thu, 18 Nov 2010 10:53:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-161369</guid> <description>@broxigar and others:
The syntax error &quot;syntax error: “(” unexpected at “function main_prog() {”&quot; can be solved by using bash instead of sh as script interpreter. So, after the shebang, use /bin/bash or /usr/bin/bash</description> <content:encoded><![CDATA[<p>@broxigar and others:</p><p>The syntax error &#8220;syntax error: “(” unexpected at “function main_prog() {”&#8221; can be solved by using bash instead of sh as script interpreter. So, after the shebang, use /bin/bash or /usr/bin/bash</p> ]]></content:encoded> </item> <item><title>By: Rajesh Thakur</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-160963</link> <dc:creator>Rajesh Thakur</dc:creator> <pubDate>Thu, 11 Nov 2010 09:54:33 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-160963</guid> <description>hi,
i have multiple servers and i am running this script from single server where ssh keys fro all servers are added...
issue: when i run it it throws me multiple mails on the id i specified in the script, if i have 12 linux remote servers thn it will throw 12 mails...i want to get details in one mail..
does anyone has idea abt it please....it will be agreat assistance.
Best wishes,
Rajesh Thakur</description> <content:encoded><![CDATA[<p>hi,<br
/> i have multiple servers and i am running this script from single server where ssh keys fro all servers are added&#8230;<br
/> issue: when i run it it throws me multiple mails on the id i specified in the script, if i have 12 linux remote servers thn it will throw 12 mails&#8230;i want to get details in one mail..</p><p>does anyone has idea abt it please&#8230;.it will be agreat assistance.</p><p>Best wishes,<br
/> Rajesh Thakur</p> ]]></content:encoded> </item> <item><title>By: Brad</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-160634</link> <dc:creator>Brad</dc:creator> <pubDate>Mon, 01 Nov 2010 18:24:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-160634</guid> <description>None of the scripts here work on RHEL5.5.
All of them give errors....</description> <content:encoded><![CDATA[<p>None of the scripts here work on RHEL5.5.</p><p>All of them give errors&#8230;.</p> ]]></content:encoded> </item> <item><title>By: broxigar</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-158992</link> <dc:creator>broxigar</dc:creator> <pubDate>Wed, 18 Aug 2010 13:06:41 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-158992</guid> <description>When I try to run the updated script, on a Ubuntu server, I get an syntax error: &quot;(&quot; unexpected at &quot;function main_prog() {&quot;
What is wrong here?</description> <content:encoded><![CDATA[<p>When I try to run the updated script, on a Ubuntu server, I get an syntax error: &#8220;(&#8221; unexpected at &#8220;function main_prog() {&#8221;</p><p>What is wrong here?</p> ]]></content:encoded> </item> <item><title>By: victor</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-158836</link> <dc:creator>victor</dc:creator> <pubDate>Thu, 12 Aug 2010 09:09:38 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-158836</guid> <description>when I run script on solair 10. It errors
# ./Diskalert.sh
./Diskalert.sh: syntax error at line 21: `usep=$&#039; unexpected
Please help me?
Thank you very much
Best regards,</description> <content:encoded><![CDATA[<p>when I run script on solair 10. It errors<br
/> # ./Diskalert.sh<br
/> ./Diskalert.sh: syntax error at line 21: `usep=$&#8217; unexpected</p><p>Please help me?<br
/> Thank you very much</p><p>Best regards,</p> ]]></content:encoded> </item> <item><title>By: Ramírez</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-156056</link> <dc:creator>Ramírez</dc:creator> <pubDate>Mon, 17 May 2010 14:42:12 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-156056</guid> <description>I&#039;ve made my own bash script for watching free space. Its main feature is that it runs with X and uses pop-ups for warning the user. Please see http://galinux.myftp.org/hdfree/</description> <content:encoded><![CDATA[<p>I&#8217;ve made my own bash script for watching free space. Its main feature is that it runs with X and uses pop-ups for warning the user. Please see <a
href="http://galinux.myftp.org/hdfree/" rel="nofollow">http://galinux.myftp.org/hdfree/</a></p> ]]></content:encoded> </item> <item><title>By: llattan</title><link>http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-156026</link> <dc:creator>llattan</dc:creator> <pubDate>Fri, 14 May 2010 17:28:59 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html#comment-156026</guid> <description>The script doesn&#039;t work when:
1) there is a filesystem with &quot;$&quot; (nfs mounted coming from windows hidden shares)
i.e //10.10.10.10/back$
2) the name of a filesystem is large and the percentage of use appears in another line
i.e.
//10.10.10.10/verylongnamefilesystem
78140128  45746488  32393640  59% /mnt/
Regards.</description> <content:encoded><![CDATA[<p>The script doesn&#8217;t work when:</p><p>1) there is a filesystem with &#8220;$&#8221; (nfs mounted coming from windows hidden shares)</p><p>i.e //10.10.10.10/back$</p><p>2) the name of a filesystem is large and the percentage of use appears in another line</p><p>i.e.<br
/> //10.10.10.10/verylongnamefilesystem<br
/> 78140128  45746488  32393640  59% /mnt/</p><p>Regards.</p> ]]></content:encoded> </item> </channel> </rss>
