CPU Frequency Plugin

This plugin monitors the current clock frequency of each CPU core. Use it to see whether your processors are running at full speed or are being slowed down by power saving or thermal throttling, for example together with the CPU Temperature plugin.

Reported Metrics

The plugin reports one value for each CPU core, numbered from 0:

MetricDescription
0, 1, 2, ...Current frequency of that core, in MHz.

For example, a four-core server reports 0, 1, 2 and 3. A value is the frequency at the moment the plugin runs, not an average, so it can change a lot between runs when the CPU governor adjusts the speed to the load.

Requirements

  • A Linux server that reports the CPU frequency. Most physical servers do. Some virtual machines and containers don't expose it, see Troubleshooting.
  • The psutil Python module, which is installed together with the agent.

The plugin only reads system information, so it doesn't need root or a sudoers rule.

Configure the plugin

Add the following lines to the /etc/agent360-custom.ini file:

[cpu_freq]
enabled = yes

There are no other options. The plugin reports all CPU cores.

Test the plugin

Run the following command:

sudo -u agent360 agent360 test cpu_freq

The output should show one frequency for each CPU core. Then restart the agent for the change to take effect:

service agent360 restart

You can compare the values with grep MHz /proc/cpuinfo.

Troubleshooting

  • The test returns an error. The system doesn't report the CPU frequency, which is common in virtual machines and some containers. Check whether the information exists:
    ls /sys/devices/system/cpu/cpu0/cpufreq/
    grep MHz /proc/cpuinfo
    If neither shows a frequency, the plugin can't work on that server.
  • All cores show the same, constant value. Some systems report only the nominal frequency, not the real one. This is typical for virtual machines and for platforms other than Linux.
  • Values change a lot. This is normal. The CPU governor lowers the frequency when the server is idle. To keep the CPU at full speed, set the performance governor.
  • No data in the dashboard. Make sure the [cpu_freq] section is in /etc/agent360-custom.ini, enabled = yes, and that you restarted the agent.

Did this page help you?