From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shannon Zhao Subject: [PATCH] cpu_layout.py: adjust output format to align Date: Tue, 27 May 2014 17:41:25 +0800 Message-ID: <53845DC5.3000400@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit To: Return-path: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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