oms

command
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: MIT Imports: 33 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.

Following arguments supporetd by oms:

-oms.RootDir om/root

oms root directory, default: current directory. Expected to have models/bin/ subdirectory unless other location specified: -oms.ModelDir /dir/models/bin. Recommended to have models/log/ subdirectory unless other location specified: -oms.ModelLogDir /dir/models/log. Expected to have html/ subdirectory unless -oms.ApiOnly true specified. Expected to have etc/ subdirectory with templates to run models on MPI cluster. 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.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.HomeRootDir home

root of users home directories 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 directories.

-oms.AllowDownload false

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

-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.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.MaxRowCount 100

default number of rows to return from read parameters or output tables, default: 100. This value is used if web-service method call does not provide explicit number of rows to read.

-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.

-oms.MaxRunHistory 100

max number of model runs to keep in run list history, default: 100.

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