You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by mvs babu <mv...@outlook.com> on 2015/01/23 08:31:41 UTC

No VMID/VolumeID in Volume Usage Data

Hi Team,


When I pull usage data of a VM (Type 2) it showing virtualmachineid. Using this ID we can map each usage record to their corresponding VM.


But in Volume usage (Type 6), here is no VM ID/ Volume ID. How can I map a usage record to their Volume?


Please find below usage data for VM and Volume.



================================================================================

For a VM

================================================================================

mycloudmonkey> list usagerecords startdate=2015-01-20 enddate=2015-01-21 type=2


name = Web1
account = srini
accountid = 02b2c2f6-48cc-466d-a76c-8d5db6a6308a
description = Web1 allocated (ServiceOffering: 2) (Template: 205)
domainid = d7c0337c-1495-11e4-ba8d-000c29a411ce
enddate = 2015-01-20'T'23:59:59+00:00
offeringid = bde08194-34cb-4f74-aa47-df340987a3d0
rawusage = 24
startdate = 2015-01-20'T'00:00:00+00:00
templateid = a6435deb-fbdd-4a85-9bf2-223402610bd2
type = XenServer
usage = 24 Hrs
usageid = 2648a03c-204f-4a97-b41c-28ccd9810b81
usagetype = 2
virtualmachineid = 2648a03c-204f-4a97-b41c-28ccd9810b81
zoneid = 5de2c509-d6ca-4bfb-ac18-6506810bf6f9
================================================================================




================================================================================

For a Volume


================================================================================

mycloudmonkey> list usagerecords startdate=2015-01-20 enddate=2015-01-21 type=6



account = Demo
accountid = 5a1d718b-9da0-4808-9aa6-f66278fd1f5a
description = Volume Id: 242 usage time (DiskOffering: 2)
domainid = 92e5bbab-7955-4d0a-99a7-582baeabbc15
enddate = 2015-01-20'T'23:59:59+00:00
offeringid = bde08194-34cb-4f74-aa47-df340987a3d0
rawusage = 24
size = 21474836480
startdate = 2015-01-20'T'00:00:00+00:00
usage = 24 Hrs
usageid = b6289b0c-d70a-459f-b1ff-c16f0986fcaa
usagetype = 6
zoneid = 5de2c509-d6ca-4bfb-ac18-6506810bf6f9

================================================================================


Thank you,

Suneel.



Sent from Windows Mail

RE: No VMID/VolumeID in Volume Usage Data

Posted by Somesh Naidu <So...@citrix.com>.
Volume Id: 242

The volume ID seems to be present in the API output - you could do "select * from volumes where id=242" to get the details about that volume.

Regards,
Somesh

-----Original Message-----
From: mvs babu [mailto:mvsbabu0308@outlook.com] 
Sent: Friday, January 23, 2015 2:32 AM
To: cloudusersusers
Subject: No VMID/VolumeID in Volume Usage Data

Hi Team,


When I pull usage data of a VM (Type 2) it showing virtualmachineid. Using this ID we can map each usage record to their corresponding VM.


But in Volume usage (Type 6), here is no VM ID/ Volume ID. How can I map a usage record to their Volume?


Please find below usage data for VM and Volume.



================================================================================

For a VM

================================================================================

mycloudmonkey> list usagerecords startdate=2015-01-20 enddate=2015-01-21 type=2


name = Web1
account = srini
accountid = 02b2c2f6-48cc-466d-a76c-8d5db6a6308a
description = Web1 allocated (ServiceOffering: 2) (Template: 205)
domainid = d7c0337c-1495-11e4-ba8d-000c29a411ce
enddate = 2015-01-20'T'23:59:59+00:00
offeringid = bde08194-34cb-4f74-aa47-df340987a3d0
rawusage = 24
startdate = 2015-01-20'T'00:00:00+00:00
templateid = a6435deb-fbdd-4a85-9bf2-223402610bd2
type = XenServer
usage = 24 Hrs
usageid = 2648a03c-204f-4a97-b41c-28ccd9810b81
usagetype = 2
virtualmachineid = 2648a03c-204f-4a97-b41c-28ccd9810b81
zoneid = 5de2c509-d6ca-4bfb-ac18-6506810bf6f9
================================================================================




================================================================================

For a Volume


================================================================================

mycloudmonkey> list usagerecords startdate=2015-01-20 enddate=2015-01-21 type=6



account = Demo
accountid = 5a1d718b-9da0-4808-9aa6-f66278fd1f5a
description = Volume Id: 242 usage time (DiskOffering: 2)
domainid = 92e5bbab-7955-4d0a-99a7-582baeabbc15
enddate = 2015-01-20'T'23:59:59+00:00
offeringid = bde08194-34cb-4f74-aa47-df340987a3d0
rawusage = 24
size = 21474836480
startdate = 2015-01-20'T'00:00:00+00:00
usage = 24 Hrs
usageid = b6289b0c-d70a-459f-b1ff-c16f0986fcaa
usagetype = 6
zoneid = 5de2c509-d6ca-4bfb-ac18-6506810bf6f9

================================================================================


Thank you,

Suneel.



Sent from Windows Mail