[dpdk-dev] [PATCH] cpu_layout.py: adjust output format to align
Shannon Zhao
zhaoshenglong at huawei.com
Tue May 27 11:41:25 CEST 2014
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 <zhaoshenglong at huawei.com>
---
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
More information about the dev
mailing list