This code is leftover from m0n0wall. Not sure if its accurate since we now factor swap into the equation.
At any rate, here is the code in question: exec("/sbin/sysctl -n vm.stats.vm.v_active_count vm.stats.vm.v_inactive_count " . "vm.stats.vm.v_wire_count vm.stats.vm.v_cache_count vm.stats.vm.v_free_count", $memory); $totalMem = $memory[0] + $memory[1] + $memory[2] + $memory[3] + $memory[4]; $freeMem = $memory[4]; $usedMem = $totalMem - $freeMem; $memUsage = round(($usedMem * 100) / $totalMem, 0); return $memUsage; If someone wants to perfect it, please do and I'll commit. Scott On 10/7/05, Dan Swartzendruber <[EMAIL PROTECTED]> wrote: > > Just logged into my pfsense and was surprised to see memory usage of > 82% (given that I'm not doing much right now.) Ran top and saw this: > > Mem: 56M Active, 102M Inact, 42M Wired, 20K Cache, 34M Buf, 42M Free > Swap: 512M Total, 512M Free > > Not sure how the memory usage is derived, but on a BSD machine, it > really isn't accurate to use buffer or inactive memory... > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]