Skip to content
Snippets Groups Projects
Commit 08f74cc2 authored by Mark Harrison's avatar Mark Harrison
Browse files

Fix stats updating for FREEMEM module when using kstats

Previously the values were not getting updated on each check, meaning that the
free memory shown would be the free memory as of the last resmon restart. This
only applies to the kstat method. The others are fine.

git-svn-id: https://labs.omniti.com/resmon/trunk@346 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
parent 6050aed0
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,7 @@ sub handler {
} else {
# We have kstat, use that for everything
my $pagesize = run_cmd("pagesize");
$kstat->update();
my $syspages = $kstat->{unix}->{0}->{system_pages};
$total_mem = $syspages->{physmem} * $pagesize / 1024 / 1024;
$free_mem = $syspages->{freemem} * $pagesize / 1024 / 1024;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment