In certain environments, a custom memory monitor may be required to monitor Unix based hosts.  Why? A Unix System Admin might describe it as follows:

Unix/Linux will fill any free memory with disk buffers and caching, but that should not be counted as “used” memory, because if an application needs it, the kernel will give it up. The proper way to calculate memory usage is to pull the total used and subtract whatever amount of cache and buffers are being used.

echo 'free | grep - | awk '{ print $4 }''/'free | grep Mem |awk '{print $2 }'' *100 | bc -l

On the SiteScope host, create a '' file in /SiteScope_Root/remote.script/ directory. This can be done using Notepad.

Insert the script above into your .sh file and save it.

In the SiteScope interface, create a Script Monitor directed at your Unix host with the following settings:

  • Script: USE COMMAND
  • Match expressions: /[0-9]{2}.[0-9]{2}/
  • Remote script Command File: (select your .sh file from dropdown)

From here you can adjust the Thresholds to Alert on the Status of the monitor (which is a 0-100 percentage of the actual Free Memory available).


See Also: Custom Memory Monitor Part 2