aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/config/ROBUST
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-11-08 22:17:09 +1000
committerDavid Walter Seikel2016-11-08 22:17:09 +1000
commit3c279d6c3b66a7f5ad49e16180b69ffa94513dc5 (patch)
tree796f28d91cbc7339d8c5202c429bad07b4e27cd7 /config/ROBUST
parentNew README and TODO I forgot to commit before. (diff)
downloadopensim-SC_OLD-3c279d6c3b66a7f5ad49e16180b69ffa94513dc5.zip
opensim-SC_OLD-3c279d6c3b66a7f5ad49e16180b69ffa94513dc5.tar.gz
opensim-SC_OLD-3c279d6c3b66a7f5ad49e16180b69ffa94513dc5.tar.bz2
opensim-SC_OLD-3c279d6c3b66a7f5ad49e16180b69ffa94513dc5.tar.xz
Installation script.
Diffstat (limited to 'config/ROBUST')
-rw-r--r--config/ROBUST/opensim-monit.conf36
1 files changed, 36 insertions, 0 deletions
diff --git a/config/ROBUST/opensim-monit.conf b/config/ROBUST/opensim-monit.conf
new file mode 100644
index 0000000..70190b9
--- /dev/null
+++ b/config/ROBUST/opensim-monit.conf
@@ -0,0 +1,36 @@
1# manage the OpenSim process for Your Sim
2#
3# usage:
4# monit start your_sim
5# monit stop your_sim
6# monit restart your_sim
7#
8# see 'daemon' setting in /etc/monit/monitrc for the cycle length.
9# on ubuntu/debian, this is overridden by the CHECK_INTERVALS var in
10# /etc/default/monit . the below assumes you've set it to 30 seconds.
11#
12# if process dies, will restart sim within 30 seconds. if process
13# dies 5 times in as many tries, will stop trying and send email
14# alert.
15#
16# if SimFPS drops to 0 for 2 minutes, restart.
17#
18# if process CPU usage stays above 300% for 2 minutes, restart.
19#
20# see ../README for configuration instructions.
21#
22# Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l.
23#
24check process ROBUST with pidfile /var/run/opensim/ROBUST.pid
25 start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/ROBUST && /opt/opensim/config/ROBUST/start-sim -q'"
26 as uid root and gid root
27 stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/ROBUST && /opt/opensim/config/ROBUST/stop-sim'" with timeout 600 seconds
28 if cpu usage > 50% for 4 cycles then restart
29# if 5 restarts within 5 cycles then timeout
30# if failed url http://127.0.0.1:9005/jsonSimStats/
31# and content != '"SimFPS":0.0,' for 4 cycles
32# then restart
33# if failed url http://127.0.0.1:9008/jsonSimStats/
34# and content == '"SimFPS":' for 4 cycles
35# then restart
36