Bug #25889
Allow reporting CPU usage as a percentage
Description
As part of getting a bunch of systems visible with Grafana, I looked into collectd on FreeNAS.
This is the first of many issues.
collectd retrieves "raw" cpu information from the system for storing but unfortunately the "raw" is hard to use in a heterogenous environment.
What's required is for CPU use to be presented in percentages.
On Linux systems, I use this stansa in collectd.conf:
<Plugin cpu>
ReportByCpu True
ValuesPercentage True
</Plugin>
I tried adding this to collectd.conf on FreeNAS 9.3 but found out that this is not supported.
Associated revisions
History
#1
Updated by Dru Lavigne over 3 years ago
- Assignee changed from Release Council to William Grzybowski
William: please load balance.
#2
Updated by Craig Shiels over 3 years ago
In addition, the aggregation section for CPUs should be updated:
<Plugin "aggregation">
<Aggregation>
Plugin "cpu"
Type "percent"
GroupBy "Host"
GroupBy "TypeInstance"
CalculateNum true
CalculateSum true
CalculateAverage true
CalculateMinimum true
CalculateMaximum true
CalculateStddev true
</Aggregation>
</Plugin>
#3
Updated by Craig Shiels over 3 years ago
And to make aggregations work requires some help from PostCache:
<Chain "PostCache">
<Rule "cpu_to_aggr">
<Match regex>
Plugin "^cpu$"
</Match>
<Target write>
Plugin "aggregation"
</Target>
</Rule>
</Chain>
#4
Updated by William Grzybowski over 3 years ago
- Status changed from Unscreened to 15
- Target version set to 11.1
Can you try that on latest 11.0 and let me know if this is not working for you?
#5
Updated by Craig Shiels over 3 years ago
No, this is not fixed in 11.0.
11.0 has this:
<Plugin "aggregation">
<Aggregation>
Plugin "cpu"
Type "cpu"
GroupBy "Host"
GroupBy "TypeInstance"
CalculateSum true
</Aggregation>
</Plugin>
<Plugin cputemp>
</Plugin>
It is missing the first part of this issue - does not report CPU as a percentage. This may need to be a check-box thing if people are already using the existing stats as they already are.
#6
Updated by William Grzybowski over 3 years ago
I know it doesnt has, but have you checked the actual graph? They seem to be in percentage.
#7
Updated by Craig Shiels over 3 years ago
I'm not using graphite... it may be that graphite correctly transforms this number?
#8
Updated by William Grzybowski over 3 years ago
- Status changed from 15 to Screened
Craig Shiels wrote:
I'm not using graphite... it may be that graphite correctly transforms this number?
I am referring to the FreeNAS Reporting UI but you're right. Thats rrdtool doing the transformation.
#9
Updated by William Grzybowski over 3 years ago
- Priority changed from No priority to Nice to have
- Target version changed from 11.1 to 11.2-BETA1
#10
Updated by William Grzybowski over 3 years ago
- Status changed from Screened to Unscreened
#11
Updated by William Grzybowski over 3 years ago
- Assignee changed from William Grzybowski to Vladimir Vinogradenko
#12
Updated by Vladimir Vinogradenko over 3 years ago
- Status changed from Unscreened to Screened
#13
Updated by Vladimir Vinogradenko over 3 years ago
- Status changed from Screened to Needs Developer Review
- Assignee changed from Vladimir Vinogradenko to William Grzybowski
#14
Updated by William Grzybowski over 3 years ago
- Status changed from Needs Developer Review to Reviewed by Developer
- Assignee changed from William Grzybowski to Vladimir Vinogradenko
- Target version changed from 11.2-BETA1 to 11.1
#16
Updated by Vladimir Vinogradenko over 3 years ago
- Status changed from Reviewed by Developer to Ready For Release
#17
Updated by Dru Lavigne over 3 years ago
- Subject changed from collectd service does not present cpu metrics as percentages to Allow reporting CPU usage as a percentage
#18
Updated by Dru Lavigne over 3 years ago
- Target version changed from 11.1 to 11.1-RC1
#19
Updated by Dru Lavigne over 3 years ago
- Status changed from Ready For Release to Resolved
#20
Updated by Rishabh Chauhan over 3 years ago
- File cpu2.png cpu2.png added
- Needs QA changed from Yes to No
- QA Status Test Passes FreeNAS added
- QA Status deleted (
Not Tested)
CPU percentage usage is visible in the reporting section