Shell Script for memory alert

Written By Smart| 1 August 2009| 2 Comments

Shell script which tell about low memory status message with xwindow dailog box.

#!/bin/sh
#
#author : admin@smartproteam.com
#copy rights@smartproteam 2009
#script to low ram alert

tolmem=$(free -m| grep Mem | awk ‘{print $4}’)
expmem=300
if [ $tolmem -lt $expmem ]
then
xmessage “Physical mem is low”
fi

output

mem

Related Posts with Thumbnails

Share With Others

2 Comments »

  • tanja said:

    that’s crap because most memory is used as cache and free space only means lost perfomance.

  • Smart (author) said:

    Hi tanja,

    my script is reminding performance is going to low,so that he can kill some of the unnecessary process.

    thanks for your comment

    thanks
    admin

Leave your response!




Comment moderation is enabled. Your comment may take some time to appear.