Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 3.01 KB

pxc_volume_logs.md

File metadata and controls

63 lines (47 loc) · 3.01 KB

pxc volume logs

Print Portworx logs related to specified volume(s)

pxc volume logs [NAME] [flags]

Examples


  # Return Portworx logs related to volume abc
  pxc volume logs abc

  # Begin streaming the Portworx logs related to volume abc
  pxc volume logs -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
  pxc volume logs --tail=20 abc

  # Display all log lines that is related to volume abc or has either error or warning in the log lines
  pxc volume logs abc --filter "error,warning"

  # Show all Portworx logs related to volume abc written in the last hour
  pxc volume logs --since=1h volume

Options

      --all-logs               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 
      --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.
  -f, --follow                 Specify if the logs should be streamed.
  -h, --help                   help for logs
      --ignore-errors          If watching / following Portworx logs, allow for any errors that occur to be non-fatal
      --limit-bytes int        Maximum bytes of logs to return. Defaults to no limit.
      --max-log-requests int   Specify maximum number of concurrent logs to follow. Defaults to 5. (default 5)
      --previous               If true, print the logs for the previous instance of the container in a pod if it exists.
      --px-namespace string    Kubernetes namespace in which Portworx is installed (default "kube-system")
  -l, --selector string        Selector (label query) comma-separated name=value pairs
      --show-pod-info          Include pod info on each line in the log output
      --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.
      --since-time string      Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used.
      --tail int               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 (default -1)
      --timestamps             Include timestamps on each line in the log output

Options inherited from parent commands

      --pxc.config string       Config file (default is $HOME/.pxc/config.yml)
      --pxc.config-dir string   Config directory (default "/home2/lpabon/.pxc")
      --pxc.context string      Force context name for the command
      --pxc.token string        Portworx authentication token
      --pxc.v int32             [0-3] Log level verbosity

SEE ALSO

Auto generated by spf13/cobra on 29-Sep-2021