OpenSim.exe Command Line Options

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Switch Syntax: Syntax as verified in Windows 8.1)
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{obsolete}}
+
{{Quicklinks}}
{{content}}
+
  
To run OpenSim in somewhat customized environments it's often helpful to modify the programs behaviour via command line arguments.
+
Command line arguments, also known as switches, helpful to modify the behavior of your OpenSimulator for customized environments or debugging.
OpenSim knows a just a few of these as most parts of the behaviour are controlled via an .INI-File.
+
  
The following command line switches are known:
+
== For Simulator Operators ==
{| border="1"
+
These can be used on the command line to customize the current startup session, or they can be used in startup scripts.
! Switch !! Meaning/Behaviour
+
 
 +
=== Switch Syntax ===
 +
* Windows: ''"/key:value" or "/key value" '' as well as ''"-key=value" or "-key value" '' are valid (verified Windows 8.1)
 +
* Unix, Linux ''"-key=value" or "-key value" ''
 +
* MacOSX: FIXME
 +
 
 +
If you want to use a value which contains spaces, contain the entire values and spaces inside of double-quotes(").
 +
 
 +
Note that "--" parameters, like "--key=value" do not work.
 +
 
 +
It seems a bug in the regular syntax in the external Nini command line parser used by OpenSimulator.
 +
 
 +
=== Current Command Line Parameters ===
 +
 
 +
The following command line parameters are known:
 +
{|border="1" cellspacing="0"
 +
! Key !! Values !! Description !! Default
 
|-
 
|-
| background ||
+
|logconfig
 +
|String(filepath)
 +
|OpenSimulator will use the specified .NET config file instead of the default.  This config file is mainly used to configure log4net, though it can also contain other parameters (so the -logconfig switch is somewhat misleading).
 +
|OpenSim.exe.config
 
|-
 
|-
| gridmode || If =true forces OpenSim.exe to operate in grid mode. If =false forces OpenSim.exe to operate in standalone mode. If omitted defaults to OpenSim.ini setting.
+
|background
 +
|Boolean
 +
|If true, OpenSimulator will run in the background
 +
|false
 
|-
 
|-
| gui || "old-style" console (deprecated from Opensim 0.7, use console instead)
+
|inifile
 +
|String(filepath)
 +
|The path to the main ini config file.  If you change this then you must make sure that the necessary configuration content from OpenSim.ini is still being loaded (via includes, etc.).
 +
|OpenSim.ini
 
|-
 
|-
| console || If =basic declares interface as a simple command console (it has been noted that use of this can also avoid some terminal crashes when logging errors occur).
+
|inimaster
 +
|String(filepath)
 +
|The path to the master ini file.  By default this points to OpenSimDefaults.ini which contains a large number of default settings for OpenSimulator.
 +
|OpenSimDefaults.ini
 
|-
 
|-
| inidirectory ||  
+
|inidirectory
 +
|String(filepath)
 +
|The path to folder for config ini files. OpenSimulator will read all of *.ini files in this directory and override OpenSim.ini settings.
 +
|config
 
|-
 
|-
| inifile || changes the name (Path) of the inifile.
+
|physics
 +
|"OpenDynamicsEngine", "BulletSim"
 +
|The name of the physics engine. It is the same as physics property in [Startup] section. See OpenSim.ini.example for the detailed information. It will override the settings in OpenSim.ini.
 +
|BulletSim in 0.8 onwards, OpenDynamicsEngine in OpenSimulator 0.7.6.1 and before.
 
|-
 
|-
| inimaster || allows to read in a master config file.
+
|gui
 +
|Boolean
 +
|"old-style" console ([http://opensimulator.org/mantis/view.php?id=4794 deprecated from Opensim 0.7], use -console=basic instead)
 +
|false
 
|-
 
|-
| logconfig || changes the name (Path) of the logfile.
+
|console
 +
|"basic","rest"
 +
|If "basic", OpenSimulator will launch a simple console capable of processing commands. If "rest", a [[RestConsole]]. If others including empty, a console that uses cursor control and context help(default).
 +
|(empty)
 +
|-
 +
|save_crashes
 +
|Boolean
 +
|If true, OpenSimulator will dump stacktraces into the file in the directory specified with 'crash_dir' when it crashes. Note: As of 0.7.1, it doesn't work. It works in 0.7.2-dev.
 +
|false
 +
|-
 +
|crash_dir
 +
|String(filepath)
 +
|The path to the directory where crash logs will be created. When OpenSimulator crashes, it will be automatically created if not exists. Note: As of 0.7.1, it doesn't work. It works in 0.7.2-dev.
 +
|crashes
 
|}
 
|}
 +
 +
NOTE:
 +
* filepath - The path relative to the working directory of the user or application, in the most cases, it will be bin/.
 +
* Boolean - See [[#Boolean Aliases]] below.
 +
 +
=== Boolean Aliases ===
 +
Boolean values support several interchangeable aliases starting with OpenSimulator 0.7.2-dev:
 +
* True is the same as On or Yes
 +
* False is the same as Off or No
 +
 +
They are not case-sensitive.
 +
 +
For example, you can type "True", "TRUE" or "tRue"
 +
 +
=== Related INI File Sections ===
 +
In the OpenSim.ini and OpenSimDefaults.ini:
 +
<source lang="ini">
 +
[StartUp]
 +
    ; Set this to true if you want to log crashes to disk
 +
    ; this can be useful when submitting bug reports.
 +
    ; However, this will only log crashes within OpenSimulator that cause the entire program to exit
 +
    ; It will not log crashes caused by virtual machine failures, which includes mono and ODE failures.
 +
    ; You will need to capture these native stack traces by recording the session log itself.
 +
    save_crashes = false
 +
 +
    ; Directory to save crashes to if above is enabled
 +
    ; (default is /opensimdir/crashes/*.txt or C:\opensim\crashes\*.txt)
 +
    crash_dir = "crashes"
 +
</source>
 +
 +
== For Developers ==
 +
OpenSimulator internally uses [http://nini.sourceforge.net/ Nini] as a command line parser.
 +
 +
Command line arguments are parsed in OpenSim/Region/Application/Application.cs

Latest revision as of 08:10, 7 November 2015

Command line arguments, also known as switches, helpful to modify the behavior of your OpenSimulator for customized environments or debugging.

Contents

[edit] For Simulator Operators

These can be used on the command line to customize the current startup session, or they can be used in startup scripts.

[edit] Switch Syntax

  • Windows: "/key:value" or "/key value" as well as "-key=value" or "-key value" are valid (verified Windows 8.1)
  • Unix, Linux "-key=value" or "-key value"
  • MacOSX: FIXME

If you want to use a value which contains spaces, contain the entire values and spaces inside of double-quotes(").

Note that "--" parameters, like "--key=value" do not work.

It seems a bug in the regular syntax in the external Nini command line parser used by OpenSimulator.

[edit] Current Command Line Parameters

The following command line parameters are known:

Key Values Description Default
logconfig String(filepath) OpenSimulator will use the specified .NET config file instead of the default. This config file is mainly used to configure log4net, though it can also contain other parameters (so the -logconfig switch is somewhat misleading). OpenSim.exe.config
background Boolean If true, OpenSimulator will run in the background false
inifile String(filepath) The path to the main ini config file. If you change this then you must make sure that the necessary configuration content from OpenSim.ini is still being loaded (via includes, etc.). OpenSim.ini
inimaster String(filepath) The path to the master ini file. By default this points to OpenSimDefaults.ini which contains a large number of default settings for OpenSimulator. OpenSimDefaults.ini
inidirectory String(filepath) The path to folder for config ini files. OpenSimulator will read all of *.ini files in this directory and override OpenSim.ini settings. config
physics "OpenDynamicsEngine", "BulletSim" The name of the physics engine. It is the same as physics property in [Startup] section. See OpenSim.ini.example for the detailed information. It will override the settings in OpenSim.ini. BulletSim in 0.8 onwards, OpenDynamicsEngine in OpenSimulator 0.7.6.1 and before.
gui Boolean "old-style" console (deprecated from Opensim 0.7, use -console=basic instead) false
console "basic","rest" If "basic", OpenSimulator will launch a simple console capable of processing commands. If "rest", a RestConsole. If others including empty, a console that uses cursor control and context help(default). (empty)
save_crashes Boolean If true, OpenSimulator will dump stacktraces into the file in the directory specified with 'crash_dir' when it crashes. Note: As of 0.7.1, it doesn't work. It works in 0.7.2-dev. false
crash_dir String(filepath) The path to the directory where crash logs will be created. When OpenSimulator crashes, it will be automatically created if not exists. Note: As of 0.7.1, it doesn't work. It works in 0.7.2-dev. crashes

NOTE:

  • filepath - The path relative to the working directory of the user or application, in the most cases, it will be bin/.
  • Boolean - See #Boolean Aliases below.

[edit] Boolean Aliases

Boolean values support several interchangeable aliases starting with OpenSimulator 0.7.2-dev:

  • True is the same as On or Yes
  • False is the same as Off or No

They are not case-sensitive.

For example, you can type "True", "TRUE" or "tRue"

[edit] Related INI File Sections

In the OpenSim.ini and OpenSimDefaults.ini:

[StartUp]
    ; Set this to true if you want to log crashes to disk
    ; this can be useful when submitting bug reports.
    ; However, this will only log crashes within OpenSimulator that cause the entire program to exit
    ; It will not log crashes caused by virtual machine failures, which includes mono and ODE failures.
    ; You will need to capture these native stack traces by recording the session log itself.
    save_crashes = false
 
    ; Directory to save crashes to if above is enabled
    ; (default is /opensimdir/crashes/*.txt or C:\opensim\crashes\*.txt)
    crash_dir = "crashes"

[edit] For Developers

OpenSimulator internally uses Nini as a command line parser.

Command line arguments are parsed in OpenSim/Region/Application/Application.cs

Personal tools
General
About This Wiki