Project

General

Profile

Bug #25889

Allow reporting CPU usage as a percentage

Added by Craig Shiels about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
Vladimir Vinogradenko
Category:
OS
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

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.

cpu2.png (55.9 KB) cpu2.png Rishabh Chauhan, 11/03/2017 11:18 AM
12907

Associated revisions

Revision 6ba92d31 (diff)
Added by Vladimir Vinogradenko about 1 year ago

feat(collectd): Allow reporting CPU usage in percentage

Ticket: #25889

Revision f7863745 (diff)
Added by Dru Lavigne about 1 year ago

Add report CPU as a percentage.
Ticket: #25889

History

#1 Updated by Dru Lavigne about 1 year ago

  • Assignee changed from Release Council to William Grzybowski

William: please load balance.

#2 Updated by Craig Shiels about 1 year 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 about 1 year 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 about 1 year 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 about 1 year 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 about 1 year ago

I know it doesnt has, but have you checked the actual graph? They seem to be in percentage.

#7 Updated by Craig Shiels about 1 year ago

I'm not using graphite... it may be that graphite correctly transforms this number?

#8 Updated by William Grzybowski about 1 year 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 about 1 year 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 about 1 year ago

  • Status changed from Screened to Unscreened

#11 Updated by William Grzybowski about 1 year ago

  • Assignee changed from William Grzybowski to Vladimir Vinogradenko

#12 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from Unscreened to Screened

#13 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from Screened to Needs Developer Review
  • Assignee changed from Vladimir Vinogradenko to William Grzybowski

#14 Updated by William Grzybowski about 1 year 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 about 1 year ago

  • Status changed from Reviewed by Developer to Ready For Release

#17 Updated by Dru Lavigne about 1 year 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 about 1 year ago

  • Target version changed from 11.1 to 11.1-RC1

#19 Updated by Dru Lavigne about 1 year ago

  • Status changed from Ready For Release to Resolved

#20 Updated by Rishabh Chauhan about 1 year 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)
12907

CPU percentage usage is visible in the reporting section

Also available in: Atom PDF