summaryrefslogtreecommitdiff
path: root/src/systemd-analyze
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-30 20:15:45 +0200
committerLennart Poettering <lennart@poettering.net>2011-03-30 20:15:45 +0200
commitfac9f8df1f49117cf8b84667cb0565103e955bcb (patch)
tree81738184f5b75e3684b1ea90b9518d2cd2f60f39 /src/systemd-analyze
parentf39133ac7fcd49c767a6ca3a491cb6c03269968a (diff)
analyze: beautify output a bit
Diffstat (limited to 'src/systemd-analyze')
-rwxr-xr-xsrc/systemd-analyze7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/systemd-analyze b/src/systemd-analyze
index 43023297ff..1a367e7e27 100755
--- a/src/systemd-analyze
+++ b/src/systemd-analyze
@@ -23,10 +23,9 @@ def acquire_time_data():
return l
-data = acquire_time_data()
-
if len(sys.argv) <= 1 or sys.argv[1] == 'blame':
+ data = acquire_time_data()
s = sorted(data, key = lambda i: i[2] - i[1], reverse = True)
for i in s:
@@ -37,4 +36,6 @@ if len(sys.argv) <= 1 or sys.argv[1] == 'blame':
if i[2] <= i[1]:
continue
- sys.stdout.write("%lums\t %s\n" % ((i[2] - i[1]) / 1000, i[0]))
+ sys.stdout.write("%6lums %s\n" % ((i[2] - i[1]) / 1000, i[0]))
+else:
+ sys.stderr.write("Unknown verb '%s'.\n" % sys.argv[1])