Page 1 of 3
windows server memory check is showing physical+page
Posted: Fri Mar 19, 2010 9:19 am
by gary_ford
I am currently trialing xi with a view to purchase..
using wizard exclusively to deploy checks..
very impressed so far. but
all my windows servers 2003 2008 32 and 64 bit are all showing the sum of physical ram and pagefile useage (or i assume its these)
is this normal?
is there a way to show just physical as there is a wizard entry for the page file anyway...
Re: windows server memory check is showing physical+page
Posted: Fri Mar 19, 2010 1:33 pm
by mmestnik
Perhaps this is another UI bug. Your warn/crit values should be configured based on the RAM the machine has, virtual memory usage is a sliding scale. The usage is either under or above physical memory size. When below the pages in swap are 'cached' in memory, but are removed(un-mapped) when this RAM is needed. After the pagefile's cache reaches a minimal value, as memory usage increases it shrinks, you would want an alert.
I can see how your complaint would be why you couldn't alert a 10% free physical memory and that you may have to do the calculation and set these values explicitly expressed as size in MBs.
Re: windows server memory check is showing physical+page
Posted: Sat Mar 20, 2010 4:01 pm
by gary_ford
the alerts (warning and critical) are based on percentages.. w 80 c 90...
the fact is that the reported figures are the sum of the page and the physical memory.. not at all useful. Must be a bug..
Re: windows server memory check is showing physical+page
Posted: Sun Mar 21, 2010 2:15 am
by mmestnik
Most users would wish to be alerted if they need to grow the Page File. Performance penalties because of insufficient Physical Memory and Disk IO related swappiness should be measured in kB/s and not kB, so this falls under another check(or two-in/out) to detect this.
In short it's vary difficult to get a decent handle on Physical Memory usage, unless you can keep the amount of Memory Allocated under the size of Physical Memory. If that's the case then the solution is easy, make the Swap space static and adjust alert levels accordingly.
The reported figures must be the sum of the Swap and the Physical Memory, it wouldn't make any sense to try and do something else. As I explained where X is the amount of Memory Allocated, Y is the Physical Memory, and Z then is the size of Swap space... Then "Free Physical Memory = Y - X" In cases where Free Physical Memory is negative(it's never positive, read further down about Cache) Z is used as a temporary storage location. Thus "Free Memory = ( Y + Z ) - X"
As stated this is a problem when you'd like alerts on 80% and 90% of Free Physical Memory, but Free Physical Memory "might" almost always be a negative number.
It's vary difficult(impossible) to measure Physical Memory currently Allocated, unless Free Physical Memory is positive(I'd consider this abnormal). Even in these cases Physical Memory is used to Cache network and disk IO, so in the majority of cases when hard disks are larger then the amount of memory(as if you had a choice?) the machine would have the amount of memory that contains data always at 100%.
Discovering Physical Memory usage get's a more difficult once you start trying to subtract out IO Cache. The problem with this approach is that Database files live in this space and you would want to count this as Allocated. Even if you did concede that you could account for this separately, you would still have to account for your applications(all the EXE and DLL files that you use) that also takes up Cache space.
I hope this is clear enough?
Re: windows server memory check is showing physical+page
Posted: Sun Mar 21, 2010 5:34 am
by gary_ford
doesnt help me i'm afraid.. fact is i need to report on physical ram.. example.
I have a server with 4gb of physical and a 4.3 pagefile.
The status is gree, total 8300mb in use 3900
in the server itself approx 3.9gb of Physical ram is in use but no alert.. I need to know about these situations as this server is swapping out (os soon will be) to disk.
Re: windows server memory check is showing physical+page
Posted: Sun Mar 21, 2010 8:56 pm
by mmestnik
Are you sure this is an error? As explained Physical Memory usage should always be 100%, though Pages Allocated can be anything. Have you verified where/if these Pages are Allocated?
In this example 90% of Physical Memory is 45%, %80 is 40%. If you keep with the logic of 1GB Physical == 1GB Swap, instead of(for example) 1GB Physical == 2GB Swap, then this would always be the case.
I believe all of this is per design.
Cheers.
Re: windows server memory check is showing physical+page
Posted: Tue Mar 23, 2010 5:22 am
by gary_ford
ok I understand your point but I HAVE to allert if the amount of physcial memory is high (I have no choice) as depicted in taskmgr... can this be done?
Re: windows server memory check is showing physical+page
Posted: Tue Mar 23, 2010 6:56 am
by gary_ford
Looks like I have to use nrpe.. but I will be darned if i can get the correct combination of things to make it work.. I have downloaded and install the check_nrpe plugin to nagiosxi and defined the commands.
The plugin installed fine
The command seemed to go well..
check_mem
$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=$ARG1$% MaxCrit=$ARG2$% ShowAll type=physical
check_command
but when i define the service it doesn't work.. (arg1 = 80 arg2 = 90)
the snapshot gives this
Running pre-flight check on configuration data...
Checking services...
Warning: Service 'Memory Usage' on host 'sqltest.a4egroup.co.uk' has no check time period defined!
Error: Service check command 'check_mem' specified in service 'Physical Memory Usage' for host 'sqltest.a4egroup.co.uk' not defined anywhere!
Re: windows server memory check is showing physical+page
Posted: Tue Mar 23, 2010 7:12 am
by gary_ford
ok.. it works from nagios command line - but still stuck getting it into services config...
[root@nagiosxi libexec]# ./check_nrpe -H 192.x.x.x -p 5666 -c CheckMEM -a MaxWarn=80% MaxCrit=90% ShowAll type=physical
WARNING: physical memory: Total: 4G - Used: 3.25G (81%) - Free: 763M (19%) > warning|'physical memory'=81%;80;90;
You have new mail in /var/spool/mail/root
[root@nagiosxi libexec]#
Re: windows server memory check is showing physical+page
Posted: Tue Mar 23, 2010 7:53 am
by gary_ford
also I have this on my commands page..
Last database update: 2010-03-23 12:43:28
Last change of the configuration file: 2010-03-17 10:30:56
Warning: configuration file is out of date!
and if i look at the commands.cfg file I do not see the command I entered for check_mem
looks like the gui thinks the command has been "uploaded" to the file but it actually hasnt.