Emergency:why cacti SNMP get packet is out of order?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
shaozhengmao
Posts: 1
Joined: Thu Dec 15, 2016 2:25 am

Emergency:why cacti SNMP get packet is out of order?

Post by shaozhengmao »

Who knows why cacti software is sent out SNMP request message is out of order, which leads to the CPU usage of the monitored device up?

When I used the cacti software to monitor data like traffic statistics on router interfaces, the router's CPU usage went high greatly. Packet header information captured on the router shows that the cacti software requested disordered data through SNMP Get packets. Is this a bug in the cacti software? Or, is the cacti software configured incorrectly?

For example, the following data captured on the router shows that 19 VB objects were bound in one SNMP Get packet sent by the cacti software, with each requested VB object belongs to a different interface. In this case, the router's CPU usage went high greatly. (VB objects are before dot, and interfaces are after dot.)
ifInUnknownProtos.465
ifInDiscards.430
ifHCOutOctets.214
ifHCOutUcastPkts.733
ifHCOutMulticastPkts.933
ifHCOutUcastPkts.962
ifOutErrors.751
ifOutDiscards.467
ifHCOutMulticastPkts.292
ifHCInMulticastPkts.681
ifHCInOctets.322
ifInErrors.375
ifInErrors.641
ifHCOutOctets.942
ifInUnknownProtos.386
ifOutDiscards.668
ifHCOutBroadcastPkts.732
ifHCInBroadcastPkts.529
ifHCInUcastPkts.943

In normal situations of multi-value binding mode, all requested VB objects in the same SNMP Get packet belong to the same interface, so that data of another interface is collected only after the data of the previous interface is collected completely. Other NMS software, such as the HUAWEI U2000, follows this rule during data collection, which will not result in high CPU usage on the router.
ifInUnknownProtos.465
ifInDiscards. 465
ifHCOutOctets. 465
ifHCOutUcastPkts. 465
ifHCOutMulticastPkts. 465
ifHCOutUcastPkts. 465
ifOutErrors. 465
ifOutDiscards. 465
ifHCOutMulticastPkts. 465
ifHCInMulticastPkts. 465
ifHCInOctets. 465
ifInErrors. 465
ifInErrors. 465
ifHCOutOctets. 465
ifInUnknownProtos. 465
ifOutDiscards. 465
ifHCOutBroadcastPkts. 465
ifHCInBroadcastPkts. 465
ifHCInUcastPkts. 465

Thank you very much !
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Emergency:why cacti SNMP get packet is out of order?

Post by phalek »

Looks like that the poller ( spine, I didn't check cmd.php ) does retrieve the poller-items ( poller_items table ) only sorted by host/snmp port. There's no specific order afterwards.

It may be enough to change the SELECT statements for the poller_item table witin the poller.c source code of spine to include a simple "ORDER BY ABS(arg1) DESC" . so it's sorted by the last number, which "usually" is the index of the interface, but not always true.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest