diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:45:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:45:55 +0000 |
commit | a8220ab2d293bb7f4b014b79d16b2fb05090fa93 (patch) | |
tree | 77f0a30f016c0925cf7ee9292e644bba183c2774 /collectors/charts.d.plugin/cpufreq | |
parent | Adding upstream version 1.19.0. (diff) | |
download | netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.tar.xz netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.zip |
Adding upstream version 1.29.0.upstream/1.29.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/Makefile.inc | 13 | ||||
-rw-r--r-- | collectors/charts.d.plugin/cpufreq/README.md | 6 | ||||
-rw-r--r-- | collectors/charts.d.plugin/cpufreq/cpufreq.chart.sh | 88 | ||||
-rw-r--r-- | collectors/charts.d.plugin/cpufreq/cpufreq.conf | 24 |
4 files changed, 0 insertions, 131 deletions
diff --git a/collectors/charts.d.plugin/cpufreq/Makefile.inc b/collectors/charts.d.plugin/cpufreq/Makefile.inc deleted file mode 100644 index 682379133..000000000 --- a/collectors/charts.d.plugin/cpufreq/Makefile.inc +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later - -# THIS IS NOT A COMPLETE Makefile -# IT IS INCLUDED BY ITS PARENT'S Makefile.am -# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT - -# install these files -dist_charts_DATA += cpufreq/cpufreq.chart.sh -dist_chartsconfig_DATA += cpufreq/cpufreq.conf - -# do not install these files, but include them in the distribution -dist_noinst_DATA += cpufreq/README.md cpufreq/Makefile.inc - diff --git a/collectors/charts.d.plugin/cpufreq/README.md b/collectors/charts.d.plugin/cpufreq/README.md deleted file mode 100644 index fc2bfca19..000000000 --- a/collectors/charts.d.plugin/cpufreq/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# cpufreq - -> THIS MODULE IS OBSOLETE. -> 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 deleted file mode 100644 index 68708d911..000000000 --- a/collectors/charts.d.plugin/cpufreq/cpufreq.chart.sh +++ /dev/null @@ -1,88 +0,0 @@ -# shellcheck shell=bash -# no need for shebang - this file is loaded from charts.d.plugin -# SPDX-License-Identifier: GPL-3.0-or-later - -# netdata -# real-time performance and health monitoring, done right! -# (C) 2016 Costa Tsaousis <costa@tsaousis.gr> -# - -# if this chart is called X.chart.sh, then all functions and global variables -# must start with X_ - -cpufreq_sys_dir="${NETDATA_HOST_PREFIX}/sys/devices" -cpufreq_sys_depth=10 -cpufreq_source_update=1 - -# _update_every is a special variable - it holds the number of seconds -# between the calls of the _update() function -cpufreq_update_every= -cpufreq_priority=10000 - -cpufreq_find_all_files() { - find "$1" -maxdepth $cpufreq_sys_depth -name scaling_cur_freq 2>/dev/null -} - -# _check is called once, to find out if this chart should be enabled or not -cpufreq_check() { - - # this should return: - # - 0 to enable the chart - # - 1 to disable the chart - - [ -z "$(cpufreq_find_all_files "$cpufreq_sys_dir")" ] && return 1 - return 0 -} - -# _create is called once, to create the charts -cpufreq_create() { - local dir file id i - - # we create a script with the source of the - # cpufreq_update() function - # - the highest speed we can achieve - - [ $cpufreq_source_update -eq 1 ] && echo >"$TMP_DIR/cpufreq.sh" "cpufreq_update() {" - - echo "CHART cpu.cpufreq '' 'CPU Clock' 'MHz' 'cpufreq' '' line $((cpufreq_priority + 1)) $cpufreq_update_every" - 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") - cpu= - - [ -f "$dir/affected_cpus" ] && cpu=$(cat "$dir/affected_cpus") - [ -z "$cpu" ] && cpu="$i.a" - - id="$(fixid "cpu$cpu")" - - debug "file='$file', dir='$dir', cpu='$cpu', id='$id'" - - echo "DIMENSION $id '$id' absolute 1 1000" - echo >>"$TMP_DIR/cpufreq.sh" "echo \"SET $id = \"\$(< $file )" - done - echo >>"$TMP_DIR/cpufreq.sh" "echo END" - - [ $cpufreq_source_update -eq 1 ] && echo >>"$TMP_DIR/cpufreq.sh" "}" - - # ok, load the function cpufreq_update() we created - # shellcheck disable=SC1090 - [ $cpufreq_source_update -eq 1 ] && . "$TMP_DIR/cpufreq.sh" - - return 0 -} - -# _update is called continuously, to collect the values -cpufreq_update() { - # the first argument to this function is the microseconds since last update - # pass this parameter to the BEGIN statement (see bellow). - - # do all the work to collect / calculate the values - # for each dimension - # remember: KEEP IT SIMPLE AND SHORT - # shellcheck disable=SC1090 - [ $cpufreq_source_update -eq 0 ] && . "$TMP_DIR/cpufreq.sh" "$1" - - return 0 -} diff --git a/collectors/charts.d.plugin/cpufreq/cpufreq.conf b/collectors/charts.d.plugin/cpufreq/cpufreq.conf deleted file mode 100644 index 7130555af..000000000 --- a/collectors/charts.d.plugin/cpufreq/cpufreq.conf +++ /dev/null @@ -1,24 +0,0 @@ -# no need for shebang - this file is loaded from charts.d.plugin - -# netdata -# real-time performance and health monitoring, done right! -# (C) 2018 Costa Tsaousis <costa@tsaousis.gr> -# GPL v3+ - -# THIS PLUGIN IS DEPRECATED -# USE THE PYTHON.D ONE - -#cpufreq_sys_dir="/sys/devices" -#cpufreq_sys_depth=10 -#cpufreq_source_update=1 - -# the data collection frequency -# if unset, will inherit the netdata update frequency -#cpufreq_update_every= - -# the charts priority on the dashboard -#cpufreq_priority=10000 - -# the number of retries to do in case of failure -# before disabling the module -#cpufreq_retries=10 |