Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20958

Re: Question about linux template

$
0
0

I had to use a different number in awk to get the free memory value, but here is a workable solution for you:

 

Script argument line

 

bash ${SCRIPT}

 

Body of Script

 

#!/bin/bash

 

memory=`free -m | grep Mem: | awk '{print $4}'`

 

  echo "\nStatistic: $memory";

  echo "\nMessage: Free Memory is $memory Kb"

 

fi

 

 

On your results - you can choose the values to warn if less than whatever number you deem suitable.


Viewing all articles
Browse latest Browse all 20958

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>