On 14 Jan 2003, lito lampitoc wrote:

> 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

I think I'm losing touch here, but on my machine /bin/df shows
space used and available on each mounted fs partition.  It does
not show swap space usage.  /usr/bin/free does, however, show
swap space used and available. Also, what does removing files
from /tmp have to do with freeing swap space?  What happens to
critical files in /tmp, like mysql sockets?  Mysql will fail
when this is done.  Isn't swap part of the virtual memory system
of Linux, and as such /bin/rm is not the proper tool to manage it?

P~Manalastas

_
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