List z/OS operlog within a time range.
Use this operation to get the z/OS operations logs. It invokes z/OSMF REST API to retrieve logs.
Executing 'zowe zos-logs list logs' will by default return logs from current time and backwards to 10 minutes before.
Note: OPERLOG needs to be configured on z/OS server.
Usage
zowe zos-logs list logs [options]
Options
Profile Options
Base Connection Options
-
--host
| -H
(string)
- Host name of service on the mainframe.
-
--port
| -P
(number)
- Port number of service on the mainframe.
-
--user
| -u
(string)
- User name to authenticate to service on the mainframe.
-
--password
| --pass
| --pw
(string)
- Password to authenticate to service on the mainframe.
-
--reject-unauthorized
| --ru
(boolean)
-
--token-type
| --tt
(string)
- The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'.
-
--token-value
| --tv
(string)
- The value of the token to pass to the API.
-
--cert-file
(local file path)
- The file path to a certificate file to use for authentication
-
--cert-key-file
(local file path)
- The file path to a certificate key file to use for authentication
Examples
-
List logs starting from '2021-07-26T03:38:37.098Z' and forwards to 5 minutes later:
zowe zos-logs list logs --start-time 2021-07-26T03:38:37.098Z --range 5m --direction forward
-
List logs starting from '2021-07-26T03:38:37.098Z' and forwards to 5 minutes later. Alias version of the above command:
zowe zos-logs list logs --st 2021-07-26T03:38:37.098Z -r 5m -d forward
-
List logs starting from '2021-07-26T03:38:37.098Z' and backwards to 5 minutes before:
zowe zos-logs list logs --start-time 2021-07-26T03:38:37.098Z --range 5m