From 554583496a2fdd3b9399c73a7fc526f99956e5bc Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 28 Nov 2011 04:53:09 +1000 Subject: Backup sim regularly. Rest don't work, screen would be better even if it did work. New scripts for stopping the sim, backing up the sim, and showing the console. Monit script works now. --- opensim-monit.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'opensim-monit.conf') diff --git a/opensim-monit.conf b/opensim-monit.conf index c98ad91..7d26a82 100644 --- a/opensim-monit.conf +++ b/opensim-monit.conf @@ -20,11 +20,11 @@ # see ../README for configuration instructions. # check process sim01 with pidfile /var/run/opensim/sim01.pid - start program = "/bin/bash -c 'cd /opt/opensim/config/sim01 && /opt/opensim/sim01/start-sim -q'" + start program = "/bin/bash -c 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/start-sim -q'" as uid opensim and gid opensim - stop program = "/bin/kill -9 `cat /var/run/opensim/sim01.pid`" -# if cpu usage > 300% for 4 cycles then restart -# if 5 restarts within 5 cycles then timeout + stop program = "/bin/bash -c 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/stop-sim'" with timeout 600 seconds + if cpu usage > 200% for 4 cycles then restart + if 5 restarts within 5 cycles then timeout # if failed url http://127.0.0.1:9005/jsonSimStats/ # and content != '"SimFPS":0.0,' for 4 cycles # then restart -- cgit v1.1