Starting Your Own Server

Starting Overseer

With Windows binary installs, Overseer can be accessed from the start menu. For source releases, open a command line window and navigate to the trunk folder (the base of the MV3D source tree where the mv3d folder is) and run

python mv3d/tools/overseer/overseer.py

For setuptools installations, make sure Python's scripts directory is in your path and just run overseer.

Setting up a Server

Setting up a server is pretty simple with the Overseer app. When you first start up Overseer, you'll see an empty screen like this:

New startup screen.

Overseer can be used to start servers on your computer and also on remote servers that are configured to run the Overseer Service. To start a server locally, select the type from the drop down and optionally enter a name:

If you are just starting out, the best choice is Full-1999 which will start a full MV3D server capable of running a virtual world itself. Hit the Start New button when ready. That will spin up a new server process. When it is finished (it may take a few moments), you'll see the following screen:

New process started

The first time you start a server, it will have no world or any other persistent data. If you want to initialize the new server with a demo world (some terrain and water basically), click the Initialize button.

The default options should be good. Note the username and password for the administrator account. Click initialize and after a few seconds, everything should be ready!

Stopping and Restarting

Hit the Stop or Stop All button on Overseer to stop your server. There's also a Restart button that will be enabled when it can be used.

To start up your server again, just select Full-1999 and enter a name. Then hit Start New. You do not need to re-initialize the server as the data created in the initialize step is persistent.

Clusters

The Overseer tool is designed to manage clusters of servers. These are configured in the cluster.conf file. The clusters available are shown in the tree view on the left side of the window:

Tree view

At the top level is the Overseer. Under that are all the clusters ("Local" being the only one in that image). Each cluster has a list of servers ("local - Server") and each server has a list of processes ("local - Process"). Under processes are individual services. Right clicking anywhere in the tree will bring up a context menu allowing you to stop/start/connect/disconnect-- whatever is appropriate for the selected item.

Clusters can be configured across multiple servers and it is possible to set what processes should be started and on what servers. With this functionality, it is also possible through a single click to start or stop a whole cluster.

Data Storage

MV3D creates a directory under your home directory called .mv3d. On Linux, this is /home/username/.mv3d. On Windows, it is either C:\Users\Username\.mv3d or C:\Documents and Settings\Username\.mv3d. The server keeps its data in the store folder. If you need to reset your server and delete your world and everything in it, you can delete this folder. Next time you start the server, you'll need to re-initialize it.

Other Overseer Features

Overseer has many other features. One of those is a built in Python console. The console can be used to administrate local or remote servers. To access the console on any server, click its "Console" button. A window will pop up. In the top part of the window, the output from your commands will be printed. The bottom part has a text box for entering Python code. Python code entered here will be executed on the server. Python's dir() command will show you what's available. For convenience, every service and the conductor are added as local variables.

New console window.

If you are running a LogService, the Log Viewer tab allows you to search through or subscribe to logs. It has two modes. When using the Fetch button with the Prev and Next page buttons, you can manually search through the logs. Any filter options set in the top of the window will configure what log messages are shown. When you hit the Subscribe button, future log messages that match the current filter will automatically be added to the list. To copy logs to a text file, select the lines and hit Ctrl+C.

Log viewer tab.

Another features is the runtime profiler. This is a way to get data from MV3D's RuntimeProfiler even on remote servers. You can access this information by hitting the "Stats" button.

This behaves much like any other profiler and you can sort the results in similar ways. An additional feature is the ability to automatically refresh the results on a timer. Just check the "Auto Refresh" checkbox and enter a time period. Then hit "Refresh" and it will start. Uncheck to stop.

In addition to the RuntimeProfiler results window, there's also a statistics grapher available in the other tab.

Each service and the conductor can expose any number of statistics. These stats are available to be graphed at various time resolutions. Similar to the profile results, there is an "Auto Refresh" check box which will cause the graph to refresh periodically. One note though is that it takes a fair amount of CPU time to refresh the graph. Turning on "Auto Refresh" and setting the interval too low will cause Overseer to take a lot of CPU.

Another thing to note is that the stat grapher requires the matplotlib Python module. If running from the MV3D Binary install, that will be included. Otherwise, you'll have to install it yourself.

Attachments