Bug 1010372 - oo-admin-ctl-usage doesn't give hints to unit used
Summary: oo-admin-ctl-usage doesn't give hints to unit used
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-20 16:03 UTC by Nam Duong
Modified: 2015-05-15 00:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:30:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nam Duong 2013-09-20 16:03:42 UTC
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 19:31:53 UTC
Feel free to refer oo-admin-usage for output formatting.

Comment 2 Ravi Sankar 2013-09-26 20:44:57 UTC
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 11:30:30 UTC
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
	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.