cli
cli copied to clipboard
Output CPU Entitlement metrics rather than the old CPU metric
What's the user value of this feature request?
Currently the cf CLI displays a CPU metric which is difficult to reason about. See #1194 for background here.
Instead we'd like the cf CLI to show CPU Entitlement usage which is more useful.
Who is the functionality for?
End users of the cf CLI.
How often will this functionality be used by the user?
Frequently. We would expect the CPU Entitlement usage stat to be presented when cf app
is run or following cf push
(as currently).
Who else is affected by the change?
This is potentially a breaking change dependent on whether this is implemented by replacing the existing CPU column or adding an additional column.
Is your feature request related to a problem? Please describe.
Developers find it difficult to reason about their application use of CPU without knowledge of the underlying platform.
Describe the solution you'd like
Modify the cf CLI to output CPU Entitlement in place of the old CPU metric for environments that expose the CPU Entitlement process stat.
state since cpu entitlement memory disk logging details
#0 running 2024-02-10T00:30:38Z 5.0% 47.7M of 1G 129.6M of 1G 0/s of 16K/s
#1 running 2024-02-12T18:17:49Z 5.0% 47.7M of 1G 129.6M of 1G 0/s of 16K/s
For environments that do not expose the CPU Entitlement information the cf CLI would continue to show the existing output.
Describe alternatives you've considered
Adding an additional column towards the end of the column output would be more backwards compatible but potentially confusing:
state since cpu memory disk logging cpu entitlement details
#0 running 2024-02-10T00:30:38Z 0.2% 47.7M of 1G 129.6M of 1G 0/s of 16K/s 5.0%
#1 running 2024-02-12T18:17:49Z 0.1% 47.3M of 1G 129.6M of 1G 0/s of 16K/s 2.5%
Additional context
https://github.com/cloudfoundry/diego-release/issues/897 https://github.com/cloudfoundry/cloud_controller_ng/pull/3641
There was some great work done to emit absolute usage and entitlement metrics earlier but these were not directly consumable via the core cf CLI.
https://github.com/cloudfoundry/cpu-entitlement-plugin
If we go with the initial proposed option, I think we should consider giving the user a compatibility flag (IE. USE_CPU_USAGE=true) to use cpu usage regardless of whatever capi returns.
Created https://github.com/cloudfoundry/cli/pull/2840 to add CPU Entitlement to the cf CLI v8 in a backwards-compatible manner, e.g. add it to the end of the app process table (before details).
So which cli and server versions do we need to use to see the cpu entitlement metrics ?
So which cli and server versions do we need to use to see the cpu entitlement metrics ?
No version of the cf CLI has been released yet with these changes. The next versions of the cf CLI v8 and v9 (when it is released) will have a cpu entitlement
column in the table. Its entry may be empty though if the CAPI that responds doesn't support the metric.
CAPI v1.175.0 is the first to support CPU Entitlement metrics.
@ctlong Is there any timeline for the next CLI release? We are eager to get started with the CPU entitlements metric, but without CLI support it's tricky to roll that out...
@ctlong Is there any timeline for the next CLI release? We are eager to get started with the CPU entitlements metric, but without CLI support it's tricky to roll that out...
^ @a-b @tcdowney do you have a timeline?
We're in the final stage of the Cli Bosh release pipeline redesign, which is blocking this release. We expect to release CLI by the end of this week.
Awesome, thank you!
@a-b Do you have any updates on when the next version will be released? thx!
We have most of our infrastructure ready. Very likely this week.
@jossy new CLI version was released last week.
Should this issue be closed as delivered then? Or do folks want to wait until v9 is released with the proposed changes?
@ctlong but v8 also has support for it ?!
At least I can see it now using cli version 8.7.11+b1b4068.2024-07-09
Right, this proposal resulted in two PRs:
- Add
cpu entitlement
column to the end of the app table in the v8 cf CLI - Replace
cpu
column withcpu entitlement
column in the next major version (v9) of the cf CLI
Both have been merged, but only (1) has been released. (2) is awaiting a v9 cf CLI release
I propose that this issue is now complete, even though there is no v9 cf CLI release yet.