oms

command
v1.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Overview

oms is openM++ JSON web-service which is also used as simple web-server for openM++ UI html pages.

Web-service allow to view and update model database(s) and run openM++ models from models/bin subdirectory. Web-server allow to serve static html (css, images, javascipt) content from html subdirectory.

Arguments for oms can be specified on command line or through .ini file:

oms -ini my-oms.ini oms -OpenM.IniFile my-oms.ini

Command line arguments take precedence over ini-file options.
There are some arguments which can be specified through ini-file and not on command line,
please see oms.ini file in our source code or our wiki for more details.

Following arguments supporetd by oms:

-l localhost:4040 -oms.Listen localhost:4040

address to listen, default: localhost:4040.
Use -l :4040 if you need to access oms web-service from other computer (make sure firewall configured properly).

-oms.UrlSaveTo someModel.ui.url.txt

file path to save oms URL which can be used to open web UI in browser.
Default: empty value, URL is not saved in a file by default, example of URL file content: http://localhost:4040

-oms.RootDir om/root

oms root directory, default: current directory.
Recommended to have log/ subdirectory to store oms web-service log files.

-oms.ModelDir models/bin

models executable and model.sqlite database files directory, default: models/bin,
If relative then must be relative to oms root directory.

-oms.ModelLogDir models/log

models log directory, default: models/log, if relative then must be relative to oms root directory.

-oms.ModelDocDir models/doc

models documentation directory, default: models/doc, if relative then must be relative to oms root directory
UI expect it ends /doc subdirectory, for example: C:\any\dir\doc

-oms.HtmlDir html

front-end UI directory, default: html.
If relative then must be relative to oms root directory.
It is not used if -oms.ApiOnly specified.

-oms.EtcDir etc

configuration files directory, default: etc.
If relative then must be relative to oms root directory.
It is an optional directory, it may contain configuration files,for example, templates to run models on MPI cluster.

-oms.JobDir job

jobs control directory.
If relative then must be relative to oms root directory.
Jobs control allow to manage computational resources (e.g. CPUs) and organize model run queue.
Default value is empty "" string and it is disable jobs control.

-oms.Name someName

instance name which used for job control.

-oms.HomeDir models/home

user personal home directory to store files and settings.
If relative then must be relative to oms root directory.
Default value is empty "" string and it is disable use of home directory.

-oms.AllowDownload false

if true then allow download from user home/io/download directory.

-oms.AllowUpload false

if true then allow upload to user home/io/upload directory.

-oms.AllowMicrodata

if true then allow model runs microdata usage else model microdata API disabled.

-oms.ApiOnly false

if true then API only web-service, it is false by default and oms also act as http server for openM++ UI.

-oms.LogRequest false

if true then log HTTP requests on console and/or log file.

-oms.NoAdmin

if true then disable local administrative routes: /admin/

-oms.NoShutdown

if true then disable shutdown route: /shutdown/

-oms.AdminAll

if true then allow global administrative routes: /admin-all/

-oms.Languages en

comma-separated list of supported languages, default: en.
That list is matched with request language list and model language list in order to return proper text results.

-oms.DoubleFormat %.15g

format to convert float or double value to string, default: %.15g.
OpenM++ is using hash digest to compare models, input parameters and output values.
By default float and double values converted into text with "%.15g" format.

-oms.CodePage

"code page" to convert source file into utf-8, for example: windows-1252.
It is used only for compatibility with old Windows files.

Also oms support OpenM++ standard log settings (described in openM++ wiki):

-OpenM.LogToConsole:     if true then log to standard output, default: true
-v:                      short form of: -OpenM.LogToConsole
-OpenM.LogToFile:        if true then log to file
-OpenM.LogFilePath:      path to log file, default = current/dir/exeName.log
-OpenM.LogUseDailyStamp: if true then use dayily stamp in log file name (rotate log files dayily)
-OpenM.LogUseTs:         if true then use time-stamp in log file name
-OpenM.LogUsePid:        if true then use pid-stamp in log file name
-OpenM.LogSql:           if true then log sql statements into log file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL