Cleaning up VPS today for new hardware. I found the script I used before this and before running own server hosting PHP script instead of getting it from game-monitor. They shutdown and that helped me
do more than just Drupalize.
PHP Code:
#!/bin/sh
SERVER=NAMEYOURSERVER
IP=TYPEYOURIP
PORT=27015
BAD="999"
#NBR=`GET http://module.game-monitor.com/YOURIP:27016/data/server.js |
#grep -w "query_time" | rev | cut -c 5-8 | rev`
NBR=`GET http://goldsrc.live/servers/info/$IP:$PORT |grep ms|cut -d "<" -f 2|cut -d ">" -f2|cut -d " " -f1`
if [ $BAD \> $NBR ]; then
echo "$SERVER IS RUNNING...latency is calculating as"
echo $NBR
else
echo "$SERVER WEDGED...latency is calculating as"
echo $NBR
~/crashb.sh
fi
__________________