diff options
author | Lennart Weller <lhw@ring0.de> | 2016-05-25 10:36:27 +0000 |
---|---|---|
committer | Lennart Weller <lhw@ring0.de> | 2016-05-25 10:36:27 +0000 |
commit | 39ecaf8d995e3fefea54f260b8b42bbb9cc806d6 (patch) | |
tree | 02ecee3bf4d7dad9dfad2e1799616716f5ffbf03 /plugins.d/charts.d.plugin | |
parent | broken logrotate (diff) | |
parent | Imported Upstream version 1.2.0 (diff) | |
download | netdata-39ecaf8d995e3fefea54f260b8b42bbb9cc806d6.tar.xz netdata-39ecaf8d995e3fefea54f260b8b42bbb9cc806d6.zip |
Merge tag 'upstream/1.2.0'
Upstream version 1.2.0
Diffstat (limited to 'plugins.d/charts.d.plugin')
-rwxr-xr-x | plugins.d/charts.d.plugin | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins.d/charts.d.plugin b/plugins.d/charts.d.plugin index 27b294709..2824fa3c6 100755 --- a/plugins.d/charts.d.plugin +++ b/plugins.d/charts.d.plugin @@ -84,7 +84,7 @@ time_divisor=50 # number of seconds to run without restart # after this time, charts.d.plugin will exit # netdata will restart it -restart_timeout=$[3600 * 4] +restart_timeout=$((3600 * 4)) # check if the charts.d plugins are using global variables # they should not. @@ -247,7 +247,7 @@ float2int() { # echo >&2 "value='${1}' f='${f}', m='${m}'" # the length of the multiplier - 1 - l=$[ ${#m} - 1 ] + l=$(( ${#m} - 1 )) # check if the number is in scientific notation if [[ ${f} =~ ^[[:space:]]*(-)?[0-9.]+(e|E)(\+|-)[0-9]+ ]] @@ -269,7 +269,7 @@ float2int() { # strip leading zeros from the integer part # base 10 convertion - a=$[10#$a] + a=$((10#$a)) # check the length of the decimal part # against the length of the multiplier @@ -281,16 +281,16 @@ float2int() { elif [ ${#b} -lt ${l} ] then # too few digits - pad with zero on the right - local z="00000000000000000000000" r=$[l - ${#b}] + local z="00000000000000000000000" r=$((l - ${#b})) b="${b}${z:0:${r}}" fi # strip leading zeros from the decimal part # base 10 convertion - b=$[10#$b] + b=$((10#$b)) # store the result - FLOAT2INT_RESULT=$[ (a * m) + b ] + FLOAT2INT_RESULT=$(( (a * m) + b )) #echo >&2 "FLOAT2INT_RESULT='${FLOAT2INT_RESULT}'" } |