Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 05B2B1051B for ; Fri, 21 Nov 2014 14:51:37 +0000 (UTC) Received: (qmail 79682 invoked by uid 500); 21 Nov 2014 14:51:34 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 79611 invoked by uid 500); 21 Nov 2014 14:51:34 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 79547 invoked by uid 500); 21 Nov 2014 14:51:34 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 79532 invoked by uid 99); 21 Nov 2014 14:51:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2014 14:51:34 +0000 Date: Fri, 21 Nov 2014 14:51:34 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-3383) GetHostStatsCommand fails when agent is running Ubuntu 13.04 (raring) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-3383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14220992#comment-14220992 ] ASF subversion and git services commented on CLOUDSTACK-3383: ------------------------------------------------------------- Commit 93b2b3a4ae2ff2f4ecd3592ac6b7ff58714baeba in cloudstack's branch refs/heads/4.5 from [~widodh] [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=93b2b3a ] CLOUDSTACK-3383: Fetch CPU utilization more reliable. This should fix that we can't gather CPU statistics on hypervisors > Ubuntu 12.04 (cherry picked from commit 69ee01af9df8d72ccd8901d146726e74edda95d7) Signed-off-by: Rohit Yadav > GetHostStatsCommand fails when agent is running Ubuntu 13.04 (raring) > --------------------------------------------------------------------- > > Key: CLOUDSTACK-3383 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3383 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: KVM > Affects Versions: 4.1.0 > Environment: Ubuntu 13.04 > Reporter: Harm van Tilborg > Assignee: Wido den Hollander > Labels: agent, kvm, libvirt > Fix For: 4.5.0, 4.6.0, 4.4.2 > > Attachments: ubuntu14-usage-stats.patch > > > 2013-07-05 13:02:37,782 DEBUG [cloud.agent.Agent] (agentRequest-Handler-3:null) Processing command: com.cloud.agent.api.GetHostStatsCommand > 2013-07-05 13:02:37,782 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-3:null) Executing: /bin/bash -c idle=$(top -b -n 1|grep Cpu\(s\):|cut -d% -f4|cut -d, -f2);echo $idle > 2013-07-05 13:02:37,940 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-3:null) Execution is successful. > 2013-07-05 13:02:37,941 DEBUG [cloud.agent.Agent] (agentRequest-Handler-3:null) Seq 1-2144469000: { Ans: , MgmtId: 159497075554, via: 1, Ver: v1, Flags: 10, [{"Answer":{"result":false,"details":"empty String","wait":0}}] } > When I check the output of Ubuntu's 13.04 top (top -v = procps-ng version 3.3.3), it's formatted like this: > raring# top -b -n 1|grep Cpu\(s\): > %Cpu(s): 0.2 us, 0.2 sy, 0.0 ni, 99.5 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st > While on Ubuntu 12.04 (top -v = procps version 3.2.8) it looks like this: > precise# top -b -n 1|grep Cpu\(s\): > Cpu(s): 0.3%us, 0.1%sy, 0.0%ni, 99.6%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st > So I believe it is better to split the string on a comma (,) than using the percentage (%). -- This message was sent by Atlassian JIRA (v6.3.4#6332)