Advanced Command line reference SpringCardCompanionStatus
April 13, 2023 at 2:39 AMSpringCardCompanionStatus
SpringCardCompanionStatus.exe
’s single role is to show the detailed status of the SpringCard Companion Service, provided that it is currently running.
Syntax
SpringCardCompanionStatus.exe [OPTIONS]
Output
The detailed status is provided as a JSON object in the standard output. The JSON object is defined as follow:
Field | Type | Presence | Description |
---|---|---|---|
Mode |
string | always | service if running as background service.tray if running as tray.console if running as SpringCardCompanionSvc.exe --console . |
Version |
string | always | The version of the service core library. |
ProcessId |
integer | always | The process identifier (pid) of the executable that runs the service |
ProcessUser |
string | always | The complete user name (domain/user on Windows) of the identity that runs the service |
ProcessBinary |
string | always | The complete file name of the executable that runs the service |
RestPort |
integer | always | The TCP port of the HTTP server that implements the REST API (0 if the REST API server is not listening) |
RestSecure |
boolean | always | true if the HTTP server uses HTTPS, false for HTTP |
RestUri |
string | always | The root URI of the REST API (null if the REST API server is not listening) |
WebSocketPort |
integer | always | The TCP port of the WebSocket server that implements (0 if the WebSocket server is not listening) |
WebSocketSecure |
boolean | always | true if the WebSocket server uses WSS, false for WS |
WebSocketUri |
string | always | The URI of the WebSocket service (null if the WebSocket server is not listening) |
If neither the tray or the background service are running an empty JSON ({}
) is returned.
Example output - Background service running
{
"Mode":"service",
"Version":"18.4.6682.29793",
"ProcessId":16944,
"ProcessUser":"NT AUTHORITY/LOCAL SERVICE",
"ProcessBinary":"C:/Program Files/SpringCard/Companion/Service/SpringCardCompanionSvc.exe",
"RestPort":3998,
"WebSocketPort":3997,
"RestSecure":false,
"WebSocketSecure":false,
"RestUri":"http://localhost:3998",
"WebSocketUri":"ws://localhost:3997"
}
Note: the response is output on a (long) single line. Spaces and carriage returns have been added to the example for readability, but they were absent from the actual response.
Example output - Service running as tray
{
"Mode":"tray",
"Version":"18.4.6682.29793",
"ProcessId":13792,
"ProcessUser":"SPRINGCARD/developer",
"ProcessBinary":"C:/Users/developer/AppData/Local/SpringCard/Companion/Service/SpringCardCompanionTray.exe",
"RestPort":3998,
"WebSocketPort":3997,
"RestSecure":false,
"WebSocketSecure":false,
"RestUri":"http://localhost:3998",
"WebSocketUri":"ws://localhost:3997"
}
Example output - No service running
{}
OPTIONS parameters
verbose
: Verbose output
SpringCardCompanionStatus.exe <ACTION> --verbose [level]
Allowed values for level are:
- 1 : show execution errors,
- 2 : show execution errors and warnings,
- 3 : show execution errors and warnings, and show a basic trace of the execution flow,
- 4 : all of the above, plus show a detailed trace of the execution flow (this slows down the process),
- 5 : all of the above, plus show a detailed trace of the underlying libraries (this slows down the process a lot).
If the level parameter is absent, default value is 4.
pause
: Keep the console window open when the application exits
SpringCardCompanionStatus.exe [ACTION] --pause
Use this flag to have enough time to read the messages. Hit the ENTER key to close the window when the application has terminated.