mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 02:33:18 +00:00
Fix multiple shellcheck issues
This commit is contained in:
parent
5b1099fb83
commit
7fed3b9765
18 changed files with 59 additions and 50 deletions
|
@ -49,7 +49,7 @@ fi
|
|||
|
||||
PLAYERCOUNT=$(LC_LANG=C netstat -tn | grep ":$MC_PORT " | grep ESTABLISHED | wc -l)
|
||||
MC_PID=$(netstat -tlpn | grep ":$MC_PORT " | sed -n -e '1p' | awk '{ print $7 }' | cut -d '/' -f1)
|
||||
if [ ! -z "${MC_PID}" ]
|
||||
if [ -n "${MC_PID}" ]
|
||||
then #is running
|
||||
MEMGiB=$(ps -p "$MC_PID" -o rss | sed -n '2p' | awk '{ print $1 / 1024 / 1024 }')
|
||||
CPU=$(top -bp "$MC_PID" -n 1 | sed -n '$p' | awk '{ print $10 / 100; }')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue