Skip to main content

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

FlagInput typeDescriptionDefaultRequired
--all-nodesboolIf specified, logs from all nodes will be displayedfalseOptional
--filterstringComma 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, -fboolSpecify if the logs should be streamed.falseOptional
--ignore-errorsboolIf watching / following Portworx logs, allow for any errors that occur to be non-fatalfalseOptional
--limit-bytesint64Maximum bytes of logs to return. Defaults to no limit.0Optional
--max-log-requestsintSpecify maximum number of concurrent logs to follow. Defaults to 5.5Optional
--previousboolIf true, print the logs for the previous instance of the container in a pod if it exists.falseOptional
--px-namespacestringKubernetes namespace in which Portworx is installed-Optional
--show-pod-infoboolInclude pod info on each line in the log outputfalseOptional
--sincedurationOnly 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.0sOptional
--since-timestringOnly return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used.-Optional
--tailint64Lines of recent log file to work on. Defaults to -1, showing all log lines. All filters will be applied on top of these lines-1Optional
--timestampsboolInclude timestamps on each line in the log outputfalseOptional

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

FlagInput typeDescriptionDefaultRequired
--all-logsboolIf specified all logs from the pods related to the volume are displayed. Otherwise only log lines that reference the volume or its id is displayedfalseOptional
--filterstringComma 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, -fboolSpecify if the logs should be streamed.falseOptional
--ignore-errorsboolIf watching / following Portworx logs, allow for any errors that occur to be non-fatalfalseOptional
--limit-bytesint64Maximum bytes of logs to return. Defaults to no limit.0Optional
--max-log-requestsintSpecify maximum number of concurrent logs to follow. Defaults to 5.5Optional
--previousboolIf true, print the logs for the previous instance of the container in a pod if it exists.falseOptional
--px-namespacestringKubernetes namespace in which Portworx is installed-Optional
--selector, -lstringSelector (label query) comma-separated name=value pairs-Optional
--show-pod-infoboolInclude pod info on each line in the log outputfalseOptional
--sincedurationOnly 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.0sOptional
--since-timestringOnly return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used.-Optional
--tailint64Lines of recent log file to work on. Defaults to -1, showing all log lines. All filters will be applied on top of these lines-1Optional
--timestampsboolInclude timestamps on each line in the log outputfalseOptional