Skip to main content
px pxe version: 2.0.0

px pxe get

List Portworx resources

Aliases: list

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 get alert​

List and get information about Portworx alerts

Aliases: alerts

Examples:

# Get portworx related alerts
px pxe get alert

# Fetch alerts based on particular alert id. Fetch all alerts based on "VolumeCreateSuccess" id
px pxe get alert --id "VolumeCreateSuccess"

# Fetch alerts between a time window
px pxe get alert --start-time "2019-09-19T09:40:26.371Z" --end-time "2019-09-19T09:43:59.371Z"

# Fetch alerts with min severity level
px pxe get alert --severity "alarm"

# Fetch alerts based on resource type. Here we fetch all "volume" related alerts
px pxe get alert -t "volume"

# Fetch alerts based on resource id. Here we fetch alerts related to "cluster"
px pxe get alert --id "1f95a5e7-6a38-41f9-9cb2-8bb4f8ab72c5"

Flags

FlagInput typeDescriptionDefaultRequired
--all, -AboolShow all alertsfalseOptional
--end-time, -estringend time span (RFC 3339)-Optional
--id, -istringAlert id-Optional
--output, -ostringOutput in yaml|json|wide-Optional
--resource-idstringResource ID for a specific type-Optional
--severity, -vstringMin severity value (Valid Values: [notify warn warning alarm]) (default "notify")notifyOptional
--start-time, -bstringstart time span (RFC 3339)-Optional
--type, -tstringalert type (Valid Values: [volume node cluster drive all])allOptional

px pxe get clouddrive​

List all cloud drives

Aliases: cd, cloud-drive, cloud-drives, clouddrives

Flags

FlagInput typeDescriptionDefaultRequired
--output, -ostringOutput in yaml|json-Optional

px pxe get cluster​

Show Portworx and Kubernetes information for every context in your kubeconfig

Aliases: clusters

Examples:

# Scan through all the contexts in your kubeconfig and display cluster information
px pxe get cluster

# Show cluster information for contexts that match contain 'east-coast' in the name
px pxe get cluster --context-match='*east-coast*,*south*'

# Output all Kubernetes and Portworx cluster information as json for your contexts that match '*on-prem*'
px pxe get cluster -o json --context-match='*on-prem*'

Flags

FlagInput typeDescriptionDefaultRequired
--context-matchstringComma separated list of expressions match the appropriate context-Optional
--output, -ostringOutput in yaml|json|wide-Optional

px pxe get diags​

Get all Portworx diagnostics CRs

Aliases: diag, diagnostics

Examples:

# Get all diagnostic CRs
px pxe get diags

# Get diagnostic CRs in wide format
px pxe get diags -o wide

# Get diagnostic CRs in JSON format
px pxe get diags -o json

# Get diagnostic CRs in YAML format
px pxe get diags -o yaml

Flags

FlagInput typeDescriptionDefaultRequired
--output, -ostringOutput in wide-Optional

px pxe get kubedatastore​

List Kube Datastores with storage capacity and volume information.

Columns: VOLUMES Total volumes with a replica on this KDS or affinity to this KDS

Wide output (-o wide) additional columns: AFFINITY Volumes with affinity to this KDS PENDING Affinity volumes with replicas pending move to this KDS

Aliases: kds, kube-datastore, kube-datastores, kubedatastores

Examples:

# List all Kube Datastores
px pxe get kubedatastore

# Get a specific Kube Datastore
px pxe get kubedatastore <kube-datastore-name>

# Output with additional columns (AFFINITY, PENDING)
px pxe get kubedatastore -o wide

# Output Kube Datastore information in JSON format
px pxe get kubedatastore -o json

# Output Kube Datastore information in YAML format
px pxe get kubedatastore -o yaml

Flags

FlagInput typeDescriptionDefaultRequired
--output, -ostringOutput in yaml|json-Optional

px pxe get node​

List Portworx nodes information

Aliases: nodes

Examples:

# List all Portworx nodes
px pxe get node

# List nodes with detailed information in wide format
px pxe get node -o wide

# List nodes and show labels
px pxe get node --show-labels

# Output node information in JSON format
px pxe get node -o json

# Output node information in YAML format
px pxe get node -o yaml

Flags

FlagInput typeDescriptionDefaultRequired
--output, -ostringOutput in yaml|json|wide-Optional
--show-labelsboolShow labels in the last column of the outputfalseOptional

px pxe get pvc​

Show Portworx volume information for Kubernetes PVCs

Aliases: pvcs

Examples:

# Get information for all pvcs that are Portworx volumes
px pxe get pvc

# Get information for pvc abc
px pxe get pvc abc

# Get information for pvcs abc and xyz
px pxe get pvc abc xyz

Flags

FlagInput typeDescriptionDefaultRequired
--all-namespacesboolKubernetes namespacefalseOptional
--output, -ostringOutput in yaml|json|wide-Optional
--show-labelsboolShow labels in the last column of the outputfalseOptional

px pxe get virtualmachine​

List Virtual Machines

Displays a list of Virtual Machines that have Portworx volumes.

A VM identifier may be given in any of these forms: NAMESPACE/NAME, NAME (with -n NAMESPACE), or UID.

Columns: VM VM identifier (namespace/name format, usable with describe vm) VOLUMES Number of volumes attached to the VM KDS (AFFINITY) Kube Datastores the VM's volumes have affinity to KDS (REPLICAS) Kube Datastores where volume replicas are located

Aliases: vm, vms, virtualmachines

Examples:

# List all VMs across all namespaces
px pxe get virtualmachine

# List VMs (short alias)
px pxe get vms

# List VMs in a specific namespace
px pxe get vms -n my-namespace

# Show specific VMs by namespace/name
px pxe get vms ns1/my-vm ns2/other-vm

# Show specific VMs by name within a namespace
px pxe get vms my-vm other-vm -n my-namespace

Flags

FlagInput typeDescriptionDefaultRequired
--output, -ostringOutput in yaml|json-Optional

px pxe get volume​

Get information about Portworx volumes

Aliases: volumes, vol

Examples:

# Get information about the portworx volumes
px pxe get volume

Flags

FlagInput typeDescriptionDefaultRequired
--kdsstringAlias for --kube-datastore-Optional
--kube-datastorestringShow volumes associated with the specified Kube Datastore (affinity or replicas)-Optional
--output, -ostringOutput in yaml|json|wide-Optional
--ownerstringOwner of volume-Optional
--selector, -lstringSelector (label query) comma-separated name=value pairs-Optional
--show-k8s-infoboolShow kubernetes informationfalseOptional
--show-labelsboolShow labels in the last column of the outputfalseOptional
--vmstringShow volumes for the specified VM (namespace/vm-name or vm-uid)-Optional
--volumegroupstringVolume group id-Optional
In this topic: