Re: [pfSense Support] Inaccuracy of memory reporting in WebGUI

2005-10-07 Thread Dan Swartzendruber

At 01:02 PM 10/7/2005, you wrote:

/usr/local/www/includes/functions.inc.php


thx



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [pfSense Support] Inaccuracy of memory reporting in WebGUI

2005-10-07 Thread Scott Ullrich
/usr/local/www/includes/functions.inc.php

On 10/7/05, Dan Swartzendruber <[EMAIL PROTECTED]> wrote:
> At 12:57 PM 10/7/2005, you wrote:
> >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.
>
> what file is this in?
>
>
>
> -
> 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]



Re: [pfSense Support] Inaccuracy of memory reporting in WebGUI

2005-10-07 Thread Dan Swartzendruber

At 12:57 PM 10/7/2005, you wrote:

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.


what file is this in?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [pfSense Support] Inaccuracy of memory reporting in WebGUI

2005-10-07 Thread Dan Swartzendruber

At 12:57 PM 10/7/2005, you wrote:

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.


thanks.  i'll take a look...



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [pfSense Support] Inaccuracy of memory reporting in WebGUI

2005-10-07 Thread Scott Ullrich
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]



[pfSense Support] Inaccuracy of memory reporting in WebGUI

2005-10-07 Thread Dan Swartzendruber


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]