Manage the Installation with orserveradm.py Script
Orserveradmin.py is a simple command line interface for managing the OpenROAD Server configuration file, orserver.json.
Preconditions:
• Python version 3.8 or higher should be used (earlier versions may not work).
• Environment variable
II_SYSTEM must be set.
• Environment variable COMPUTERNAME must be set if you are not providing a serverlocation when using AddApp.
Note: COMPUTERNAME is a Microsoft Windows environment variable set through Windows System Properties. On Linux, the environment variable should have been set by the environment setting script .orXXsh. (In the installation owner’s HOME directory, XX is the installation identifier.)
For more information about environment variables, see
Environment Variables in the
Workbench User Guide.
Post conditions:
This script has the following syntax:
python orserveradm.py [-h] cmd [infile] [outfile]
It takes these positional arguments:
cmd
(Required) Specifies the command to be executed. Available commands include:
Each of these commands is demonstrated in the examples below.
infile
(Optional) Specifies a JSON file to be used as command input for the AddApp or RemoveApp command.
Default: stdin
outfile
(Optional) Specifies that the output should be written to an output file.
Default: stdout
Optional arguments include:
-h, --help
Displays help message and exits.
Examples:
AddApp—add an app:
$ echo '{"akaname":"myapp", "imagefile":"x.img"}' | python orserveradm.py AddApp
Added app:myapp
ListApps—list apps:
$ python orserveradm.py ListApps
[{"akaname": "comtest", "asolibhousekeepmins": 0, "asolocation": "", "asotrxlimit": 0, "authorizedforspo": 1, "autosuspend": 0, "cmdflags": "-Tall,logonly -Lcomtest.log", "enabled": 1, "environment": null, "environment_exp": null, "guid": "", "imagefile": "comtest.img", "maxslaves": 1, "routing": "", "serverlocation": "\\\\MYCOMPUTERNAME", "servertype": 3, "timeoutinterval": 600000, "useasolib": 0},
{"akaname": "myapp", "asolibhousekeepmins": 0, "asolocation": "", "asotrxlimit": 0, "authorizedforspo": 1, "autosuspend": 0, "cmdflags": "-Tall,logonly", "enabled": 1, "environment": null, "environment_exp": null, "guid": "", "imagefile": "x.img", "maxslaves": 1, "routing": "", "serverlocation": "\\\\MYCOMPUTERNAME", "servertype": 3, "timeoutinterval": 0, "useasolib": 0}
...]
ListAppsFormatted—list apps with formatting:
$ python orserveradm.py ListAppsFormatted
[
{
"akaname": "comtest",
"asolibhousekeepmins": 0,
"asolocation": "",
"asotrxlimit": 0,
"authorizedforspo": 1,
"autosuspend": 0,
"cmdflags": "-Tall,logonly -Lcomtest.log",
"enabled": 1,
"environment": null,
"environment_exp": null,
"guid": "",
"imagefile": "comtest.img",
"maxslaves": 1,
"routing": "",
"serverlocation": "\\\\MYCOMPUTERNAME",
"servertype": 3,
"timeoutinterval": 600000,
"useasolib": 0
},
{
"akaname": "myapp",
"asolibhousekeepmins": 0,
"asolocation": "",
"asotrxlimit": 0,
"authorizedforspo": 1,
"autosuspend": 0,
"cmdflags": "-Tall,logonly",
"enabled": 1,
"environment": null,
"environment_exp": null,
"guid": "",
"imagefile": "x.img",
"maxslaves": 1,
"routing": "",
"serverlocation": "\\\\MYCOMPUTERNAME",
"servertype": 3,
"timeoutinterval": 0,
"useasolib": 0
},
...
]
RemoveApp—remove a specific app:
$ echo '{"akaname":"myapp"}' | python orserveradm.py RemoveApp
Removed app(s):
"akaname":"myapp","imagefile":"x.img","cmdflags":"-Tall,logonly"
Remove all apps for given “akaname”:
$echo '{"akaname":"AppServer Test"}' | python orserveradm.py RemoveApp
Removed app(s):
"akaname":"AppServer Test","imagefile":"ASA_AppServerTest.img","cmdflags":"-Tall,logonly -LASA_Test1.log"
"akaname":"AppServer Test","imagefile":"ASA_AppServerTest.img","cmdflags":"-Tall,logonly -LASA_Test2.log"
Remove app for given “akaname” and “cmdflags”:
$ echo '{"akaname":"AppServer Test", "cmdflags": "-Tall,logonly -LASA_Test2.log"}' | python orserveradm.py RemoveApp
Removed app(s):
"akaname":"AppServer Test","imagefile":"ASA_AppServerTest.img","cmdflags":"-Tall,logonly-LASA_Test2.log"
ShowServerConfig—show current OpenROAD Server settings:
$ python orserveradm.py ShowServerConfig
{"defaultasolocation": "", "defaultasotrxlimit": 0, "defaultmaxslaves": 1, "defaulttimeoutinterval": 3600000, "maxdispatchers": 48, "maxtotalslaves": 48, "prfmoninterval": 1000, "prfmonlevel": 0, "purgeinterval": 60000, "runauthorizedappsonly": 1, "securelog": 1, "shutdowngraceperiod": 15000, "tracefileappend": 0, "tracefilename": "c:\\temp\\SPOTraceFile.log", "traceinterval": 1800000, "tracelevel": 0, "useclientid": 1, "usesignatureguids": 1}
ModifyServerConfig—change “tracelevel” of the OpenROAD Server:
$ echo '{"tracelevel":1}' | python orserveradm.py ModifyServerConfig
Server config successfully changed.