Windows Memory Graph (2000/2003)

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Windows Memory Graph (2000/2003)

Post by Phobos182 »

After searching the forums for a memory graph, I found a couple that show way too much information. Also some that are very hard to read quickly. Since I dont want to spend a minute or so looking at a graph to determine if there is a problem, I created a new graph.

What I wanted to accomplish was a few things

- Is the server utilizing memory greater than it has physical memory?
This would let me know that if I turned off paging, the system would crash. If it was under by a lot, I could turn off paging with little to no problems, and gain some performance increase.

- Is the server utilizing a lot of virtual memory?
If so, I could decrease the paging file size, and have it use the physical memory.

The graph is pretty simple. It shows you the virtual memory total, and virtutal memory used. Also the total physical memory installed, and the total physical memory used. But what it also does it total the virtual memory used with the physical memory used to determine the total amount of memory used by the server. If you compare this line to the total physical memory, you can see if the server even needs paging files, or needs more memory perhaps.

There are a couple of examples below. The first, the 'magic orange line' exceeds the total physical memory. If i turned off paging, it would crash.

The third shows a server that's seriously getting it's ass kicked. The total memory is almost double the amount of physical memory installed. At one point it entirely runs out of physical memory, and goes to swap hardcore.

Hope you enjoy it. It took a while to make.
Attachments
Total memory > physical memory.
Total memory > physical memory.
crash_risk.png (50.69 KiB) Viewed 17495 times
Severe risk.
Severe risk.
severe.png (42.27 KiB) Viewed 17495 times
cacti_graph_template_w32_get_memory_2000.xml
Memory Template
(28.02 KiB) Downloaded 1758 times
Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Post by Phobos182 »

Here is the script used to grab the data. Save this to your <cacti path>/script directory.

Download & Import the template in the first post above, and you should be set to start graphing.

Thanks to Lit for providing it in his memory graph post.
Attachments
w32_query_os.pl.txt
(5.6 KiB) Downloaded 1526 times
laffen
Cacti User
Posts: 56
Joined: Tue Jul 13, 2004 2:57 am
Location: Norway

Post by laffen »

Feel free to make a SNMP version of this script :)
WMI is only usable when cacti runs on Windows, and this is a nice script.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

laffen wrote:Feel free to make a SNMP version of this script :)
WMI is only usable when cacti runs on Windows, and this is a nice script.
All that data is unfortiantly not available via SNMP, hence the WMI script.
laffen
Cacti User
Posts: 56
Joined: Tue Jul 13, 2004 2:57 am
Location: Norway

Post by laffen »

BSOD2600 wrote:
laffen wrote:Feel free to make a SNMP version of this script :)
WMI is only usable when cacti runs on Windows, and this is a nice script.
All that data is unfortiantly not available via SNMP, hence the WMI script.
Have a look at SNMP-Informant which gives some memory information, http://www.wtcs.org/informant/functionality.htm has OID tree of the standard (free) agent.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Right, I know about that. My point was natively, windows does not provide snmp OID's for that. It does via WMI though.
vtmgr
Posts: 27
Joined: Wed Aug 11, 2004 2:23 pm
Location: Vermont, USA

Memory Graph caveats

Post by vtmgr »

This is a nice graph, informative and visually appealing. However, if you are monitoring a remote system, your poller needs to be running as a user with network rights, and probably administrative ones, at that.

This is imposed by WMI, presumably on the remote end.
Cacti 0.8.6f
CMD
MySQL 4.0.20
Net-SNMP 5.1.1
IIS 6
PHP 5.0.2
RRDtool 1.2.10
Windows 2003 Server
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Memory Graph caveats

Post by BSOD2600 »

vtmgr wrote:This is imposed by WMI, presumably on the remote end.
And that can be fixed my adding the cacti user in Local Security Policy and dcomcnfg.
soundombj
Posts: 5
Joined: Tue Aug 23, 2005 9:40 pm

Re: Memory Graph caveats

Post by soundombj »

BSOD2600 wrote:
vtmgr wrote:This is imposed by WMI, presumably on the remote end.
And that can be fixed my adding the cacti user in Local Security Policy and dcomcnfg.


can more detailed?
i can't get data from remote host.

"Unable to talk to WMI for 192.168.10.1"
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Post by Phobos182 »

Thanks for the help BSOD.
[size=84][color=red] Electronic Frontier Foundation[/color]
[url]http://eff.org[/url][/size]
Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Post by Phobos182 »

Can somebody export this for Cacti 8.6g?
[size=84][color=red] Electronic Frontier Foundation[/color]
[url]http://eff.org[/url][/size]
Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Post by Phobos182 »

FYI: I'm working on an SNMP-Informant Version of this graph. Please stay tuned during the next week or so Linux Users.
[size=84][color=red] Electronic Frontier Foundation[/color]
[url]http://eff.org[/url][/size]
wintech2003
Posts: 12
Joined: Tue May 17, 2005 5:29 am

Post by wintech2003 »

Phobos182 wrote:FYI: I'm working on an SNMP-Informant Version of this graph. Please stay tuned during the next week or so Linux Users.
That would be great! Thank you :)
CharlieB.
Posts: 30
Joined: Mon Nov 14, 2005 1:06 pm

Get Memory stopped :-(

Post by CharlieB. »

I had been using this get memory graph but it stopped functioning when i switched to cactid polling. Is there something different i should do to use it with cactid and not cmd.php?

With cactid polling i get the following:

12/06/2005 12:31:09 PM - CACTID: Poller[0] Host[21] DS[354] WARNING: Result from SCRIPT not valid. Partial Result: ...
12/06/2005 12:31:09 PM - CACTID: Poller[0] Host[21] ERROR: Empty result [server54-ccc.cpsb.org]: 'perl.exe C:/Cacti\scripts\w32_query_os.pl 10.54.0.249 get FreePhysicalMemory,FreeSpaceInPagingFiles,FreeVirtualMemory,MaxProcessMemorySize,SizeStoredInPagingFiles,TotalVirtualMemorySize,TotalVisibleMemorySize'
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests