Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


better Win32 memory usage -- update Feb 10, 2007

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
ehall
Cacti User


Joined: 09 Dec 2005
Posts: 160

PostPosted: Thu Jan 12, 2006 2:22 pm    Post subject: better Win32 memory usage -- update Feb 10, 2007 Reply with quote

I got the better ucd/net-snmp memory usage ported over to Win32, using SNMP Informant Advanced (not the Std freeware edition).



That graph shows the total real memory installed, used by processes, used by cache, and altogether unused. It also shows allocated swap space (from c:\pagefile.dat only) as a pink strip on the top, above the real memory.

This uses a script to gather various bits of information from the Host MIB as well as SNMP Informant.

To install and use, import the XML data definition in the zip file, and then copy the win32_memory_usage.php script to your <cacti_path>/scripts/ directory. That's it.

This was exported from Cacti 0.8.6i using PHP 5. Other combinations may not work.



cacti-win32-memory.tar.gz
 Description:

Download
 Filename:  cacti-win32-memory.tar.gz
 Filesize:  5.72 KB
 Downloaded:  497 Time(s)



Last edited by ehall on Fri May 02, 2008 8:24 pm; edited 2 times in total
Back to top
dust2k
Cacti User


Joined: 04 Dec 2005
Posts: 85

PostPosted: Sat Jan 14, 2006 4:58 pm    Post subject: Reply with quote

has to be informat adv version ?
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6795
Location: WA, USA

PostPosted: Sat Jan 14, 2006 8:18 pm    Post subject: Reply with quote

Yea, standard doesn't have that info.
Back to top
ajohnson



Joined: 27 Dec 2005
Posts: 36

PostPosted: Fri Feb 17, 2006 3:25 pm    Post subject: Which version? Reply with quote

I'm using Cacti 0.8.6g and I'm getting invalid hash errors when trying to import the template. What version did you export this from?

BTW - Nice clean coding & comments on the script.
Back to top
AndyStewart
Cacti User


Joined: 29 Sep 2005
Posts: 102
Location: Edinburgh, Scotland

PostPosted: Mon Feb 20, 2006 5:02 am    Post subject: Reply with quote

0.8.6g here as well, getting "hash version does not exist" when trying to import...
Back to top
ezoltan



Joined: 09 Feb 2006
Posts: 7

PostPosted: Thu Mar 09, 2006 11:10 pm    Post subject: No values on graph Reply with quote

Hi,

This template is really nice and saves a lot of time. Thanks for it.

The import went like a charm: no errors at all, right at the first attempt.
The problem is that I don't get any readings: all values on the graph are still "nan" after I configured it 2-3 weeks ago.

If running the script from the console, I get these readings:
availReal: 546332672
memCached: 137285632
totalSwap: 0
usedSwap: 0
usedReal: 1462779904
availSwap:0

The server has 2Gb RAM with a 2Gb total page file size.
Too much for the SNMP counters?
Uses 32-bit or 64 bit counters?
If one counter would be over the maximum limit set in the datasource definition, would it prevent all reading from being written to the RRD database?

I am running Cacti 0.8.6h with RRDtool 1.2 on Redhat 9.
The maximum value for all conters in the template is set manually to 10000000000.

What am I doing wrong?

Thanks,
Zoltan
Back to top
ehall
Cacti User


Joined: 09 Dec 2005
Posts: 160

PostPosted: Sat Feb 10, 2007 11:46 am    Post subject: Reply with quote

The posted update contains a fix that converts the SNMP timeout value from Cacti's millisecond format to PHP/Net-SNMP microsecond format. The lack of conversion in the earlier script would sometimes result in excessive retries or complete failure.
Back to top
DataScrub



Joined: 20 Apr 2005
Posts: 5

PostPosted: Fri Oct 12, 2007 1:55 pm    Post subject: Missing MIBS Reply with quote

I just bought the Informant Advanced agent to use with this script, and am having a problem... The following OID's (referenced in the script) don't seem to exist anymore. Did they use to? Browsing through the advanced (and standard) MIBs through GetIF didn't show that they had moved anywhere else, just that .1.3.6.1.4.1.9600.1.22 is not valid. Since ...9600.1.1 seems to be Standard and ...9600.1.2 seems to be Advanced, what does that imply about ...9600.1.22?

array ("totalSwap", ".1.3.6.1.4.1.9600.1.22.5.3.1.2.1"),
array ("usedSwap", ".1.3.6.1.4.1.9600.1.22.5.3.1.4.1");

For now I'm just commenting out anything about Swap, but I'd like to have that too. Thanks
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6795
Location: WA, USA

PostPosted: Fri Oct 12, 2007 3:09 pm    Post subject: Reply with quote

When you snmpwalk 1.3.6.1.4.1.9600.1, you don't see anything in 1.3.6.1.4.1.9600.1.22 ?
Back to top
DataScrub



Joined: 20 Apr 2005
Posts: 5

PostPosted: Fri Oct 12, 2007 3:15 pm    Post subject: Reply with quote

Nope.

monitor2:/usr/local/cacti/scripts# snmpwalk -c xxx -v1 10.200.2.174 .1.3.6.1.4.1.9600.1.22
End of MIB

Walking .1.3.6.1.4.1.9600.1.2 returns data just fine however.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group