]> arthur.barton.de Git - netdata.git/blobdiff - charts.d/cpufreq.chart.sh
Merge branch 'objects'
[netdata.git] / charts.d / cpufreq.chart.sh
index 6a968237de75983fe5c924a6a99e32adfff22e61..7dd994e252a9d1a75bf79e606fdd9db0a858cccc 100755 (executable)
@@ -36,7 +36,7 @@ cpufreq_create() {
        # - 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 "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
@@ -54,7 +54,7 @@ cpufreq_create() {
                echo >&2 "charts.d: cpufreq: on file='$file', dir='$dir', cpu='$cpu', id='$id'"
 
                echo "DIMENSION $id '$id' absolute 1 1000"
-               echo >>$TMP_DIR/cpufreq.sh "printf \"SET $id = \"; cat $file "
+               echo >>$TMP_DIR/cpufreq.sh "echo \"SET $id = \"\$(< $file )"
        done
        echo >>$TMP_DIR/cpufreq.sh "echo END"