From patchwork Wed Feb 19 20:31:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Eikelenboom X-Patchwork-Id: 11392369 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6D9A1138D for ; Wed, 19 Feb 2020 20:33:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 49CAF208C4 for ; Wed, 19 Feb 2020 20:33:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=eikelenboom.it header.i=@eikelenboom.it header.b="Obx0lpnC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 49CAF208C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=eikelenboom.it Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4W1K-0001oy-7j; Wed, 19 Feb 2020 20:32:34 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4W1I-0001om-7W for xen-devel@lists.xenproject.org; Wed, 19 Feb 2020 20:32:32 +0000 X-Inumbo-ID: f26bed3c-5356-11ea-8452-12813bfff9fa Received: from server.eikelenboom.it (unknown [91.121.65.215]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id f26bed3c-5356-11ea-8452-12813bfff9fa; Wed, 19 Feb 2020 20:32:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=eikelenboom.it; s=20180706; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ghxYQxMUHANtAVscJ5818pADD/qrOSUvx8dogWcVNIA=; b=Obx0lpnCadaFeIm4IIoNKKpsq6 7fNMei+zVQ6SrR2Pa83m8HKm7WA+c8C3AcYi2LEOsz18WERKBPKU4QPkqyH84NDGhAQ2RLlaQbZcX XS0BOTIiIbO4fMb16kko7/27Lxhv1dSfGonabv2hy8x287e6dFPfrSSImA/tTVVZEbk0=; Received: from ip4da85049.direct-adsl.nl ([77.168.80.73]:60560 helo=localhost.localdomain) by server.eikelenboom.it with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j4W2k-0005p1-5d; Wed, 19 Feb 2020 21:34:02 +0100 From: Sander Eikelenboom To: xen-devel@lists.xenproject.org Date: Wed, 19 Feb 2020 21:31:30 +0100 Message-Id: <416169fe34ec346a5edde2c66c4b017871c2a891.1582143896.git.linux@eikelenboom.it> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 1/3] tools/xentop: Fix calculation of used memory. X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Sander Eikelenboom , Ian Jackson , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Sander Eikelenboom Acked-by: Wei Liu --- tools/xenstat/xentop/xentop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c index af11ebfbf7..13b612f26d 100644 --- a/tools/xenstat/xentop/xentop.c +++ b/tools/xenstat/xentop/xentop.c @@ -969,7 +969,7 @@ void do_summary(void) "%u crashed, %u dying, %u shutdown \n", num_domains, run, block, pause, crash, dying, shutdown); - used = xenstat_node_tot_mem(cur_node); + used = xenstat_node_tot_mem(cur_node)-xenstat_node_free_mem(cur_node); freeable_mb = 0; /* Dump node memory and cpu information */ From patchwork Wed Feb 19 20:31:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Eikelenboom X-Patchwork-Id: 11392375 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1ACA5924 for ; Wed, 19 Feb 2020 20:33:57 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EBEBD24654 for ; Wed, 19 Feb 2020 20:33:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=eikelenboom.it header.i=@eikelenboom.it header.b="ZZuofW68" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBEBD24654 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=eikelenboom.it Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4W1P-0001pZ-1A; Wed, 19 Feb 2020 20:32:39 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4W1N-0001pJ-Pk for xen-devel@lists.xenproject.org; Wed, 19 Feb 2020 20:32:37 +0000 X-Inumbo-ID: f3c5876a-5356-11ea-ade5-bc764e2007e4 Received: from server.eikelenboom.it (unknown [91.121.65.215]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f3c5876a-5356-11ea-ade5-bc764e2007e4; Wed, 19 Feb 2020 20:32:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=eikelenboom.it; s=20180706; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=IwM5xDVexTtFbifpzcvRacL+iCjmBdmezBNuwX9Wrb0=; b=ZZuofW68kpx+4sW8OdtDPa/85Z SSgzQLjxBfPG7cy1LSkpSfPD9XGIiRK7PazMHd1pyLtPeLA3f1zL0syJxeJc7uNi/s6Nu0/97yhIP tmFiuWKz8K3RST5emu0za8a2qv0RdiZI7V5vP425+XwLQgLzzPoaJ7stvwFyDUsv8ZWE=; Received: from ip4da85049.direct-adsl.nl ([77.168.80.73]:60560 helo=localhost.localdomain) by server.eikelenboom.it with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j4W2k-0005p1-AC; Wed, 19 Feb 2020 21:34:02 +0100 From: Sander Eikelenboom To: xen-devel@lists.xenproject.org Date: Wed, 19 Feb 2020 21:31:31 +0100 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 2/3] tools/xentop: Remove dead code X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Sander Eikelenboom , Ian Jackson , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Sander Eikelenboom Acked-by: Wei Liu --- tools/xenstat/xentop/xentop.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c index 13b612f26d..bbb5d47b76 100644 --- a/tools/xenstat/xentop/xentop.c +++ b/tools/xenstat/xentop/xentop.c @@ -943,7 +943,6 @@ void do_summary(void) crash = 0, dying = 0, shutdown = 0; unsigned i, num_domains = 0; unsigned long long used = 0; - long freeable_mb = 0; xenstat_domain *domain; time_t curt; @@ -970,17 +969,12 @@ void do_summary(void) num_domains, run, block, pause, crash, dying, shutdown); used = xenstat_node_tot_mem(cur_node)-xenstat_node_free_mem(cur_node); - freeable_mb = 0; /* Dump node memory and cpu information */ - if ( freeable_mb <= 0 ) - print("Mem: %lluk total, %lluk used, %lluk free ", + print("Mem: %lluk total, %lluk used, %lluk free ", xenstat_node_tot_mem(cur_node)/1024, used/1024, xenstat_node_free_mem(cur_node)/1024); - else - print("Mem: %lluk total, %lluk used, %lluk free, %ldk freeable, ", - xenstat_node_tot_mem(cur_node)/1024, used/1024, - xenstat_node_free_mem(cur_node)/1024, freeable_mb*1024); + print("CPUs: %u @ %lluMHz\n", xenstat_node_num_cpus(cur_node), xenstat_node_cpu_hz(cur_node)/1000000); From patchwork Wed Feb 19 20:31:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Eikelenboom X-Patchwork-Id: 11392371 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A1D5E924 for ; Wed, 19 Feb 2020 20:33:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F05C208C4 for ; Wed, 19 Feb 2020 20:33:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=eikelenboom.it header.i=@eikelenboom.it header.b="VoOIsjYw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F05C208C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=eikelenboom.it Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4W1N-0001pK-OM; Wed, 19 Feb 2020 20:32:37 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4W1N-0001pA-5W for xen-devel@lists.xenproject.org; Wed, 19 Feb 2020 20:32:37 +0000 X-Inumbo-ID: f4c1bcf6-5356-11ea-8452-12813bfff9fa Received: from server.eikelenboom.it (unknown [91.121.65.215]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id f4c1bcf6-5356-11ea-8452-12813bfff9fa; Wed, 19 Feb 2020 20:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=eikelenboom.it; s=20180706; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=th3924BFsFSTZk5IjWOH9K2MKjJRP9fWvV+SRMISZxU=; b=VoOIsjYwPzXB6T67ToY4l0OZ4j CWAROLvKx2O1n59MGIdSoJOdg66uT3KsZdGIL9lDHM8cmvpt7aJN1JzZYrxlF5MO+DUKT808Xocu1 2MsPOA/mFxhtfzhr3A7dz3l0Z22MNOoGumioHMZX4oEGpgPsfnoKb3o47RmL1BoW7mww=; Received: from ip4da85049.direct-adsl.nl ([77.168.80.73]:60560 helo=localhost.localdomain) by server.eikelenboom.it with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j4W2k-0005p1-Eq; Wed, 19 Feb 2020 21:34:02 +0100 From: Sander Eikelenboom To: xen-devel@lists.xenproject.org Date: Wed, 19 Feb 2020 21:31:32 +0100 Message-Id: <4fd751d1a45632f9ed0a32b7fc7988343ad03f83.1582143896.git.linux@eikelenboom.it> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 3/3] tools/xentop: Cleanup some trailing whitespace X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Sander Eikelenboom , Ian Jackson , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Sander Eikelenboom Acked-by: Wei Liu --- tools/xenstat/xentop/xentop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c index bbb5d47b76..fdcfb3b396 100644 --- a/tools/xenstat/xentop/xentop.c +++ b/tools/xenstat/xentop/xentop.c @@ -1015,7 +1015,7 @@ void do_bottom_line(void) addch(A_REVERSE | 'N'); attr_addstr(show_networks ? COLOR_PAIR(1) : 0, "etworks"); addstr(" "); - + /* VBDs */ attr_addstr(show_vbds ? COLOR_PAIR(1) : 0, "v"); addch(A_REVERSE | 'B'); @@ -1123,7 +1123,7 @@ void do_vbd(xenstat_domain *domain) "BlkBack", /* number 1 */ "BlkTap", /* number 2 */ }; - + num_vbds = xenstat_domain_num_vbds(domain); for (i=0 ; i< num_vbds; i++) {