[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-3061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13831244#comment-13831244
 ] 

Mandar Barve commented on CLOUDSTACK-3061:
------------------------------------------

This bug is reported against version 4.0.2.

I could not reproduce this problem with CS version 4.2. 

I used CloudMonkey CLI to fire API commands to the management server. With a 
basic zone created that has 1 pod, cluster and couple of system vms connected 
to the management server using CloudMonkey CLI sent the list hosts API command 
and the JSON response output could be captured in the log file. JSON response 
and the CLI output shows "cpuused". The value seen here could be matched 
against the portal reported host statistics value for CPU used.

CLI output:

> list hosts
count = 1
host:
id = df4fe805-a320-4417-b8be-22dd0b86561e
name = devcloud
capabilities = xen-3.0-x86_32p , hvm
clusterid = b3b80638-1fc5-4d13-aafc-28ff5155c681
clustername = test000
clustertype = CloudManaged
cpuallocated = 0%
cpunumber = 2
cpuspeed = 2486
cpuused = 0.22%
cpuwithoverprovisioning = 4972.0
created = 2013-10-07T18:57:58+0530
disconnected = 2013-10-15T11:24:19+0530
events = PingTimeout; AgentConnected; HostDown; ShutdownRequested; 
AgentDisconnected; ManagementServerDown; Remove; Ping; StartAgentRebalance
hahost = False
hypervisor = XenServer
ipaddress = 192.168.56.10
islocalstorageactive = False
lastpinged = 1970-01-16T20:20:29+0530

 JSON response log:

2013-10-15 11:48:32,724 - requester.py:45 - [DEBUG] ======== START Request 
========
2013-10-15 11:48:32,724 - requester.py:45 - [DEBUG] Requesting 
command=listHosts, args={}
2013-10-15 11:48:32,725 - requester.py:45 - [DEBUG] Request sent: 
http://localhost:8080/client/api?apiKey=c9uPXphFfiQS5589hVp245hWrqcg1yxcVNg9h1xJES34j8uAtvKj0EP6h8jlSC5_VlajL1a2TaXuYFGoON0DMg&command=listHosts&response=json&signature=hKQ5hI0XFpAzNPJYJ7ivR53%2FzJU%3D
2013-10-15 11:48:32,820 - requester.py:45 - [DEBUG] Response received: { 
"listhostsresponse" : { "count":1 ,"host" : [  
{"id":"df4fe805-a320-4417-b8be-22dd0b86561e","name":"devcloud","state":"Up","disconnected":"2013-10-15T11:24:19+0530","type":"Routing","ipaddress":"192.168.56.10","zoneid":"7b015b74-f00f-4216-b523-efc2e32c6bc5","zonename":"DevCloud0","podid":"c58e91d0-ad57-4d09-a485-f0decab857b4","podname":"test00","version":"4.2.0","hypervisor":"XenServer","cpunumber":2,"cpuspeed":2486,"cpuallocated":"0%","cpuused":"0.22%","cpuwithoverprovisioning":"4972.0","networkkbsread":57462,"networkkbswrite":38105,"memorytotal":2522221632,"memoryallocated":0,"memoryused":546428,"capabilities":"xen-3.0-x86_32p
 , 
hvm","lastpinged":"1970-01-16T20:20:29+0530","managementserverid":8796750265493,"clusterid":"b3b80638-1fc5-4d13-aafc-28ff5155c681","clustername":"test000","clustertype":"CloudManaged","islocalstorageactive":false,"created":"2013-10-07T18:57:58+0530","events":"PingTimeout;
 AgentConnected; HostDown; ShutdownRequested; AgentDisconnected; 
ManagementServerDown; Remove; Ping; 
StartAgentRebalance","resourcestate":"Enabled","hahost":false} ] } }
2013-10-15 11:48:32,821 - requester.py:45 - [DEBUG] ======== END Request 
========

Is this issue still open or can it be closed?

Thanks,
Mandar


> listHosts API doesn't has cpuused
> ---------------------------------
>
>                 Key: CLOUDSTACK-3061
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3061
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: API, KVM, Management Server
>    Affects Versions: 4.0.2
>         Environment: Ubuntu 13.04
>            Reporter: Tanasak Janpan
>             Fix For: 4.0.2
>
>
> I looked on the Management server http://localhost:8080/client I found that 
> Host's CPU Utilized is blank, and when I called an listHosts API as 
> following, there is no "cpuused"
> {"id":"278aec06-cb72-453d-8e2e-c3dc84ea87f8","name":"khonmek-10","state":"Up","disconnected":"2013-06-19T11:37:47+0900","type":"Routing","ipaddress":"192.168.20.10","zoneid":"b57f6c55-32b3-4b34-bdc5-dfb619a5a427","zonename":"bzone","podid":"1c2bf974-c5eb-4a09-973a-cd2f388dd20c","podname":"bpod","version":"4.0.2.20130501180711","hypervisor":"KVM","cpunumber":8,"cpuspeed":3326,"cpuallocated":"3.76%","cpuwithoverprovisioning":"26608.0","memorytotal":50634014720,"memoryallocated":1610612736,"capabilities":"hvm,snapshot","lastpinged":"1970-01-16T21:04:33+0900","managementserverid":133832192856,"clusterid":"cd2950ce-472e-41e6-8d7e-4880e6c87f04","clustername":"bcluster","clustertype":"CloudManaged","islocalstorageactive":false,"created":"2013-06-07T11:57:22+0900","events":"HostDown;
>  Remove; ManagementServerDown; ShutdownRequested; AgentConnected; 
> PingTimeout; Ping; StartAgentRebalance; 
> AgentDisconnected","hosttags":"undefined","suitableformigration":false,"resourcestate":"Enabled","hahost":false}
> How can I fix it? 
> Thank you everyone



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to