diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-08 07:30:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-08 07:30:37 +0000 |
commit | 8a7b72f7cd1ccd547a03eb4243294e741d661d3f (patch) | |
tree | 7bc7be4a8e9e298daa1349348400aa2a653866f2 /collectors/charts.d.plugin/cpufreq | |
parent | New upstream version 1.11.1+dfsg (diff) | |
download | netdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.tar.xz netdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.zip |
Adding upstream version 1.12.0.upstream/1.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/charts.d.plugin/cpufreq')
-rw-r--r-- | collectors/charts.d.plugin/cpufreq/README.md | 6 | ||||
-rw-r--r-- | collectors/charts.d.plugin/cpufreq/cpufreq.chart.sh | 18 |
2 files changed, 13 insertions, 11 deletions
diff --git a/collectors/charts.d.plugin/cpufreq/README.md b/collectors/charts.d.plugin/cpufreq/README.md index d82951aac..84883f583 100644 --- a/collectors/charts.d.plugin/cpufreq/README.md +++ b/collectors/charts.d.plugin/cpufreq/README.md @@ -1,2 +1,6 @@ +# cpufreq + > THIS MODULE IS OBSOLETE. -> USE THE PYTHON ONE - IT SUPPORTS MULTIPLE JOBS AND IT IS MORE EFFICIENT +> USE THE [PROC PLUGIN](../../proc.plugin) - IT SUPPORTS MULTIPLE JOBS AND IT IS MORE EFFICIENT + +[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcollectors%2Fcharts.d.plugin%2Fcpufreq%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]() diff --git a/collectors/charts.d.plugin/cpufreq/cpufreq.chart.sh b/collectors/charts.d.plugin/cpufreq/cpufreq.chart.sh index 1fc6caabf..68708d911 100644 --- a/collectors/charts.d.plugin/cpufreq/cpufreq.chart.sh +++ b/collectors/charts.d.plugin/cpufreq/cpufreq.chart.sh @@ -30,7 +30,7 @@ cpufreq_check() { # - 0 to enable the chart # - 1 to disable the chart - [ -z "$( cpufreq_find_all_files "$cpufreq_sys_dir" )" ] && return 1 + [ -z "$(cpufreq_find_all_files "$cpufreq_sys_dir")" ] && return 1 return 0 } @@ -47,16 +47,15 @@ cpufreq_create() { echo >>"$TMP_DIR/cpufreq.sh" "echo \"BEGIN cpu.cpufreq \$1\"" i=0 - for file in $( cpufreq_find_all_files "$cpufreq_sys_dir" | sort -u ) - do - i=$(( i + 1 )) - dir=$( dirname "$file" ) + for file in $(cpufreq_find_all_files "$cpufreq_sys_dir" | sort -u); do + i=$((i + 1)) + dir=$(dirname "$file") cpu= - [ -f "$dir/affected_cpus" ] && cpu=$( cat "$dir/affected_cpus" ) + [ -f "$dir/affected_cpus" ] && cpu=$(cat "$dir/affected_cpus") [ -z "$cpu" ] && cpu="$i.a" - id="$( fixid "cpu$cpu" )" + id="$(fixid "cpu$cpu")" debug "file='$file', dir='$dir', cpu='$cpu', id='$id'" @@ -68,7 +67,7 @@ cpufreq_create() { [ $cpufreq_source_update -eq 1 ] && echo >>"$TMP_DIR/cpufreq.sh" "}" # ok, load the function cpufreq_update() we created - # shellcheck disable=SC1090 + # shellcheck disable=SC1090 [ $cpufreq_source_update -eq 1 ] && . "$TMP_DIR/cpufreq.sh" return 0 @@ -82,9 +81,8 @@ cpufreq_update() { # do all the work to collect / calculate the values # for each dimension # remember: KEEP IT SIMPLE AND SHORT - # shellcheck disable=SC1090 + # shellcheck disable=SC1090 [ $cpufreq_source_update -eq 0 ] && . "$TMP_DIR/cpufreq.sh" "$1" return 0 } - |