px pxe logs
Print Portworx logs
Aliases: log
note
The following commands support a set of global flags that apply to all px pxe commands.
For details, see the Global Flags section.
px pxe logs node
Print Portworx logs for specified nodes
Aliases: nodes
Examples:
# Return Portworx logs from all nodes
kubectl px pxe logs node --all-nodes
# Return Portworx logs from node node-34-2
kubectl px pxe logs node node-34-2
# Begin streaming the Portworx logs from node node-34-2
kubectl px pxe logs node -f node-34-2
# Apply filters to only the most recent 20 log lines and display the matched lines
kubectl px pxe logs node --tail=20 node-34-2
# Display all log lines that has either error or warning on node abc
kubectl px pxe logs node node-34-2 --filter "error,warning"
# Show all Portworx logs from node node-34-2 written in the last hour
kubectl px pxe logs node node-34-2 --since=1h
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--all-nodes | bool | If specified, logs from all nodes will be displayed | false | Optional |
--filter | string | Comma seperated list of strings to search for. Log line will be printed if any one of the strings match. Note that if --tail is specified the filter is applied on only those many lines. | - | Optional |
--follow, -f | bool | Specify if the logs should be streamed. | false | Optional |
--ignore-errors | bool | If watching / following Portworx logs, allow for any errors that occur to be non-fatal | false | Optional |
--limit-bytes | int64 | Maximum bytes of logs to return. Defaults to no limit. | 0 | Optional |
--max-log-requests | int | Specify maximum number of concurrent logs to follow. Defaults to 5. | 5 | Optional |
--previous | bool | If true, print the logs for the previous instance of the container in a pod if it exists. | false | Optional |
--px-namespace | string | Kubernetes namespace in which Portworx is installed | - | Optional |
--show-pod-info | bool | Include pod info on each line in the log output | false | Optional |
--since | duration | Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used. | 0s | Optional |
--since-time | string | Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used. | - | Optional |
--tail | int64 | Lines of recent log file to work on. Defaults to -1, showing all log lines. All filters will be applied on top of these lines | -1 | Optional |
--timestamps | bool | Include timestamps on each line in the log output | false | Optional |
px pxe logs volume
Print Portworx logs related to specified volume(s)
Aliases: volumes, vol
Examples:
# Return Portworx logs related to volume abc
kubectl px pxe logs volume abc
# Begin streaming the Portworx logs related to volume abc
kubectl px pxe logs volume -f abc
# Apply the volume filters and the filters specified in --filters to the most recent 20 log lines of each relevant pod and display only lines that match
kubectl px pxe logs volume --tail=20 abc
# Display all log lines that is related to volume abc or has either error or warning in the log lines
kubectl px pxe logs volume abc --filter "error,warning"
# Show all Portworx logs related to volume abc written in the last hour
kubectl px pxe logs volume --since=1h abc
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--all-logs | bool | If specified all logs from the pods related to the volume are displayed. Otherwise only log lines that reference the volume or its id is displayed | false | Optional |
--filter | string | Comma seperated list of strings to search for. Log line will be printed if any one of the strings match. Note that if --tail is specified the filter is applied on only those many lines. | - | Optional |
--follow, -f | bool | Specify if the logs should be streamed. | false | Optional |
--ignore-errors | bool | If watching / following Portworx logs, allow for any errors that occur to be non-fatal | false | Optional |
--limit-bytes | int64 | Maximum bytes of logs to return. Defaults to no limit. | 0 | Optional |
--max-log-requests | int | Specify maximum number of concurrent logs to follow. Defaults to 5. | 5 | Optional |
--previous | bool | If true, print the logs for the previous instance of the container in a pod if it exists. | false | Optional |
--px-namespace | string | Kubernetes namespace in which Portworx is installed | - | Optional |
--selector, -l | string | Selector (label query) comma-separated name=value pairs | - | Optional |
--show-pod-info | bool | Include pod info on each line in the log output | false | Optional |
--since | duration | Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used. | 0s | Optional |
--since-time | string | Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used. | - | Optional |
--tail | int64 | Lines of recent log file to work on. Defaults to -1, showing all log lines. All filters will be applied on top of these lines | -1 | Optional |
--timestamps | bool | Include timestamps on each line in the log output | false | Optional |