diff options
author | Simon Nagl <simonnagl@aim.com> | 2016-04-28 22:41:15 +0200 |
---|---|---|
committer | Simon Nagl <simonnagl@aim.com> | 2016-04-29 02:31:15 +0200 |
commit | ec28e63c30962818dab315d64ee4da10005e47fd (patch) | |
tree | e4697d0be4d11c27726366b97351fa378722a3f4 /charts.d/tomcat.chart.sh | |
parent | 444aab651daab58c4e727fffe74ea21bc920cdab (diff) |
Fix #282 use modern arithmetic expansion in shell
Use $((.*)) instead of $[.*]
The later one is old syntax
Diffstat (limited to 'charts.d/tomcat.chart.sh')
-rwxr-xr-x | charts.d/tomcat.chart.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/charts.d/tomcat.chart.sh b/charts.d/tomcat.chart.sh index 5ca85e8cf7..f5a4cb99ed 100755 --- a/charts.d/tomcat.chart.sh +++ b/charts.d/tomcat.chart.sh @@ -61,14 +61,14 @@ tomcat_get() { # _create is called once, to create the charts tomcat_create() { cat <<EOF -CHART tomcat.accesses '' "tomcat requests" "requests/s" statistics tomcat.accesses area $[tomcat_priority + 8] $tomcat_update_every +CHART tomcat.accesses '' "tomcat requests" "requests/s" statistics tomcat.accesses area $((tomcat_priority + 8)) $tomcat_update_every DIMENSION accesses '' incremental -CHART tomcat.volume '' "tomcat volume" "KB/s" volume tomcat.volume area $[tomcat_priority + 5] $tomcat_update_every +CHART tomcat.volume '' "tomcat volume" "KB/s" volume tomcat.volume area $((tomcat_priority + 5)) $tomcat_update_every DIMENSION volume '' incremental divisor ${tomcat_decimal_KB_detail} -CHART tomcat.threads '' "tomcat threads" "current threads" statistics tomcat.threads line $[tomcat_priority + 6] $tomcat_update_every +CHART tomcat.threads '' "tomcat threads" "current threads" statistics tomcat.threads line $((tomcat_priority + 6)) $tomcat_update_every DIMENSION current '' absolute 1 DIMENSION busy '' absolute 1 -CHART tomcat.jvm '' "JVM Free Memory" "MB" statistics tomcat.jvm area $[tomcat_priority + 8] $tomcat_update_every +CHART tomcat.jvm '' "JVM Free Memory" "MB" statistics tomcat.jvm area $((tomcat_priority + 8)) $tomcat_update_every DIMENSION jvm '' absolute 1 ${tomcat_decimal_detail} EOF return 0 @@ -89,17 +89,17 @@ tomcat_update() { # write the result of the work. cat <<VALUESEOF BEGIN tomcat.accesses $1 -SET accesses = $[tomcat_accesses] +SET accesses = $((tomcat_accesses)) END BEGIN tomcat.volume $1 -SET volume = $[tomcat_volume] +SET volume = $((tomcat_volume)) END BEGIN tomcat.threads $1 -SET current = $[tomcat_threads] -SET busy = $[tomcat_threads_busy] +SET current = $((tomcat_threads)) +SET busy = $((tomcat_threads_busy)) END BEGIN tomcat.jvm $1 -SET jvm = $[tomcat_jvm_freememory] +SET jvm = $((tomcat_jvm_freememory)) END VALUESEOF |