Bug 1010372 - oo-admin-ctl-usage doesn't give hints to unit used
oo-admin-ctl-usage doesn't give hints to unit used
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ravi Sankar
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-20 12:03 EDT by Nam Duong
Modified: 2015-05-14 20:20 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-17 09:30:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nam Duong 2013-09-20 12:03:42 EDT
Description of problem:
See https://www.openshift.com/forums/openshift/oo-admin-ctl-usage

1)  oo-admin-ctl-usage -l dmp | grep abcdefg
Gear: abcdefg, UsageType: GEAR_USAGE, Usage: 670.9346516100759

Would be good to show units in the output.  


2) oo-admin-ctl-usage --help

Would be good to include in --help docs as well  


--- here's the current help---
== Synopsis

oo-admin-ctl-usage: Control usage

== Usage

oo-admin-ctl-usage OPTIONS

Options:
--list
    List usage available to be synced
--sync
    Sync usage with the billing vendor
--remove-sync-lock
    Remove existing sync lock
--enable-logger
    Print error/warning messages to log file '/var/log/openshift/broker/usage-billing.log' instead of terminal.
-h|--help
    Show Usage info
Comment 1 Abhishek Gupta 2013-09-24 15:31:53 EDT
Feel free to refer oo-admin-usage for output formatting.
Comment 2 Ravi Sankar 2013-09-26 16:44:57 EDT
Fixed in https://github.com/openshift/origin-server/pull/3715

<example-output>
[root@ip-10-32-53-49 ~]# oo-admin-ctl-usage --list
Errors/Warnings will be logged to terminal
2013-09-26 16:39:36 -0400 INFO:: 
---------- STARTED ----------

User: ravip
        Gear: 5244985e1a1664073d000007, UsageType: GEAR_USAGE, Usage: 13 minutes and 23 seconds
        Gear: 52449b5c1a1664073d000020, UsageType: GEAR_USAGE, Usage: 38 seconds
2013-09-26 16:39:36 -0400 INFO:: 
---------- ENDED, #Errors: 0, #Warnings: 0 ----------
</example-output>
Comment 4 Jianwei Hou 2013-09-29 07:30:30 EDT
Verified on devenv_3844
[root@ip-10-4-29-190 ~]# oo-admin-ctl-usage --list
Errors/Warnings will be logged to terminal
2013-09-29 06:52:15 -0400 INFO:: 
---------- STARTED ----------

User: openshift+migration3@redhat.com
	Gear: 524795f418568ca6340005f0, UsageType: GEAR_USAGE, Usage: 1 hours and 58 minutes
	Gear: 5247962618568ca634000612, UsageType: GEAR_USAGE, Usage: 1 hours and 21 minutes
	Gear: 5247964518568ca634000630, UsageType: GEAR_USAGE, Usage: 1 hours and 58 minutes
	Gear: 5247966518568ca634000649, UsageType: GEAR_USAGE, Usage: 1 hours and 58 minutes
	Gear: 5247968418568ca634000667, UsageType: GEAR_USAGE, Usage: 1 hours and 58 minutes
	Gear: 524796b318568ca63400068e, UsageType: GEAR_USAGE, Usage: 1 hours and 58 minutes
	Gear: 524796d518568ca6340006ab, UsageType: GEAR_USAGE, Usage: 1 hours and 58 minutes
	Gear: 524796d518568ca6340006ab, UsageType: PREMIUM_CART, Usage: 1 hours and 58 minutes
	Gear: 5247971918568ca6340006d6, UsageType: GEAR_USAGE, Usage: 1 hours and 58 minutes
..........

Note You need to log in before you can comment on or make changes to this bug.