Difference between revisions of "STEM Headless"

From Eclipsepedia

Jump to: navigation, search
(Headless STEM Command Line Options)
 
(8 intermediate revisions by one user not shown)
Line 1: Line 1:
STEM Headless mode enables the running of STEM simulations without the use of the STEM Workbench / Graphical User Interface.  Headless mode can be useful in environments where no window manager is available, such as remote consoles to servers.   
+
STEM Headless mode enables the running of STEM simulations without the use of the STEM Workbench / Graphical User Interface.  Headless mode can be useful in environments where no window manager is available, such as remote, text-only server consoles.
 +
 
 +
Headless mode can be launched from the STEM binary distributed with the STEM distributionSimply supply the '''-headless''' command line argument.
  
 
== Headless STEM Command Line Options ==
 
== Headless STEM Command Line Options ==
  
 
+
* <code style="font-size: 10pt;">stem -nosplash -headless [-quiet] [-log [LOG_DIRECTORY]] [-uri URI1 [...]] [-project PROJECT_NAME [-scenario SCENARIO1.scenario [...]]]</code>
* <code>stem -headless [-quiet] [-log [LOG_DIRECTORY]] [-uri URI1 [...]] [-project PROJECT_NAME [-scenario SCENARIO1.scenario [...]]] </code>
+
  
 
'''Command Descriptions'''
 
'''Command Descriptions'''
 +
 +
'''-nosplash'''
 +
: Tells the Eclipse Framework to ''not'' show the splash screen.  This prevents certain UI libraries from getting loaded.
  
 
'''-headless'''
 
'''-headless'''
Line 15: Line 19:
  
 
'''-log [LOG_DIRECTORY]'''
 
'''-log [LOG_DIRECTORY]'''
:  ''Optional'' attachs a comma-separated value (CSV) logger to all simulations.  Optional additional value ''LOG_DIRECTORY'' represents the path to the parent directory for logs.  If LOG_DIRECTORY is not set, logs will go to the default log directory for the simulation (''projectName/Recorded Simulations'' folder).
+
:  ''Optional'' attachs a comma-separated value (CSV) logger to all simulations.  Optional additional value ''LOG_DIRECTORY'' represents the path to the parent directory for logs.  If LOG_DIRECTORY is not set, logs will go to the default log directory for the simulation (''PROJECT_NAME/Recorded Simulations'' folder).
  
 
'''-uri URI1 [...]'''
 
'''-uri URI1 [...]'''
Line 24: Line 28:
  
 
'''-scenario SCENARIO1.scenario [...]'''
 
'''-scenario SCENARIO1.scenario [...]'''
: ''Optional, dependent on -project''.  A list of one or more scenario files contained in the given '''-project''' to launch and run.  If no '''-scenario''' is defined, all scenarios in the given project will be run.
+
: ''Optional, dependent on -project''.  A list of one or more scenario files contained in the given '''-project''''s ''Scenarios'' folder to launch and run.  If no '''-scenario''' is defined, all scenarios in the given project will be run.
 
+
  
 
== Usage Examples ==
 
== Usage Examples ==
 
The following are a list of example command invocations for the STEM headless mode.  The STEM UI will not launch in any of these examples.  The examples make use of the UsaMexico project, which can be downloaded [http://www.eclipse.org/stem/download_sample.php?file=UsaMexicoDemo.zip from here].
 
The following are a list of example command invocations for the STEM headless mode.  The STEM UI will not launch in any of these examples.  The examples make use of the UsaMexico project, which can be downloaded [http://www.eclipse.org/stem/download_sample.php?file=UsaMexicoDemo.zip from here].
  
* <code>stem -headless</code>
+
* <code style="font-size: 10pt;">stem -headless</code>
 
*: Launches STEM headless mode, but does nothing else and immediately exits
 
*: Launches STEM headless mode, but does nothing else and immediately exits
  
* <code>stem -headless -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario</code>
+
* <code style="font-size: 10pt;">stem -headless -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario</code>
 
*: Runs a simulation for the scenario at the given URI, printing simulation status to the console.
 
*: Runs a simulation for the scenario at the given URI, printing simulation status to the console.
  
* <code>stem -headless -project UsaMexico</code>
+
* <code style="font-size: 10pt;">stem -headless -project UsaMexico</code>
 
*: Runs simulations for all scenarios in the ''UsaMexico'' project, printing simulation status to the console.
 
*: Runs simulations for all scenarios in the ''UsaMexico'' project, printing simulation status to the console.
  
* <code>stem -headless -project UsaMexico -scenario UsaMexicoScenarioLevel2.scenario UsaMexicoScenarioNoPolicy.scenario</code>
+
* <code style="font-size: 10pt;">stem -headless -project UsaMexico -scenario UsaMexicoScenarioLevel2.scenario UsaMexicoScenarioNoPolicy.scenario</code>
 
*: Runs simulations for the scenarios ''UsaMexicoScenarioLevel2'' and ''UsaMexicoScenarioNoPolicy'' in the project ''UsaMexico'', printing simulation status to the console.
 
*: Runs simulations for the scenarios ''UsaMexicoScenarioLevel2'' and ''UsaMexicoScenarioNoPolicy'' in the project ''UsaMexico'', printing simulation status to the console.
  
* <code>stem -headless -quiet -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario</code>
+
* <code style="font-size: 10pt;">stem -headless -quiet -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario</code>
 
*: Runs a simulation for the given URI in quiet mode, printing only errors to the console.
 
*: Runs a simulation for the given URI in quiet mode, printing only errors to the console.
  
* <code>stem -headless -log -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario</code>
+
* <code style="font-size: 10pt;">stem -headless -log -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario</code>
 
*: Runs a simulation for the given URI and logs the simulation output in CSV format to the default log directory.
 
*: Runs a simulation for the given URI and logs the simulation output in CSV format to the default log directory.
  
* <code>stem -headless -log /var/log -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario</code>
+
* <code style="font-size: 10pt;">stem -headless -log /var/log -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario</code>
 
*: Runs a simulation for the given URI and logs the simulation output in CSV format to the ''/var/log'' folder.
 
*: Runs a simulation for the given URI and logs the simulation output in CSV format to the ''/var/log'' folder.

Latest revision as of 12:23, 9 June 2011

STEM Headless mode enables the running of STEM simulations without the use of the STEM Workbench / Graphical User Interface. Headless mode can be useful in environments where no window manager is available, such as remote, text-only server consoles.

Headless mode can be launched from the STEM binary distributed with the STEM distribution. Simply supply the -headless command line argument.

[edit] Headless STEM Command Line Options

  • stem -nosplash -headless [-quiet] [-log [LOG_DIRECTORY]] [-uri URI1 [...]] [-project PROJECT_NAME [-scenario SCENARIO1.scenario [...]]]

Command Descriptions

-nosplash

Tells the Eclipse Framework to not show the splash screen. This prevents certain UI libraries from getting loaded.

-headless

Tells the STEM Launcher to use the headless mode, e.g. not to launch the GUI workbench.

-quiet

Optional STEM headless will run in quiet mode. Nothing will be written to standard out (stdout). Errors and exceptions may still be sent to standard error (stderr).

-log [LOG_DIRECTORY]

Optional attachs a comma-separated value (CSV) logger to all simulations. Optional additional value LOG_DIRECTORY represents the path to the parent directory for logs. If LOG_DIRECTORY is not set, logs will go to the default log directory for the simulation (PROJECT_NAME/Recorded Simulations folder).

-uri URI1 [...]

Optional A list of one or more STEM resource URIs pointing to scenarios to launch and simulate.

-project PROJECT_NAME

Optional Creates and runs simulations for scenarios in the STEM project PROJECT_NAME. If no -scenario parameter is specified, all scenarios in the given project will be run.

-scenario SCENARIO1.scenario [...]

Optional, dependent on -project. A list of one or more scenario files contained in the given -project's Scenarios folder to launch and run. If no -scenario is defined, all scenarios in the given project will be run.

[edit] Usage Examples

The following are a list of example command invocations for the STEM headless mode. The STEM UI will not launch in any of these examples. The examples make use of the UsaMexico project, which can be downloaded from here.

  • stem -headless
    Launches STEM headless mode, but does nothing else and immediately exits
  • stem -headless -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario
    Runs a simulation for the scenario at the given URI, printing simulation status to the console.
  • stem -headless -project UsaMexico
    Runs simulations for all scenarios in the UsaMexico project, printing simulation status to the console.
  • stem -headless -project UsaMexico -scenario UsaMexicoScenarioLevel2.scenario UsaMexicoScenarioNoPolicy.scenario
    Runs simulations for the scenarios UsaMexicoScenarioLevel2 and UsaMexicoScenarioNoPolicy in the project UsaMexico, printing simulation status to the console.
  • stem -headless -quiet -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario
    Runs a simulation for the given URI in quiet mode, printing only errors to the console.
  • stem -headless -log -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario
    Runs a simulation for the given URI and logs the simulation output in CSV format to the default log directory.
  • stem -headless -log /var/log -uri platform:/resource/UsaMexico/scenarios/UsaMexicoScenarioLevel2.scenario
    Runs a simulation for the given URI and logs the simulation output in CSV format to the /var/log folder.