From: Lennart Poettering Date: Wed, 30 Mar 2011 18:15:45 +0000 (+0200) Subject: analyze: beautify output a bit X-Git-Tag: v22~16 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fac9f8df1f49117cf8b84667cb0565103e955bcb;p=systemd analyze: beautify output a bit --- diff --git a/src/manager.c b/src/manager.c index faf30dc4..fdb5beda 100644 --- a/src/manager.c +++ b/src/manager.c @@ -2328,7 +2328,7 @@ static int process_event(Manager *m, struct epoll_event *ev) { int manager_loop(Manager *m) { int r; - RATELIMIT_DEFINE(rl, 1*USEC_PER_SEC, 1000); + RATELIMIT_DEFINE(rl, 1*USEC_PER_SEC, 50000); assert(m); m->exit_code = MANAGER_RUNNING; diff --git a/src/systemd-analyze b/src/systemd-analyze index 43023297..1a367e7e 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])