Wordfromthe Wise @ OPENSIM
Just another Opensim Metaverse Blog

Opensim Region Restarter (Windows only)

.. Are your Regions  down ? It happens to all of us..

One of our instance is down and we are busy in RL or not there to restart it.
Automatically restart those instances with this little tool.

i coded a windows only utility that can run on your server and constantly checks
if a opensim instance is running and responsive.

Therefore it uses opensims WebStats function (must be enabled in the opensim.ini)

[WebStats]
    ;; View region statistics via a web page
    ;; See http://opensimulator.org/wiki/FAQ#Region_Statistics_on_a_Web_Page
    ;; Use a web browser and type in the "Login URI" + "/SStats/"
    ;; For example- http://127.0.0.1:9000/SStats/
   enabled=true

Source: http://opensimulator.org/wiki/Web_Statistics_Module

What it does :
it checks if e.g http://your.ip.adress.or.domain.name:9000/SStats/ is responding.

Sample .htm for my Regions:
http://spacefriends.de/osgrid.htm

It checks the following html status:

http status 200 (OK) -> Instance is up and running
http status 400 (Bad request) -> Instance is not responding

Opensim url tester GUI

Opensim url tester GUI - click to open a bigger size in a new windows

As of now you can only configure it by editing the config.xml provided within the download


  http://83.169.10.234:8996/SStats/
  5
  C:\Documents and Settings\Administrator\Desktop\opensim5\opensim.32bitlaunch.exe

You can check as much instances as you like.
If a instance is not responding you can tell the program to (re)start the region.
You can set your own interval for the check.
It also writes to a log file (logfile.log) what it has done so far.

I have it now running on my server since over a year and can go on holidays without the need to constantly check if the regions are up. After constantly running it for e.g 4 weeks (checking 6 Regions each 5 minutes) it only uses 1.6 MB RAM ..

The only drawback(s) as of now …

– it is not (yet) running as a Windows service. (If your server reboots you must activate it manually)
– the only working item in the right click menu is “test application to run” where it starts the defined target application … (see screenshot at the end of the post)

To finally give something back to Osgrid i would be happy to share it with you.

Here is the link : http://www.spacefriends.de/Opensim_RegionCheck.zip (690 kb)

Addition images and information:

The logfile (logfile.log) looks like this:

11/10/2011 11:23:59 PM START TEST URL: http://83.169.10.234:9000/SStats/
11/10/2011 11:23:59 PM START TEST URL: http://83.169.10.234:8999/SStats/
11/10/2011 11:23:59 PM START TEST URL: http://83.169.10.234:8998/SStats/
11/10/2011 11:23:59 PM START TEST URL: http://83.169.10.234:8997/SStats/
11/10/2011 11:23:59 PM START TEST URL: http://83.169.10.234:8996/SStats/
11/10/2011 11:23:59 PM START TEST URL: http://83.169.10.234:8993/SStats/
11/10/2011 11:24:00 PM ERROR, START APPLICATION: C:\Documents and Settings\Administrator\Desktop\opensim.mysql\opensim.32bitlaunch.exe
<code>

This logfile will be created when you first start the program. You can delete it while the program is not runnnig. A new log will be created if you restart the program.

The current right click menu:

Current right click functions

these are the currently available right click functions.

 


(As mentioned above the only working item in the right click menu is “test application to run” where it starts the defined target application …)

Let me know what you think (or need) …

Advertisements

One Response to “Opensim Region Restarter (Windows only)”

  1. […] Publié le 11 novembre 2011 par logicamp .. Are your Regions  down ?Via myosgrid.wordpress.com Share this:FacebookTwitterPrint"Aimer" ceci :"J'aime"Soyez le premier à […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: