0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-21 12:20:38 +00:00
Commit graph

20 commits

Author SHA1 Message Date
Paweł Krupa
d536ba6a43 fix spdx () 2018-09-30 02:36:42 +03:00
Austin S. Hemmelgarn
f7bddbe07b
Python.d PEP 8 cleanup, modules A-C ()
* cpufreq.chart.py PEP 8 code cleanups

Fixes formatting of nested container literals and two cases of using
len() to determine if a container is empty or not.

* python.d/apache.chart.py PEP 8 cleanup.

Makes quotes consistent for string literals and enforces preferred
formatting for container literals.

* python.d/beanstalk.chart.py PEP 8 cleanup

Fixes formatting of container literals.

* python.d/bind_rndc.chart.py PEP 8 cleanup

Fixed container literal formatting.

* python.d/ceph.chart.py PEP 8 cleanup

Fixed container literal formatting and line-continuation indentation.

* python.d/chrony.chart.py PEP 8 cleanups

Fixed container literal formatting and made string literals use
consistent quotes.

* python.d/cpuidle.chart.py PEP 8 cleanup

Fixed container literal formatting and made string literals use
consistent quotes.
2018-09-26 11:37:54 -04:00
Paweł Krupa
3e929ad4ee
give credit where credit is due ()
Mostly add @l2isbad as an author.
2018-09-26 09:38:36 +02:00
Austin S. Hemmelgarn
e8915e2653 Add SPDX-License-Identifier headers to most files.
This tags all the files that I can clearly identify as being part of
Netdata and not a local copy of a third party package that we're
redistributing.
2018-05-31 15:33:12 -04:00
lgz
20a6c9ce9c cpufreq, cpuidle modules chart context fix 2017-11-05 23:00:33 +09:00
lgz
7f9afedeee "example" module fixes 2017-10-20 13:51:12 +09:00
lgz
9350c06e37 "cpufreq" module fixes 2017-10-20 13:51:12 +09:00
Steven Noonan
865aedf6bf
cpufreq.chart.py: use much more accurate accounting for average CPU frequency
The way I was tracking it before was bad because if we were too early or
late reading the time_in_state file, we might get really bogus results.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2017-09-09 08:54:53 -07:00
Steven Noonan
61dbe88ef1
cpufreq.chart.py: fix accurate mode
It needs to fail one iteration so there's something to calculate deltas
against (the first iteration has no prior data). Once it has the first
pass, all future iterations will use the accurate mode data, if it's
available.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2017-09-09 08:22:40 -07:00
Ilya
0e3e0b2740 cpufreq plugin: cpu ordering in chart fixed 2017-06-22 22:54:57 +09:00
Costa Tsaousis (ktsaou)
0bf73332fb
prevent cpufreq messages flood; fixes 2017-03-13 23:21:58 +02:00
Steven Noonan
c290b78e7e cpufreq.chart.py: support dynamically falling back from accurate to inaccurate mode
If we switch the 'schedutil' cpufreq governor on, the 'time_in_state'
data becomes useless. And since cpufreq governors can be switched at any
time, we might as well make it possible to support transitioning between
governors without any bogus data appearing in our charts.

Before this commit, switching to 'schedutil' results in zeroed values,
and switching back to any other governor causes a huge spike datapoint
in the timeline.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2017-01-10 04:53:37 -08:00
Steven Noonan
b22a2ed789 cpufreq.chart.py: add more accurate cpufreq_stats-based calculations
There were two major problems with this module:

- The 'cpuN' names weren't accurate. The 'self.paths.sort()' was trying
  to compensate for os.walk() enumerating the CPUs out of order (as any
  directory enumeration will do). Unfortunately the sort() function is
  alphabetical, so it would result in a list of paths like this:

    [
        '/sys/.../cpu0/...'
        '/sys/.../cpu1/...'
        '/sys/.../cpu11/...'
        '/sys/.../cpu12/...'
        ...
    ]

  So the chart for cpu2 would actually map to cpu11's stats.

  This can be corrected by extracting the 'cpuN' value that's already
  inside the path anyway.

- The scaling_cur_freq value is an instantaneous value. It only
  represents the current processor P-state at the time it was read, and
  doesn't account for the other 999ms that netdata wasn't looking at the
  value.

  This can be corrected by using data from cpufreq_stats, which includes
  P-state residency statistics. Note that the values in cpufreq_stats
  aren't always valid (e.g. if the cpufreq governor is set to
  'schedutil', the statistic files exist but are are empty), so we can
  just fall back to the inaccurate scaling_cur_freq method if necessary.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2017-01-09 14:35:20 -08:00
paulfantom
de28369c6b auto-add NETDATA_HOST_PREFIX to cpufreq.chart.py 2016-07-19 02:53:50 +02:00
paulfantom
4d80b11402 cpufreq no file found message 2016-07-15 16:34:50 +02:00
paulfantom
38f5855621 minor fixes 2016-07-07 19:07:47 +02:00
paulfantom
7f801f557a enable different path for /sys/devices in cpufreq.chart.py 2016-07-07 15:36:19 +02:00
paulfantom
f862e71a06 sort makefile + minor change in comments 2016-07-07 12:23:15 +02:00
paulfantom
8d31f4703d remove SysFileService prototype 2016-07-07 00:54:37 +02:00
paulfantom
3c0be443d6 cpufreq + SysFileService prototype 2016-07-07 00:47:37 +02:00