Hard drive and CPU not displaying

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
Skydog
Posts: 8
Joined: Thu Mar 02, 2006 10:37 pm
Contact:

Hard drive and CPU not displaying

Post by Skydog »

I've been pulling my hair out on this one

All my graphs work fine except the Host MIB and Host CPU graphs.

I've been hacking around for ages trying to change permissions and upgrade php and patch cacti. clearing poller cache. I thought I came right but it stopped working again.I'm not really sure what I am doing so it doesnt help.

All devices that were added a while back the hard drives and CPU show fine. but when i add a new device and graph no joy.

Maybe someone has a quick answer for me.
Thank you

here is some info.
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[821] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_cpu.php ss_host_cpu 192.168.99.23 54 1:161:500:public:::MD5::[None] get usage 1, output: U
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[821] WARNING: Result from SERVER not valid. Partial Result:
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[820] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_cpu.php ss_host_cpu 192.168.99.23 54 1:161:500:public:::MD5::[None] get usage 0, output: U
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[820] WARNING: Result from SERVER not valid. Partial Result:
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[819] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.99.23 54 2:161:500:public:::MD5::[None] get used 3, output: U
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[819] WARNING: Result from SERVER not valid. Partial Result:
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[819] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.99.23 54 2:161:500:public:::MD5::[None] get total 3, output: U
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[819] WARNING: Result from SERVER not valid. Partial Result:
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[818] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.99.23 54 2:161:500:public:::MD5::[None] get used 2, output: U
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[818] WARNING: Result from SERVER not valid. Partial Result:
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[818] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.99.23 54 2:161:500:public:::MD5::[None] get total 2, output: U
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[818] WARNING: Result from SERVER not valid. Partial Result:
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[817] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.99.23 54 2:161:500:public:::MD5::[None] get used 1, output: U
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[817] WARNING: Result from SERVER not valid. Partial Result:
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[817] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.99.23 54 2:161:500:public:::MD5::[None] get total 1, output: U
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[817] WARNING: Result from SERVER not valid. Partial Result:
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[816] SNMP: v2: 192.168.99.23, dsname: iis_attemps_log, oid: .1.3.6.1.4.1.311.1.7.3.1.16.0, output: 6982
08/14/2007 10:36:32 AM - CMDPHP: Poller[0] Host[54] DS[815] SNMP: v2: 192.168.99.23, dsname: iis_attemps_con, oid: .1.3.6.1.4.1.311.1.7.3.1.15.0, output: 5016

Windows server 2003 web ed.
IIS6
cacti 0.8.6i (have applied j patches)
php 5.2.3
Attachments
graph_image.php.png
graph_image.php.png (28.15 KiB) Viewed 9492 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Try restarting the snmp service on the server -- its buggy some times.

Does an snmpwalk return disk/cpu info on that device?
Skydog
Posts: 8
Joined: Thu Mar 02, 2006 10:37 pm
Contact:

Post by Skydog »

Thanks for replying BSOD2600

it is not just one server but any servers that I add.
Like i say previous servers are working fine, it is any windows machine that I have added after a certain date. I cant remember if I did anything at that time that it stopped working it was a month or two back.

Well it started working again at about 16h30 and stopped just before 08h00 this morning. see attached. This is the first time that all these devices have graphed disk/cpu info since I have added the device.

This is the results of an SNMPwalk (not sure if this is what you were asking for)

25.2.3.1.3.1 C: Label: Serial Number f8fca29
25.2.3.1.3.2 Virtual Memory
25.2.3.1.3.3 Physical Memory
25.2.3.1.4.1 4096
25.2.3.1.4.2 65536
25.2.3.1.4.3 65536
25.2.3.1.5.1 122093992
25.2.3.1.5.2 79351
25.2.3.1.5.3 49014
25.2.3.1.6.1 47188924
25.2.3.1.6.2 22470
25.2.3.1.6.3 23660

I cant think of anything that would change at the time that it starts graphing. there is no one working on the cacti server when the "change" happens.

at least I am getting something graphed every so often before it was blank.

any other ideas?
Thanks
Attachments
sm03.hdd.graph_image.php.png
sm03.hdd.graph_image.php.png (24.36 KiB) Viewed 9445 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Q: Why doesn't Windows return Disk or CPU usage via SNMP?
A: Open up the SNMP Service and click on the Agent tab. Make sure all the service checkboxes are marked (they are not by default). Restart the SNMP service.

If thats already enabled in snmp, that its simply buggy Windows snmp agent. If the server is under heavy load, often the snmp agent will not report data.
Skydog
Posts: 8
Joined: Thu Mar 02, 2006 10:37 pm
Contact:

Post by Skydog »

I did check that all the tick boxes were ticked.

When you say the server is under load are you saying the server being queried? or the cacti server.

I have setup a test box with Cacti and it queries and graphs all the servers that I have this problem with with my live cacti install.

it is not just one server but many that i cannot graph the disk/cpu.

something has gone wrong with my cacti install. Seems like only option is to do a new install.
Thanks for the help.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

On a broken box, click on verbose query and paste the output. If there is nothing, yet you're receiving other snmp data from that box, then its something with the microsoft snmp agent.
Skydog
Posts: 8
Joined: Thu Mar 02, 2006 10:37 pm
Contact:

Post by Skydog »

BSOD2600 thanks for all your help.

I'm going to reinstall anyway as it is a problem with the cacti box and not the servers im querying.

I think the work you doing on the forum and with the windows installer and templates is great.
keep up the good work
ejensen
Cacti User
Posts: 55
Joined: Mon Jul 12, 2004 11:39 am

Post by ejensen »

I am currently experiencing this same issue.

All of a sudden any devices I add that are windows hosts, the "SNMP - Get Mounted Partitions " and the "SNMP - Get Processor Information " return no data. Even ones that previously worked and showed the number of items and rows:

Code: Select all

Success [15 Items, 5 Rows]
If I Reload the Data Query, it will change to this:

Code: Select all

Success [0 Items, 0 Rows]
And "SNMP - Interface Statistics " still works everytime, even if I reload the data query.

I suspect its a plugin i have installed, but i am not sure which one or how to diagnose the problem. (List of plugins below)

When I click on verbose query here is the output:

Code: Select all

+ Running data query [8].
+ Found type = '6 '[script query].
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php velma public 1 200 index'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php velma public 1 200 query index'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php velma public 1 200 query description'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php velma public 1 200 query sau'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php velma public 1 200 query total'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
As you can see above, no idexes are returned.
I have a default Cacti 8.6j (same version) installed on a virtual pc for testing purposes and when I run the verbose query from that test cacti against the same server I just tried running it against from the main, here is the output:

Code: Select all

+ Running data query [8].
+ Found type = '6 '[script query].
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php velma 3 1:161:500:public:::MD5::[None] index'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php velma 3 1:161:500:public:::MD5::[None] query index'
+ Found item [hrStorageIndex='1'] index: 1
+ Found item [hrStorageIndex='2'] index: 2
+ Found item [hrStorageIndex='3'] index: 3
+ Found item [hrStorageIndex='4'] index: 4
+ Found item [hrStorageIndex='5'] index: 5
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php velma 3 1:161:500:public:::MD5::[None] query description'
+ Found item [hrStorageDescr='A:'] index: 1
+ Found item [hrStorageDescr='C: Label: Serial Number 44f5172'] index: 2
+ Found item [hrStorageDescr='D: Label:Archive Serial Number 58c1cb7'] index: 3
+ Found item [hrStorageDescr='E:'] index: 4
+ Found item [hrStorageDescr='Virtual Memory'] index: 5
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php velma 3 1:161:500:public:::MD5::[None] query sau'
+ Found item [hrStorageAllocationUnits='0'] index: 1
+ Found item [hrStorageAllocationUnits='4096'] index: 2
+ Found item [hrStorageAllocationUnits='4096'] index: 3
+ Found item [hrStorageAllocationUnits='0'] index: 4
+ Found item [hrStorageAllocationUnits='65536'] index: 5
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
As you can see, the server is the same, the output is different.
So this tells me its not something with the MS SNMP agent, or timeout values.
On my main Cacti server I can run the command (from a command prompt) for getting a list of indexes or any of the commands that are supposed to run and they return valid data:

Code: Select all

C:\>c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php velma public 1 200 index
1
2
3
4
5

C:\>
So it would appear to me there is something amiss with maybe the PHP Server portion of things. This is where I am not sure, and not sure how to diagnose this problem.

Last night I reloaded everything from the latest SVN and the SNMP queries in question worked, even on new devices/hosts I added to the system.

Then I spent some time re-enabling my plug-ins and everything else to get back to an operational state.
This morning I had to add a new device/host and i noticed the SNMP Queries in question are broke again. Keep in mind the "SNMP - Interface Statistics " still work and have been working.

Here is some info about my servers setup.
Cacti Version - 0.8.6j
Plugin Architecture - 1.1
Poller Type - Cactid v0.8.6i
Server Info - Windows NT 5.2
Web Server - Microsoft-IIS/6.0
PHP - 5.2.1
PHP Extensions - bcmath, calendar, com_dotnet, ctype, session, filter, ftp, hash, iconv, json, odbc, pcre, Reflection, date, libxml, standard, tokenizer, zlib, SimpleXML, dom, SPL, wddx, xml, xmlreader, xmlwriter, ISAPI, gd, mysql, snmp, sockets
MySQL - 5.0.37-community-nt
RRDTool - 1.2.15
SNMP - snmpwalk [OPTIONS] AGENT [OID]

Version: 5.4
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net

OPTIONS:
-h, --help display this help message
-H display configuration file directives understood
-v 1|2c|3 specifies SNMP version to use
-V, --version display package version number
SNMP Version 1 or 2c specific
-c COMMUNITY set the community string
SNMP Version 3 specific
-a PROTOCOL set authentication protocol (MD5|SHA)
-A PASSPHRASE set authentication protocol pass phrase
-e ENGINE-ID set security engine ID (e.g. 800000020109840301)
-E ENGINE-ID set context engine ID (e.g. 800000020109840301)
-l LEVEL set security level (noAuthNoPriv|authNoPriv|authPriv)
-n CONTEXT set context name (e.g. bridge1)
-u USER-NAME set security name (e.g. bert)
-x PROTOCOL set privacy protocol (DES)
-X PASSPHRASE set privacy protocol pass phrase
-Z BOOTS,TIME set destination engine boots/time
General communication options
-r RETRIES set the number of retries
-t TIMEOUT set the request timeout (in seconds)
Debugging
-d dump input/output packets in hexadecimal
-D TOKEN[,...] turn on debugging output for the specified TOKENs
(ALL gives extremely verbose debugging output)
General options
-m MIB[:...] load given list of MIBs (ALL loads everything)
-M DIR[:...] look in given list of directories for MIBs
-P MIBOPTS Toggle various defaults controlling MIB parsing:
u: allow the use of underlines in MIB symbols
c: disallow the use of "--" to terminate comments
d: save the DESCRIPTIONs of the MIB objects
e: disable errors when MIB symbols conflict
w: enable warnings when MIB symbols conflict
W: enable detailed warnings when MIB symbols conflict
R: replace MIB symbols from latest module
-O OUTOPTS Toggle various defaults controlling output display:
0: print leading 0 for single-digit hex characters
a: print all strings in ascii format
b: do not break OID indexes down
e: print enums numerically
E: escape quotes in string indices
f: print full OIDs on output
n: print OIDs numerically
q: quick print for easier parsing
Q: quick print with equal-signs
s: print only last symbolic element of OID
S: print MIB module-id plus last element
t: print timeticks unparsed as numeric integers
T: print human-readable text along with hex strings
u: print OIDs using UCD-style prefix suppression
U: don't print units
v: print values only (not OID = value)
x: print all strings in hex format
X: extended index format
-I INOPTS Toggle various defaults controlling input parsing:
b: do best/regex matching to find a MIB node
h: don't apply DISPLAY-HINTs
r: do not check values for range/type legality
R: do random access to OID labels
u: top-level OIDs must have '.' prefix (UCD-style)
s SUFFIX: Append all textual OIDs with SUFFIX before parsing
S PREFIX: Prepend all textual OIDs with PREFIX before parsing
-L LOGOPTS Toggle various defaults controlling logging:
e: log to standard error
o: log to standard output
n: don't log at all
f file: log to the specified file
s facility: log to syslog (via the specified facility)

(variants)
[EON] pri: log to standard error, output or /dev/null for level 'pri' and above
[EON] p1-p2: log to standard error, output or /dev/null for levels 'p1' to 'p2'
[FS] pri token: log to file/syslog for level 'pri' and above
[FS] p1-p2 token: log to file/syslog for levels 'p1' to 'p2'
-C APPOPTS Set various application specific behaviours:
p: print the number of variables found
i: include given OID in the search range
I: don't include the given OID, even if no results are returned
c: do not check returned OIDs are increasing
t: Display wall-clock time to complete the request
Plugins
  • Global Plugin Settings (settings - v0.2)
    Device Monitoring (monitor - v0.7)
    Thresholds (thold - v0.3.5.2)
    SuperLinks (superlink - v0.3)
    Update Checker (update - v0.3)
    Network Tools (tools - v0.2)
    Report Creator (reports - v0.3)
    Syslog Monitoring (syslog - v0.5)
    Host Info (hostinfo - v0.1)
The above is from the hostinfo plugin.

Under Data Queries here is what i have for the two quries in question:

Code: Select all

SNMP - Get Mounted Partitions  Get Script Server Data (Indexed)  

Code: Select all

SNMP - Get Processor Information  Get Script Server Data (Indexed)  
Any help would be appreciated, I have searched the forums and I just cannot find a solution to this problem.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

ejensen wrote:As you can see, the server is the same, the output is different.
So this tells me its not something with the MS SNMP agent, or timeout values.
It could also be you haven't granted the server rights in the SNMP service to query it or a firewall is now blocking the traffic.

Those issues aside, PHP 5.2.1 is buggy and causes IIS to crash -- install the latest version. Once thats done, see if snmp works again.

On the 'broken' cacti server, does snmp work against anything?
ejensen
Cacti User
Posts: 55
Joined: Mon Jul 12, 2004 11:39 am

Post by ejensen »

thanks for the reply.
Not a permissions problem that I can think of, other snmp queries work against that device/host from the 'broken' cacti server as well as the test cacti server.

I installed the latest PHP server 5.2.4, rebooted, checked php.ini file against the recomendations you set in your FAQ.

SNMP queries for partitions and cpu still do not work.

One thing I remember about the ss_host_disk.php file is that when I implimented the thold plugin, there where some changes that had to be made to some default templates and scripts in order to get the drive space used to show as a percentage for the thold alerts to work. Maybe this had something to do with the problem?

Any other suggestions?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

ejensen wrote:One thing I remember about the ss_host_disk.php file is that when I implimented the thold plugin, there where some changes that had to be made to some default templates and scripts in order to get the drive space used to show as a percentage for the thold alerts to work. Maybe this had something to do with the problem?
Quite possibly.

Manually run the ss_host_disk.php with the php script server and see what data it outputs. Alternatively, change the cacti logging level to debug for a cycle and see what data is being returned from when the disk template script runs.

All other snmp queries work, except for disk/cpu right?
Skydog
Posts: 8
Joined: Thu Mar 02, 2006 10:37 pm
Contact:

Post by Skydog »

ejensen - are the servers you querying over a WAN link?
I reinstalled but also increase the SNMP timeout as the WAN links I am querying over are very dodge.

maybe increasing timeout will will help
ejensen
Cacti User
Posts: 55
Joined: Mon Jul 12, 2004 11:39 am

Post by ejensen »

No, servers are on gigabit LAN, even the localhost does not work for disk or cpu.
Yes, other SNMP queries work just fine (e.x. Interfaces).

After upgrading to the latest PHP, I am getting some odd errors when i run the script_server. I will search on the forums to see if there is a solution to these errors.

Here is the output:

Code: Select all

C:\Inetpub\wwwroot\cacti>php -q script_server.php
PHP Warning:  Module 'gd' already loaded in Unknown on line 0
PHP Warning:  Module 'mysql' already loaded in Unknown on line 0
PHP Warning:  Module 'snmp' already loaded in Unknown on line 0
PHP Warning:  Module 'sockets' already loaded in Unknown on line 0
PHP Script Server has Started - Parent is cmd
\scripts\ss_host_disk.php
WARNING: Function does not exist
quit
PHP Script Server Shutdown request received, exiting

C:\Inetpub\wwwroot\cacti>
ejensen
Cacti User
Posts: 55
Joined: Mon Jul 12, 2004 11:39 am

Post by ejensen »

I searched on the forums for how to test the script server, sorry i didnt do that before my previous reply.

I still get the PHP errors. But here is the output from the suggested test posted on the forum.

Code: Select all

C:\Inetpub\wwwroot\cacti>php script_server.php
PHP Warning:  Module 'gd' already loaded in Unknown on line 0
PHP Warning:  Module 'mysql' already loaded in Unknown on line 0
PHP Warning:  Module 'snmp' already loaded in Unknown on line 0
PHP Warning:  Module 'sockets' already loaded in Unknown on line 0
PHP Script Server has Started - Parent is cmd
c:\inetpub\wwwroot\cacti\scripts\ss_host_cpu.php ss_host_cpu localhost public 2
161 500 get usage 0
U
quit
PHP Script Server Shutdown request received, exiting

C:\Inetpub\wwwroot\cacti>
One thing I noticed, that seemed odd to me, is that the suggested code to test the script_server has the script in there twice (e.g. scripts\ss_host_cpu.php ss_host_cpu localhost ) see the ss_host_cpu is doubled.

And the post doesnt really say what kind of output to expect. All that was returned was a "U", is that normal?

*edit* - I fixed the formentioned PHP Warnings, turns out there where duplicate extensions listed in the php.ini file.

*edit2* - I think i see why there is ss_host_cpu is listed twice, its just calling that function in the php script. I told you guys i was new to php. sorry for the lack on knowledge :oops: I understand that part now. :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests