diff options
author | charleszlu <c4planted@gmail.com> | 2014-08-09 09:52:22 +0400 |
---|---|---|
committer | charleszlu <c4planted@gmail.com> | 2014-08-09 09:52:22 +0400 |
commit | 527c17e3233d6b00ef907891c790e47b27f3696c (patch) | |
tree | 48ed671e197899fc45ab5bf61d8ced97b795cea5 | |
parent | 31f045e74f4ba72ee48e143b5e9ff82f2bf7747b (diff) |
Delete minecraft_
not needed
-rw-r--r-- | minecraft_ | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/minecraft_ b/minecraft_ deleted file mode 100644 index 837d36b..0000000 --- a/minecraft_ +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -LANG=C -LC_ALL=C -MC_PORT=${0##*_} - -if [ "$1" = "config" ] -then - printf 'graph_title Minecraft-Server (Port %s)\n' ${MC_PORT} - printf 'graph_vlabel Anzahl\n' - printf 'users.label Benutzer\n' - printf 'ramusage.label Verwendeter RAM in GiB\n' - exit 0 -fi - - -PLAYERCOUNT=$(netstat -tn | grep -i ${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}" ] -then #is running - MEMORYRSS=$(ps -p ${MC_PID} -o rss | grep -v RSS) - MEMGiB=$(echo "scale=2;${MEMORYRSS}/1024/1024" | bc -l) -else - MEMGiB=0 -fi - -printf "users.value %i\n" "${PLAYERCOUNT}" -printf "ramusage.value %3.2f\n" "${MEMGiB}" |