Projet

Général

Profil

Révision 67f97837

ID67f978378072f823726a0b24d448c4de937cf835
Parent f5e6d7ea
Enfant 0ddc7e2f

Ajouté par Lars Kruse il y a plus de 7 ans

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

Voir les différences:

plugins/jvm/jstat__gctime
1
#!/bin/bash
1
#!/bin/sh
2 2
#
3 3
# Plugin for monitor JVM activity - GC Time -
4 4
#
......
64 64

  
65 65

  
66 66
print_config() {
67
    echo 'graph_title GC Time' $graphtitle
67
    echo "graph_title GC Time $graphtitle"
68 68
    echo 'graph_args -l 0'
69 69
    echo 'graph_vlabel GC Time(sec)'
70 70
    echo 'graph_total total'
......
73 73

  
74 74
    echo 'Young_GC.label Young_GC'
75 75
    echo 'Young_GC.min 0'
76
    if [ "${JDK_TYPE}" == "bea" ]; then
76
    if [ "${JDK_TYPE}" = "bea" ]; then
77 77
        echo 'Old_GC.label Old_GC'
78 78
        echo 'Old_GC.min 0'
79 79
        echo 'Young_Pause.label Young_GC Pause'
......
90 90
print_stats() {
91 91
    local pid_num="$1"
92 92
    local awk_script
93
    if [ "${JDK_TYPE}" == "bea" ]; then
93
    if [ "${JDK_TYPE}" = "bea" ]; then
94 94
        # shellcheck disable=SC2016
95 95
        awk_script='{
96 96
            YCTime = $6;
......
130 130
    exit 1
131 131
  fi
132 132

  
133
  if [ ! -f "${pidfilepath}" -o ! -r "${pidfilepath}" ]; then
133
  if [ ! -f "${pidfilepath}" ] || [ ! -r "${pidfilepath}" ]; then
134 134
    echo "no (No such file ${pidfilepath} or cannot read ${pidfilepath}"
135 135
    exit 1
136 136
  fi

Formats disponibles : Unified diff