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__heap
1
#!/bin/bash
1
#!/bin/sh
2 2
#
3 3
# Plugin for monitor JVM activity - Heap Usage -
4 4
#
......
64 64

  
65 65

  
66 66
print_config() {
67
    echo "graph_title Heap Usage" $graphtitle
67
    echo "graph_title Heap Usage $graphtitle"
68 68
    echo "graph_args --base 1024 -l 0"
69 69
    echo "graph_vlabel Heap Usage(Bytes)"
70 70
    echo "graph_info Heap Usage"
71 71
    echo "graph_category virtualization"
72 72

  
73
    if [ "${JDK_TYPE}" == "bea" ]; then
73
    if [ "${JDK_TYPE}" = "bea" ]; then
74 74
        echo "NurserySize.label NurserySize"
75 75
        echo "HeapSize.label HeapSize"
76 76
        echo "UsedHeapSize.label UsedHeapSize"
......
105 105
print_stats() {
106 106
    local pid_num="$1"
107 107
    local awk_script
108
    if [ "${JDK_TYPE}" == "bea" ]; then
108
    if [ "${JDK_TYPE}" = "bea" ]; then
109 109
        # shellcheck disable=SC2016
110 110
        awk_script='{
111 111
            HeapSize = $1;
......
185 185
    exit 1
186 186
  fi
187 187

  
188
  if [ ! -f "${pidfilepath}" -o ! -r "${pidfilepath}" ]; then
188
  if [ ! -f "${pidfilepath}" ] || [ ! -r "${pidfilepath}" ]; then
189 189
    echo "no (No such file ${pidfilepath} or cannot read ${pidfilepath}"
190 190
    exit 1
191 191
  fi

Formats disponibles : Unified diff