Viewing PVC usage statistics

To monitor storage consumption, view the usage statistics for Persistent Volume Claims (PVCs). By accessing these metrics, you can track resource use and ensure that your workloads have sufficient capacity.

Important

PVC usage statistics command is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

Procedure
  • To view statistics across a cluster, run the following command:

    $ oc adm top pvc -A
    Example command output
    NAMESPACE     NAME         USAGE(%)
    namespace-1   data-etcd-1  3.82%
    namespace-1   data-etcd-0  3.81%
    namespace-1   data-etcd-2  3.81%
    namespace-2   mypvc-fs-gp3 0.00%
    default       mypvc-fs     98.36%
  • To view PVC usage statistics for a specified namespace, run the following command:

    $ oc adm top pvc -n <namespace_name>
    • Where <namespace_name> is the name of the specified namespace.

      Example command output
      NAMESPACE     NAME        USAGE(%)
      namespace-1   data-etcd-2 3.81%
      namespace-1   data-etcd-0 3.81%
      namespace-1   data-etcd-1 3.82%

      In this example, the specified namespace is namespace-1.

  • To view usage statistics for a specified PVC and for a specified namespace, run the following command:

    $ oc adm top pvc <pvc_name> -n <namespace_name>
    • Where <pvc_name> is the name of specified PVC.

    • Where <namespace_name> is the name of the specified namespace.

      Example command output
      NAMESPACE   NAME        USAGE(%)
      namespace-1 data-etcd-0 3.81%

      In this example, the specified namespace is namespace-1 and the specified PVC is data-etcd-0.