Recently, in Java using the SNMP protocol to write a statistical network device traffic program, found in the SNMP protocol, the value of the device port traffic is accumulated traffic value, need to divide by the difference between the time to get the port per second traffic. However, the data type of the corresponding port traffic is unsigned 32 bits, for more than a gigabit port, a few 10 seconds, this value will reach the maximum, and then will be zeroed and re-start accumulating.
I know that cacti is also using SNMP protocol to collect data, the default is 5 minutes statistics once. For ports with large traffic, traffic data can occur many times to zero in 5 minutes. How did the cacti deal with the situation? I have not learned PHP, so I can not study its source code, is it cacti is always in the collection of data? I do not know if there have been cacti tools of the predecessor, pointing to me a bit. Thanks, man.
Reply to discussion (solution)
1 words is not enough, then why can't he be 2 words?
1 words is not enough, then why can't he be 2 words?
This is not what I can control, it is the type of data defined in the SNMP protocol. I can only use this protocol to value, and cannot change this protocol.
I know the problem, cacti. Using the SNMPV2 protocol, it is possible to support 64-bit. But I do not know how to use java+snmp4j, collect 64 bits of traffic. Alas, there are too few resources related to the Internet.