From ca7a2ed839f8fec5a7d7abbf50fc2c031f192fb5 Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 22 May 2019 19:14:35 +1000 Subject: Major tweaking of the scripts to suit the new setup. --- example/caches/MeshCache/.keep | 0 example/config/ROBUST/opensim-monit.conf | 6 +++--- example/config/config.ini | 30 +++++++++++--------------- example/config/sim_skeleton/My_sim.xml | 7 ++++++ example/config/sim_skeleton/ThisSim.ini | 21 +++++++++++++++--- example/config/sim_skeleton/opensim-monit.conf | 8 +++---- example/start.sh | 2 +- 7 files changed, 45 insertions(+), 29 deletions(-) create mode 100644 example/caches/MeshCache/.keep (limited to 'example') diff --git a/example/caches/MeshCache/.keep b/example/caches/MeshCache/.keep new file mode 100644 index 0000000..e69de29 diff --git a/example/config/ROBUST/opensim-monit.conf b/example/config/ROBUST/opensim-monit.conf index 70190b9..adce46d 100644 --- a/example/config/ROBUST/opensim-monit.conf +++ b/example/config/ROBUST/opensim-monit.conf @@ -21,10 +21,10 @@ # # Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l. # -check process ROBUST with pidfile /var/run/opensim/ROBUST.pid - start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/ROBUST && /opt/opensim/config/ROBUST/start-sim -q'" +check process ROBUST with pidfile OS_PATH/caches/ROBUST.pid + start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd OS_PATH/config/ROBUST && OS_PATH/config/ROBUST/start-sim -q'" as uid root and gid root - 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 + stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd OS_PATH/config/ROBUST && OS_PATH/config/ROBUST/stop-sim'" with timeout 600 seconds if cpu usage > 50% for 4 cycles then restart # if 5 restarts within 5 cycles then timeout # if failed url http://127.0.0.1:9005/jsonSimStats/ diff --git a/example/config/config.ini b/example/config/config.ini index 3890e66..510c8b6 100644 --- a/example/config/config.ini +++ b/example/config/config.ini @@ -1,13 +1,12 @@ -; ** -; * The Const section allows us to define some basic information that we -; * will use throughout our configuration. We will provide examples for -; * setting the base url of the Robust server and the public and private ports -; * it uses. Changing the values of the constants will set the operating -; * parameters thoughout the configuration. Other constants that may prove -; * to be useful may be added to the followin section. They may be -; * referenced anywhere in the configuration by using ${Const|Name}. One -; * such use is providing a base path for setting locations that Robust -; * uses to write data. +; The Const section allows us to define some basic information that we +; will use throughout our configuration. We will provide examples for +; setting the base url of the ROBUST server and the public and private ports +; it uses. Changing the values of the constants will set the operating +; parameters thoughout the configuration. Other constants that may prove +; to be useful may be added to the followin section. They may be +; referenced anywhere in the configuration by using ${Const|Name}. One +; such use is providing a base path for setting locations that ROBUST +; uses to write data. ; Also put grid specific stuff here. @@ -31,22 +30,17 @@ ; For a standalone this will usually be the externally accessible IP/DNS ; name and use default public port 9000. The private port is not used ; in the configuration for a standalone. - BaseHostname = "127.0.0.1" HostName = "localhost" BaseURL = http://${Const|BaseHostname} GridURL = http://${Const|BaseHostname} - ;# {PublicPort} {} {PublicPort} {8002 9000} "8002" PublicPort = "8002" - - ;# {PrivatePort} {} {PrivatePort} {8003} "8003" PrivatePort = "8003" + ; The public port of the ROBUST asset server, which might be different. + AssetServerPort = "8003" + ; Database credentials. DataProvider = "OpenSim.Data.MySQL.dll" ConnectionString = "Data Source=MYSQL_HOST;Database=MYSQL_DB;User ID=MYSQL_USER;Password=MYSQL_PASSWORD;Old Guids=true;" - - - ; The public port of the Robust server -- THIS IS SPECIAL PORT FOR ASSSET SERVER - AssetServerPort = "8003" diff --git a/example/config/sim_skeleton/My_sim.xml b/example/config/sim_skeleton/My_sim.xml index c5723f3..f71df57 100644 --- a/example/config/sim_skeleton/My_sim.xml +++ b/example/config/sim_skeleton/My_sim.xml @@ -9,5 +9,12 @@ + + + + + + + diff --git a/example/config/sim_skeleton/ThisSim.ini b/example/config/sim_skeleton/ThisSim.ini index 2f691f0..140cf3b 100644 --- a/example/config/sim_skeleton/ThisSim.ini +++ b/example/config/sim_skeleton/ThisSim.ini @@ -2,9 +2,24 @@ mysim="SIM_NUMBER" [Startup] - PIDFile = "/var/run/opensim/sim${Const|mysim}.pid" - regionload_regionsdir="/opt/opensim/config/sim${Const|mysim}" - LogFile = "../logs/OpenSim_sim${Const|mysim}.log" + PIDFile = "${Paths|CachePath}/sim${Const|mysim}.pid" + LogFile = "${Paths|LogPath}/OpenSim_sim${Const|mysim}.log" + ConsoleHistoryFile = "${Paths|LogPath}/OpenSimConsoleHistory_sim${Const|mysim}.txt" + regionload_regionsdir="../../config/sim${Const|mysim}" + +[Map] + enablePosition = true + ; Only texture prims that have a diagonal size greater than this number. + TexturePrimSize = 1 [Network] http_listener_port = SIM_PORT + +[Performance] + ;; Select the performance characteristirs of OpenSim. + ; Include-Performance = "config-include/SimFast.ini" + Include-Performance = "config-include/SimBalanced.ini" + ; Include-Performance = "config-include/SimDefault.ini" + ; Include-Performance = "config-include/SimLean.ini" + │ 2621 mysql 20 0 4131620 483696 17640 S 0.3 2.9 8:07.82 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/x86_64-linux-gnu/mariadb18/plugin --user=m+ + \ No newline at end of file diff --git a/example/config/sim_skeleton/opensim-monit.conf b/example/config/sim_skeleton/opensim-monit.conf index ac50fc2..fd9220f 100644 --- a/example/config/sim_skeleton/opensim-monit.conf +++ b/example/config/sim_skeleton/opensim-monit.conf @@ -13,12 +13,12 @@ # # Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l. # -check process simSIM_NUMBER with pidfile /var/run/opensim/simSIM_NUMBER.pid - start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/simSIM_NUMBER && /opt/opensim/config/simSIM_NUMBER/start-sim -q'" +check process simSIM_NUMBER with pidfile OS_PATH/caches/simSIM_NUMBER.pid + start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd OS_PATH/config/simSIM_NUMBER && OS_PATH/config/simSIM_NUMBER/start-sim -q'" as uid root and gid root - stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/simSIM_NUMBER && /opt/opensim/config/simSIM_NUMBER/stop-sim'" with timeout 600 seconds + stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd OS_PATH/config/simSIM_NUMBER && OS_PATH/config/simSIM_NUMBER/stop-sim'" with timeout 600 seconds if cpu usage > 50% for 4 cycles then restart - if MEMORY usage > 25% for 4 cycles then restart + if MEMORY usage > 10% 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 diff --git a/example/start.sh b/example/start.sh index ce36d59..d6ef48d 100755 --- a/example/start.sh +++ b/example/start.sh @@ -1,4 +1,4 @@ #!/bin/bash -cd /opt/opensim-IG/current/bin +cd /opt/opensim_SC/current/bin mono OpenSim.exe -inidirectory=../../config/simg01 -- cgit v1.1