Clarity on "show children energywise" usage

Document created by cdnadmin on Jan 24, 2014
Version 1Show Document
  • View in full screen mode
This document was generated from CDN thread

Created by: Christopher Verges on 22-07-2010 06:23:11 PM
We've configured our EnergyWise endpoint as a meter.  It currently reports 123.0 W for the metered usage.  It appears properly in the "show energywise children" output:

Interface   Role              Name                  Usage      Category  Lvl   Imp  Type
---------   ----              ----                  -----      --------  ---   ---  ----
            WS-C3560G-48PS    c3560-swlab-1         130.0 (W)  consumer  10    1    parent
Gi0/1       EndPoint    123.0 (W)  meter     10    5    child
Gi0/47      AIR-AP1242G-A-K9  access-point          15.4  (W)  consumer  10    1    PoE

Total Displayed: 3      Usage: 145.4

Note that the "Usage" displayed in summary at the bottom of the output is different than the sum of the usage column from the core body of the output.  It appears that the summary "Usage" is a sum of the consumers, not a sum of all children reported.
Is this behavior correct?  If so, what is the rationale for summing usage selectively in the summary?
P.S.  Interestingly, "energywise query ... sum usage" reports the expected "total" usage of 268.4 W.

Subject: RE: Clarity on "show children energywise" usage
Replied by: Brock Miller on 26-07-2010 11:01:09 PM
Hi Chris,
Yes, from CLI perspective this is expected behavior.  In order to maintain consistency, this usage value displayed on the CLI output will only take into consideration the consumer usage values (i.e. to prevent double counting of a consumer + meter usage value).
From a query perspective, however, one must specify the usage category that the results should be filtered on (consumer or meter or producer).  To maintain backwards compatibility and consistency, a query that specifiies no usage category filter will automatically default to only consumer devices.  This is the case from a CLI query since CLI queries do not currently support adding a usage category filter option.
The discrepancy that you are seeing is caused by the SDK improperly filtering on usage category.  The sum usage CLI query should only count for consumer devices, but you are seeing the SDK's metered usage in the sum due to a bug on SDK side.  Brad has filed a bug on our side for this and we will get this addressed in the next code drop.