thanks. 

On Tue, 2003-01-14 at 15:44, [EMAIL PROTECTED] wrote:
> 
> instead of checking for 'if use="99%"' why not check
> for 'if use >="99%"' or 'if use >="some threshold value"'? 
> 
> On 14 Jan 2003, lito lampitoc wrote:
> 
> > I wrote a very simple bash script to check the capacity of my swap space
> > for I have a problem of swap space getting full, the script will delete
> > it's content when it reached 99%, my problem is sometimes it can't
> > detect 99% because of time interval in cron, I don't want to execute the
> > script every second because i think it will burden my processor, what do
> > you think is the possible solution. Here is my simple script:
> > 
> > #!/usr/local/bin/bash
> > 
> > use=`/usr/bin/df -h|grep swap|awk -F" " '{print $5}'`
> > if use="0%";
> >  then
> >    cat /dev/null 2>&1;
> >  elif use = "99%";
> >  then
> >    /usr/bin/rm /tmp/* > /dev/null 2>&1;
> > fi
> > 
> > Thanks.
> > 
> > 
> > 
> 
> _
> Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
> To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
> 
> Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph
> 
> To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
>[EMAIL PROTECTED]
> 
-- 
Lito A. Lampitoc                :  http://www.codewan.com.ph
Systems/Network Administrator   :  CountryWide Wide Area Network, Inc.

As we enjoy great advantages from inventions of others, we should be
glad of an opportunity to serve others by any invention of ours; and 
this we should do freely and generously - Benjamin Franklin                     

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to