Session Management
Get Sessions
This command returns the list of sessions from the log database configured for the runtime, as well as the sessions currently running in memory.
get sessions [name <name>]
[id <id1,id2,idn>]
[status <running,error,done,stopped>]
[duration <min>]
[to <max>]
[limit <limit>]
[format <format>]
Option | Mandatory | Description |
---|---|---|
|
No |
Session Name. |
|
No |
Comma-separated list of session IDs. |
|
No |
Filter sessions with this status: |
|
No |
Filter sessions with this minimum duration in milliseconds. |
|
No |
Filter sessions with this maximum duration in milliseconds. |
|
No |
Number of sessions to retrieve. |
|
No |
Comma-separated list of columns to return on the output. The available columns are |
Stop a Session
This command sends a stop signal to a running session.
stop session <id> [synch] [format <format>]
Option | Mandatory | Description |
---|---|---|
|
Yes |
ID of the session to stop. |
|
No |
Waits for the session to be stopped to proceed. By default, the command does not wait until the session stops to proceed. |
|
No |
Comma-separated list of columns to return in the output. This option is supported only in synch mode. The following columns are available: %name,%status,%begindate,%enddate,%configuration,%id,%executionmode,%guesthost,%iter,%launchmode,%runtimehost,%runtimeport,%returncode,%errormessage,%exception,%parentiter |
stop session c0a84b0b016716c58c17de7b2e8a75c9
Sending a stop request to session c0a84b0b016716c58c17de7b2e8a75c9...
Stop request has been successfully sent to session c0a84b0b016716c58c17de7b2e8a75c9
stop session c0a84b0b016716c6b50bd39807324430 synch format %id,%status,%returncode
Sending a stop request to session c0a84b0b016716c6b50bd39807324430...
Session: c0a84b0b016716c6b50bd39807324430 is stopping...
c0a84b0b016716c6b50bd39807324430,STOPPED,-2
Restart a Session
This command restarts a session.
restart session <id> [synch] [format <format>]
Option | Mandatory | Description |
---|---|---|
|
Yes |
ID of the session to restart. |
|
No |
Waits for the session to be restarted to proceed. By default, the command does not wait until the session restarts to proceed. |
|
No |
Comma-separated list of columns to return in the output. This option is supported only in synch mode. The following columns are available:
'%name`, |
restart session c0a84b0b016716c58c17de7b2e8a75c9
Session: c0a84b0b016716c58c17de7b2e8a75c9 is restarted
restart session c0a84b0b016716c58c17de7b2e8a75c9 synch format %id,%status,%returncode
Session: c0a84b0b016716cadadf88fc29a8c399 is restarted...
c0a84b0b016716cadadf88fc29a8c399,ERROR,-1
Wait for a Session
This command waits for a session to complete, and issue the session return code as the output.
wait session <id> [format <format>]
Option | Mandatory | Description |
---|---|---|
|
Yes |
Id of the session to wait for. |
|
No |
Comma-separated list of columns to return in the output when the session completes. The following columns are available:
|
wait session c0a84b0b016716cdb01b379e2eddf9a3
1
wait session c0a84b0b016716c58c17de7b2e8a75c9 format %id,%status,%returncode
c0a84b0b016716c58c17de7b2e8a75c9,EXECUTED,1
Purge Sessions
This command purges the session logs.
purge keep <number> <minute|hour|day|session>
[sessionid <id1,id2,...>]
[sessionname <name,name2,...>]
[status <done,error,killed>]
Option | Mandatory | Description |
---|---|---|
|
Yes |
Number of sessions or historical duration to keep in the log. |
|
No |
Comma-separated list of sessions IDs to purge. |
|
No |
Comma-separated list of session names. Only sessions in this list are purged. |
|
No |
Comma-separated list of statuses. Purge sessions with these statuses. |
purge keep 100 session
purge keep 0 session sessionid mySessionid
purge keep 5 session sessionname mySession status done
purge keep 3 day
Schedule a Purge
This command schedules a purge of sessions.
schedule purge keep <number> <minute|hour|day|session>
cron <cron_expression>
[sessionname <name,name2,...>]
[sessionid <id1,id2,...>]
[status <done,error,killed>]
[on host <host_name>]
[port <host_port>]
Option | Mandatory | Description |
---|---|---|
|
Yes |
Number of sessions or historical duration to keep in the log. |
|
yes |
Cron expression to run the schedule. |
|
No |
Comma-separated list of sessions IDs to purge. |
|
No |
Comma-separated list of session names. Only sessions in this list are purged. |
|
No |
Comma-separated list of statuses. Purge sessions with these statuses. |
|
No |
Hostname or address of the runtime host. If this option is not set, the currently connected runtime is used. |
|
No |
Runtime port. |
schedule purge keep 10 session cron "0 15 10 * * ? *"