From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [119.145.14.64]) by dpdk.org (Postfix) with ESMTP id B6172AFD1 for ; Tue, 27 May 2014 11:42:12 +0200 (CEST) Received: from 172.24.2.119 (EHLO szxeml211-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BWB13816; Tue, 27 May 2014 17:42:17 +0800 (CST) Received: from SZXEML415-HUB.china.huawei.com (10.82.67.154) by szxeml211-edg.china.huawei.com (172.24.2.182) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 27 May 2014 17:41:32 +0800 Received: from [127.0.0.1] (10.177.16.142) by szxeml415-hub.china.huawei.com (10.82.67.154) with Microsoft SMTP Server id 14.3.158.1; Tue, 27 May 2014 17:41:25 +0800 Message-ID: <53845DC5.3000400@huawei.com> Date: Tue, 27 May 2014 17:41:25 +0800 From: Shannon Zhao User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] cpu_layout.py: adjust output format to align X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 09:42:13 -0000 Bug: when "core id" is greater than 9, the cpu_layout.py output doesn't align. Socket 0 Socket 1 --------- --------- Core 9 [4, 16] [10, 22] Core 10 [5, 17] [11, 23] Solution: adjust output format to align Socket 0 Socket 1 --------- --------- Core 9 [4, 16] [10, 22] Core 10 [5, 17] [11, 23] Signed-off-by: Shannon Zhao --- tools/cpu_layout.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cpu_layout.py b/tools/cpu_layout.py index 9eff9d7..4768551 100755 --- a/tools/cpu_layout.py +++ b/tools/cpu_layout.py @@ -83,7 +83,7 @@ for s in sockets: print "" for c in cores: - print "Core %s" % c, + print "Core %s" % str(c).ljust(2), for s in sockets: - print "\t", core_map[(s,c)], + print core_map[(s,c)],"\t", print "\n" -- 1.7.1