1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-25 10:28:36 +00:00

Plugins jstat__*: fix shellcheck issues; switch from bash to sh

This commit is contained in:
Lars Kruse 2018-07-04 04:14:33 +02:00
parent f5e6d7ea17
commit 67f9783780
3 changed files with 15 additions and 15 deletions

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
#
# Plugin for monitor JVM activity - GC Time -
#
@ -64,7 +64,7 @@ get_jdk_type() {
print_config() {
echo 'graph_title GC Time' $graphtitle
echo "graph_title GC Time $graphtitle"
echo 'graph_args -l 0'
echo 'graph_vlabel GC Time(sec)'
echo 'graph_total total'
@ -73,7 +73,7 @@ print_config() {
echo 'Young_GC.label Young_GC'
echo 'Young_GC.min 0'
if [ "${JDK_TYPE}" == "bea" ]; then
if [ "${JDK_TYPE}" = "bea" ]; then
echo 'Old_GC.label Old_GC'
echo 'Old_GC.min 0'
echo 'Young_Pause.label Young_GC Pause'
@ -90,7 +90,7 @@ print_config() {
print_stats() {
local pid_num="$1"
local awk_script
if [ "${JDK_TYPE}" == "bea" ]; then
if [ "${JDK_TYPE}" = "bea" ]; then
# shellcheck disable=SC2016
awk_script='{
YCTime = $6;
@ -130,7 +130,7 @@ if [ "$1" = "autoconf" ]; then
exit 1
fi
if [ ! -f "${pidfilepath}" -o ! -r "${pidfilepath}" ]; then
if [ ! -f "${pidfilepath}" ] || [ ! -r "${pidfilepath}" ]; then
echo "no (No such file ${pidfilepath} or cannot read ${pidfilepath}"
exit 1
fi