diff options
author | Lennart Weller <lhw@ring0.de> | 2017-01-24 15:21:09 +0000 |
---|---|---|
committer | Lennart Weller <lhw@ring0.de> | 2017-01-24 15:21:09 +0000 |
commit | 3ed3b02ed96ddab1c084811f3579b3a2aec83e04 (patch) | |
tree | 7a61ab288ae47800c4f11be5677d6ad8288dcd98 /charts.d/cpufreq.chart.sh | |
parent | New upstream version 1.4.0+dfsg (diff) | |
download | netdata-3ed3b02ed96ddab1c084811f3579b3a2aec83e04.tar.xz netdata-3ed3b02ed96ddab1c084811f3579b3a2aec83e04.zip |
New upstream version 1.5.0+dfsgupstream/1.5.0+dfsg
Diffstat (limited to '')
-rwxr-xr-x | charts.d/cpufreq.chart.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/charts.d/cpufreq.chart.sh b/charts.d/cpufreq.chart.sh index 06f692fa..b21504a0 100755 --- a/charts.d/cpufreq.chart.sh +++ b/charts.d/cpufreq.chart.sh @@ -1,9 +1,15 @@ # no need for shebang - this file is loaded from charts.d.plugin +# netdata +# real-time performance and health monitoring, done right! +# (C) 2016 Costa Tsaousis <costa@tsaousis.gr> +# GPL v3+ +# + # if this chart is called X.chart.sh, then all functions and global variables # must start with X_ -cpufreq_sys_dir="/sys/devices" +cpufreq_sys_dir="${NETDATA_HOST_PREFIX}/sys/devices" cpufreq_sys_depth=10 cpufreq_source_update=1 @@ -51,7 +57,7 @@ cpufreq_create() { id="$( fixid "cpu$cpu" )" - echo >&2 "charts.d: cpufreq: on file='$file', dir='$dir', cpu='$cpu', id='$id'" + 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 )" @@ -59,7 +65,6 @@ cpufreq_create() { echo >>$TMP_DIR/cpufreq.sh "echo END" [ $cpufreq_source_update -eq 1 ] && echo >>$TMP_DIR/cpufreq.sh "}" - # cat >&2 $TMP_DIR/cpufreq.sh # ok, load the function cpufreq_update() we created [ $cpufreq_source_update -eq 1 ] && . $TMP_DIR/cpufreq.sh |