diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2013-11-10 23:21:15 +0100 |
---|---|---|
committer | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2013-11-10 23:21:15 +0100 |
commit | c2e0d600ed76f6767d59715d93cf862808552ea2 (patch) | |
tree | 8e6e7b433a847b60530512868f28917bb7927131 /src/analyze | |
parent | 95056b27a05c527f4724b6c52abb2a7a69a3a5d0 (diff) | |
download | systemd-c2e0d600ed76f6767d59715d93cf862808552ea2.tar.gz systemd-c2e0d600ed76f6767d59715d93cf862808552ea2.tar.bz2 systemd-c2e0d600ed76f6767d59715d93cf862808552ea2.zip |
analyze: plot the time spent setting up security modules
Diffstat (limited to 'src/analyze')
-rw-r--r-- | src/analyze/analyze.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index b80b91c5b7..eb85276b40 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -83,6 +83,8 @@ struct boot_times { usec_t initrd_time; usec_t userspace_time; usec_t finish_time; + usec_t security_start_time; + usec_t security_finish_time; usec_t generators_start_time; usec_t generators_finish_time; usec_t unitsload_start_time; @@ -324,6 +326,16 @@ static int acquire_boot_times(sd_bus *bus, struct boot_times **bt) { bus_get_uint64_property(bus, "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", + "SecurityStartTimestampMonotonic", + ×.security_start_time) < 0 || + bus_get_uint64_property(bus, + "/org/freedesktop/systemd1", + "org.freedesktop.systemd1.Manager", + "SecurityFinishTimestampMonotonic", + ×.security_finish_time) < 0 || + bus_get_uint64_property(bus, + "/org/freedesktop/systemd1", + "org.freedesktop.systemd1.Manager", "GeneratorsStartTimestampMonotonic", ×.generators_start_time) < 0 || bus_get_uint64_property(bus, @@ -523,6 +535,7 @@ static int analyze_plot(sd_bus *bus) { " rect.firmware { fill: rgb(150,150,150); fill-opacity: 0.7; }\n" " rect.loader { fill: rgb(150,150,150); fill-opacity: 0.7; }\n" " rect.userspace { fill: rgb(150,150,150); fill-opacity: 0.7; }\n" + " rect.security { fill: rgb(144,238,144); fill-opacity: 0.7; }\n" " rect.generators { fill: rgb(102,204,255); fill-opacity: 0.7; }\n" " rect.unitsload { fill: rgb( 82,184,255); fill-opacity: 0.7; }\n" " rect.box { fill: rgb(240,240,240); stroke: rgb(192,192,192); }\n" @@ -566,6 +579,7 @@ static int analyze_plot(sd_bus *bus) { y++; } svg_bar("active", boot->userspace_time, boot->finish_time, y); + svg_bar("security", boot->security_start_time, boot->security_finish_time, y); svg_bar("generators", boot->generators_start_time, boot->generators_finish_time, y); svg_bar("unitsload", boot->unitsload_start_time, boot->unitsload_finish_time, y); svg_text(true, boot->userspace_time, y, "systemd"); @@ -603,6 +617,9 @@ static int analyze_plot(sd_bus *bus) { svg_bar("deactivating", 0, 300000, y); svg_text(true, 400000, y, "Deactivating"); y++; + svg_bar("security", 0, 300000, y); + svg_text(true, 400000, y, "Setting up security module"); + y++; svg_bar("generators", 0, 300000, y); svg_text(true, 400000, y, "Generators"); y++; |