Multi-Core CPU utilization query broken for one core

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
User avatar
sunkid
Posts: 3
Joined: Tue Jul 02, 2013 10:15 am

Multi-Core CPU utilization query broken for one core

Post by sunkid »

One of my monitored hosts (set up as 'Generic SNMP-enabled Host') is apparently not responding properly to the CPU utilization query ('SNMP - Get Processor Information' built-in template), but only when it comes from cacti's poller.php. The host has 8 cores but one does not properly report % activity:

This is the relevant debug output from the poller (I left out results from the other cores, which are fine):

Code: Select all

07/02/2013 12:43:17 AM - PHPSVR: Poller[0] DEBUG: PID[6568] CTR[136] INC: 'ss_host_cpu.php' FUNC: 'ss_host_cpu' PARMS: '10.0.1.7 12 3:161:500:1:10:community:user:password:MD5:password:DES: get usage 0'
07/02/2013 12:43:17 AM - CMDPHP: Poller[0] Host[12] DS[293] SERVER: /usr/share/user/scripts/ss_host_cpu.php ss_host_cpu 10.0.1.7 12 3:161:500:1:10:community:user:password:MD5:password:DES: get usage 0, output: U
07/02/2013 12:43:17 AM - POLLER: Poller[0] user2RRD: /usr/bin/rrdtool update /usr/share/user/rra/hodur_cpu_293.rrd --template cpu 1372750997:U
This is the output when running cmd.php from CLI:

Code: Select all

thor ~ # sudo -u cacti php /usr/share/user/cmd.php 12 12
07/02/2013 12:55:59 AM - PHPSVR: Poller[0] DEBUG: PID[7448] CTR[0] INC: 'ss_host_cpu.php' FUNC: 'ss_host_cpu' PARMS: '10.0.1.7 12 3:161:500:1:10:community:user:password:MD5:password:DES: get usage 0'
07/02/2013 12:55:59 AM - CMDPHP: Poller[0] Host[12] DS[293] SERVER: /usr/share/user/scripts/ss_host_cpu.php ss_host_cpu 10.0.1.7 12 3:161:500:1:10:community:user:password:MD5:password:DES: get usage 0, output: 88
07/02/2013 12:55:59 AM - PHPSVR: Poller[0] DEBUG: PID[7448] CTR[0] RESPONSE:'88'
Likewise, running the ss_host_cpu script directly works as well:

Code: Select all

thor ~ # php /usr/share/cacti/scripts/ss_host_cpu.php 10.0.1.7 12 '3:161:500:1:10:community:user:password:MD5:password:DES:' get usage 0
21thor ~ #
And this is the snmpwalk result:

Code: Select all

thor ~ # snmpwalk -v3 -u user -A 'password' -l authPriv -a MD5 -x DES -X 'password' hodur .1.3.6.1.2.1.25.3.3.1
HOST-RESOURCES-MIB::hrProcessorFrwID.768 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.769 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.770 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.771 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.772 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.773 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.774 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.775 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorLoad.768 = INTEGER: 22
HOST-RESOURCES-MIB::hrProcessorLoad.769 = INTEGER: 19
HOST-RESOURCES-MIB::hrProcessorLoad.770 = INTEGER: 17
HOST-RESOURCES-MIB::hrProcessorLoad.771 = INTEGER: 17
HOST-RESOURCES-MIB::hrProcessorLoad.772 = INTEGER: 21
HOST-RESOURCES-MIB::hrProcessorLoad.773 = INTEGER: 18
HOST-RESOURCES-MIB::hrProcessorLoad.774 = INTEGER: 17
HOST-RESOURCES-MIB::hrProcessorLoad.775 = INTEGER: 16
The host in question is an identical build of another system with a cloned system drive with minimal configuration changes (IP address and hostname). The other system behaves as expected and no other of my multi-core hosts have missing core utilization query results.

I setup the queries and graphs for this host a couple of times and the core that does not report correctly changed from cpu3 to cpu0 at one point. The host also reports other CPU parameters just fine (system, kernel, interrupts, etc.).

Any advice would be greatly appreciated!
User avatar
sunkid
Posts: 3
Joined: Tue Jul 02, 2013 10:15 am

Re: Multi-Core CPU utilization query broken for one core

Post by sunkid »

Looking at this some more and adding other queries for this host, the query now returns consistently 0 for CPU0. Again, running everything from CLI returns proper values...

I would really like to get this to work and any pointers would be very much appreciated!
Tryb3
Posts: 8
Joined: Fri Aug 23, 2013 5:26 am
Location: Paris, France

Re: Multi-Core CPU utilization query broken for one core

Post by Tryb3 »

Hi, I'ld like to up this topic cause I encounter same error on all my devices.
About half of my CPU Utilization graphs have 0 value all time.
Just can't get an hint on why they're buggy or not, if i delete query / graph and create her again, same thing's happen. Sometime the bug switch CPU Index reported as 0 , but always had right values from command line.

Via Cacti poller :

Code: Select all

CMDPHP: Poller[0] Host[8] DS[437] SERVER: C:\Apache2\htdocs\cacti\scripts\ss_host_cpu.php ss_host_cpu vm03.[MASKED].com 8 1:161:500:1:10:[MASKED]:::::: get usage 3, output: 100
CMDPHP: Poller[0] Host[8] DS[436] SERVER: C:\Apache2\htdocs\cacti\scripts\ss_host_cpu.php ss_host_cpu vm03.[MASKED].com 8 1:161:500:1:10:[MASKED]:::::: get usage 2, output: 100
CMDPHP: Poller[0] Host[8] DS[438] SERVER: C:\Apache2\htdocs\cacti\scripts\ss_host_cpu.php ss_host_cpu vm03.[MASKED].com 8 1:161:500:1:10:[MASKED]:::::: get usage 0, output: 0
CMDPHP: Poller[0] Host[8] DS[439] SERVER: C:\Apache2\htdocs\cacti\scripts\ss_host_cpu.php ss_host_cpu vm03.[MASKED].com 8 1:161:500:1:10:[MASKED]:::::: get usage 1, output: 0
Via command Line :

Code: Select all

C:\Documents and Settings\Administrator>php C:\Apache2\htdocs\cacti\scripts\ss_host_cpu.php vm03.[MASKED].com 8 1:161:500:1:10:[MASKED]:::::: get usage 0
100
C:\Documents and Settings\Administrator>php C:\Apache2\htdocs\cacti\scripts\ss_host_cpu.php vm03.[MASKED].com 8 1:161:500:1:10:[MASKED]:::::: get usage 1
100
C:\Documents and Settings\Administrator>php C:\Apache2\htdocs\cacti\scripts\ss_host_cpu.php vm03.[MASKED].com 8 1:161:500:1:10:[MASKED]:::::: get usage 2
100
C:\Documents and Settings\Administrator>php C:\Apache2\htdocs\cacti\scripts\ss_host_cpu.php vm03.[MASKED].com 8 1:161:500:1:10:[MASKED]:::::: get usage 3
100
Thx a lot for any help (got a serious headache on this one).
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests