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 */