We use cookies on our website to ensure we provide you with the best experience on our website. By using our website, you agree to the use of cookies for analytics and personalized content.This website uses cookies. More Information
It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda Email Security Gateway

Is there a good method for getting accurate SNMP values for CPU Load on the Barracuda Spam Firewall?

  • Type: Knowledgebase
  • Date changed: 3 years ago
Solution #00001254

Scope:
Applies to Barracuda Spam Firewall models 400 and higher using SNMP for monitoring, firmware versions 3.4.10 and above.

Answer:
You can calculate a periodic CPU load value using the existing values reported by the SNMP agent on the Barracuda Spam Firewall.

The standard SNMP MIB we are using reports the CPU load values averaged since the time the machine was booted. This did not change between our 3.3 release and our 3.4 release. You may observe the result of values changing faster on a machine that has been up for a short amount of time.

To obtain a periodic CPU load value, measurements for active CPU and idle CPU must be taken at two different times.

The calculations are as follows:

active_cpu = ssCpuRawSystem.0 + ssCpuRawNice.0 + ssCpuRawUser.0 idle_cpu = ssCpuRawIdle.0

Commands for the raw values are:

ssCpuRawSystem.0: snmpwalk -Os -v1 -c public 127.0.0.1 1.3.6.1.4.1.2021.11.52
ssCpuRawNice.0: snmpwalk -Os -v1 -c public 127.0.0.1 1.3.6.1.4.1.2021.11.51
ssCpuRawUser.0: snmpwalk -Os -v1 -c public 127.0.0.1 1.3.6.1.4.1.2021.11.50
ssCpuRawIdle.0: snmpwalk -Os -v1 -c public 127.0.0.1 1.3.6.1.4.1.2021.11.53

Let active_cpu[0] and active_cpu[1] be two values taken after an interval of time has passed, and let idle_cpu[0] and idle_cpu[1] be idle)_cpu values taken at the same time. Then, the total CPU usage as a percentage is:

((active_cpu[1] -active_cpu[0]) * 100) / ((active_cpu[1] - active_cpu[0]) + (idle_cpu[1] - idle_cpu[0]))

Barracuda Networks has verified that this formula does provide the correct results.

Additional context for operation of the net-SNMP implementation of CPU statistics can be found on sourceforge.net here.

Link to This Page:
https://campus.barracuda.com/solution/50160000000GOEQAA4