Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
regisu
byregisu, May 14, 2013
Hello,
Thank you for this excellent plugin!
I only saw one problem with counting free memory percentage for values like 800KB or something less. I think that you need to change Bytes to Mega Bytes after calculating percentage value.
So I moved line:
my $mem_free_perc = int(($mem_free / $mem_total) * 100);
above:
$mem_used = int($mem_used / 1024 / 1024);
$mem_free = int($mem_free / 1024 / 1024);
$mem_total = int($mem_total / 1024 / 1024);
And now it works perfect!
Thank you for this excellent plugin!
I only saw one problem with counting free memory percentage for values like 800KB or something less. I think that you need to change Bytes to Mega Bytes after calculating percentage value.
So I moved line:
my $mem_free_perc = int(($mem_free / $mem_total) * 100);
above:
$mem_used = int($mem_used / 1024 / 1024);
$mem_free = int($mem_free / 1024 / 1024);
$mem_total = int($mem_total / 1024 / 1024);
And now it works perfect!