## zowe › ca7 › agent › agentLogs

Retrieve a Zip file containing files from the Agent's log directory. If a list of file names is supplied, only log files matching the specified name(s) will be included.
If a list of file names is not supplied, all of the logs will be included.
Note: WARNING: Depending on the size of the Agent's log files and which files are retrieved, this operation may take considerable time to complete.

#### Usage

zowe ca7 agent agentLogs [options]

#### Required Options

- `--ca7Id` (string)

  - CA7ONL Instance

- `--agent-name` | `--agname` (string)

  - Specifies the name of the Agent for which to retrieve additional details.
    Limits: 1 to 16 alphanumeric characters

#### Options

- `--os` (string)

  - Specifies the operating system of the Agent as known by the Scheduler.
    WindowsLinuxUnixetc.Default: Linux

- `--logmaxsource` | `--log` (string)

  - Specifies the maximum size of all source log files to be retrieved.

    Limits: 1 to 10 numeric characters in the range 1-2147483647
    Default: 524288000

- `--logmaxzip` (string)

  - Specifies the maximum size of of the target Zip file to be retrieved.

    Limits: 1 to 10 numeric characters in the range 1-2147483647
    Default: 262144000

- `--filenames` (array)

  - Log file names. Wildcards are not allowed.

#### CA7 Connection Options

- `--host` | `-H` (string)

  - Host name of the CA7 API service that is running on the mainframe system.

- `--port` | `-P` (number)

  - Port for the CA7 API service that is running on the mainframe system.

- `--user` | `-u` (string)

  - User name for authenticating connections to the CA7 API service that is running on the mainframe system.

- `--password` | `--pass` | `--pw` (string)

  - Password for authenticating connections to the CA7 API service that is running on the mainframe system.

- `--base-path` | `--bp` (string)

  - The base path for your API mediation layer instance. Specify this option to prepend the base path to all resources when making REST requests. Do not specify this option if you are not using an API mediation layer.

- `--protocol` | `-o` (string)

  - Specifies protocol to use for CA7 connection (http or https).

    Allowed values: http, https

#### Profile Options

- `--ca7-profile` | `--ca7-p` (string)

  - The name of a (ca7) profile to load for this command execution.

- `--base-profile` | `--base-p` (string)

  - The name of a (base) profile to load for this command execution.

#### Base Connection Options

- `--reject-unauthorized` | `--ru` (boolean)

  - Reject self-signed certificates.

    Default value: true

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

    Note: The CLI does not support certificate files that require a password. For more information, search Troubleshooting PEM Certificates in Zowe Docs.

- `--cert-key-file` (local file path)

  - The file path to a certificate key file to use for authentication

#### Examples

- Get Agent logs of AGENTTEST for INSTANCE1:

  - `zowe ca7 agent agentLogs --agname AGENTTEST --ca7Id INSTANCE1`