Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

The usage CLI subcommand should only show information about pools currently being used #1870

@rmanyari

Description

@rmanyari

Is your feature request related to a problem? Please describe.

Not a problem exactly but a usability improvement. When Cook is configured with many pools, the cs usage subcommand can be difficult to read. It would be great if the default behavior would be to only show the pools where resources are being used.

Describe the solution you'd like

Instead of returning something like:

$ cs --cluster pubcloud usage
PUBCLOUD - pool-1
               CPUs       Memory     GPUs       Jobs
Quota          0.0        0.0 bytes  0.0        0
Share          Unlimited  Unlimited  Unlimited  N/A
Current Usage  0.0        0.0 bytes  0.0        0

PUBCLOUD - pool-2 (inactive)
                 CPUs  Memory     GPUs       Jobs
Quota            3000  19.07 TiB  Unlimited  150
Share            3000  19.07 TiB  Unlimited  N/A
Current Usage       0  0.0 bytes  0.0        0

PUBCLOUD - useful-pool
               CPUs       Memory     GPUs       Jobs
Quota          Unlimited  Unlimited  Unlimited  1000
Share          Unlimited  Unlimited  Unlimited  N/A
Current Usage  10.0        250.0 GiB  0.0        10

It should return something like:

PUBCLOUD - useful-pool
               CPUs       Memory     GPUs       Jobs
Quota          Unlimited  Unlimited  Unlimited  1000
Share          Unlimited  Unlimited  Unlimited  N/A
Current Usage  10.0        250.0 GiB  0.0        10

Since useful-pool is the only one with active jobs.

Maybe this is the side effect of adding a flag (--used-only, defaults=True) to cs usage.

Describe alternatives you've considered
Status-quo, not great.

Additional context
Credits to @dposada for the original idea.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions