summaryrefslogtreecommitdiff
path: root/src/analyze
Commit message (Collapse)AuthorAge
* hashmap: introduce hash_ops to make struct Hashmap smallerMichal Schmidt2014-09-15
| | | | | | | | | It is redundant to store 'hash' and 'compare' function pointers in struct Hashmap separately. The functions always comprise a pair. Store a single pointer to struct hash_ops instead. systemd keeps hundreds of hashmaps, so this saves a little bit of memory.
* analyze: fix mem leakThomas Hindoe Paaboel Andersen2014-09-13
| | | | Found with Coverity. Fixes: CID#1237756
* analyze: avoid a null dereferenceThomas Hindoe Paaboel Andersen2014-09-11
| | | | | | | If we have an error in the early sd_bus_* calls then unit_times will still be null. Found with coverity. Fixes: CID#996464
* cmdline: for new tools avoid introduce new negative switches, and properly ↵Lennart Poettering2014-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | align --help texts Negative switches are a bad un-normalized thing. We alerady have some, but we should try harder to avoid intrdoucing new ones. Hence, instead of adding two switches: --foobar --no-foobar Let's instead use the syntax --foobar --foobar=yes --foobar=no Where the first two are equivalent. The boolean argument is parsed following the usual rules. Change all new negative switches this way. This patch also properly aligns the --help table, so that single char switches always get a column separate of the long switches.
* analyze: some fixes to the --help textLennart Poettering2014-08-14
|
* bus: always explicitly close bus from main programsLennart Poettering2014-08-04
| | | | | | | | | | | | | | Since b5eca3a2059f9399d1dc52cbcf9698674c4b1cf0 we don't attempt to GC busses anymore when unsent messages remain that keep their reference, when they otherwise are not referenced anymore. This means that if we explicitly want connections to go away, we need to close them. With this change we will no do so explicitly wherver we connect to the bus from a main program (and thus know when the bus connection should go away), or when we create a private bus connection, that really should go away after our use. This fixes connection leaks in the NSS and PAM modules.
* Unify parse_argv styleZbigniew Jędrzejewski-Szmek2014-08-03
| | | | | | | | | | | | | | | | getopt is usually good at printing out a nice error message when commandline options are invalid. It distinguishes between an unknown option and a known option with a missing arg. It is better to let it do its job and not use opterr=0 unless we actually want to suppress messages. So remove opterr=0 in the few places where it wasn't really useful. When an error in options is encountered, we should not print a lengthy help() and overwhelm the user, when we know precisely what is wrong with the commandline. In addition, since help() prints to stdout, it should not be used except when requested with -h or --help. Also, simplify things here and there.
* Constify option table and add missing optionZbigniew Jędrzejewski-Szmek2014-07-31
|
* analyze: fix seg-fault with no cl-argumentDaniel Buch2014-07-26
| | | | We need to check if argv[1] is set before compare
* Merge systemd-verify with systemd-analyzeZbigniew Jędrzejewski-Szmek2014-07-21
|
* analyze/run: use bus_open_transport_systemd instead of bus_open_transportThomas Bächler2014-05-26
| | | | | | | | | Both systemd-analyze and systemd-run only access org.freedesktop.systemd1 on the bus. This patch allows using systemd-run --user and systemd-analyze --user even if the user session's bus is not properly integrated with the systemd user unit. https://bugs.freedesktop.org/show_bug.cgi?id=79252 and other reports...
* analyze: read host and system information from remoteDjalal Harouni2014-05-19
| | | | | | | | | | This makes "systemd-analyze plot" read host information from remote. While we are it show if this is a virtualized system. https://bugs.freedesktop.org/show_bug.cgi?id=76498 Reported-by: Zach <zachcook1991@gmail.com>
* analyze: fix plot with bad y sizeJeffrey Clark2014-04-23
| | | | | | | | | systemd-analyze plot > test.svg produces output with all y and height element attributes equal to zero. This of course causes the resulting svg to appear blank (zero height). Bug does not affect x86. Looks like a compiler optimization may be the culprit. https://github.com/archlinuxarm/PKGBUILDs/issues/815
* delta: draw arrows with draw_special_char()Lennart Poettering2014-04-23
| | | | | | | Let's unify generation of unicode chars at one place. Also, don't add an extra space into chars we print, except for the tree chars where this is really necessary.
* analyze: fix plot issues when using gummibootThomas Hindoe Paaboel Andersen2014-01-31
| | | | It would crash and the legend in the bottom followed the time 0.0.
* trivial coding style clean upsThomas Hindoe Paaboel Andersen2013-12-03
| | | | | | | | | | | | | | - Add space between if/for and the opening parentheses - Place the opening brace on same line as the function (not for udev) From the CODING_STYLE Try to use this: void foo() { } instead of this: void foo() { }
* analyze: plot the time spent setting up security modulesThomas Hindoe Paaboel Andersen2013-11-10
|
* clients: add missing command line argumentsLennart Poettering2013-11-08
|
* systemctl: port to libsystemd-busMarc-Antoine Perennou2013-11-08
|
* analyze: make use of new sd_bus_get_property_strv() callLennart Poettering2013-11-07
|
* clients: try to follow roughly the same order in --help texts for common optionsLennart Poettering2013-11-07
|
* bus: log message parsing errors everywhere with a generalized ↵Lennart Poettering2013-11-07
| | | | bus_log_parse_error()
* build-sys: merge sd-event into sd-busLennart Poettering2013-11-07
| | | | | | The sd-event APIs should be available only as part of libsystemd-bus so that the utility calls are not linked into each independently and we can minimize the number of libraries we have.
* clients: unify how we invoke getopt_long()Lennart Poettering2013-11-06
| | | | | Among other things this makes sure we always expose a --version command and show it in the help texts.
* analyze: port over to use bus_open_transport()Lennart Poettering2013-11-06
|
* analyze: simplify thingsLennart Poettering2013-11-06
|
* analyze: fix indentationLennart Poettering2013-11-06
|
* analyze: rename variablesThomas Hindoe Paaboel Andersen2013-11-01
|
* analyze: plot: place the text on the side with most spaceThomas Hindoe Paaboel Andersen2013-11-01
| | | | | | | | | Set the width of the svg to always fit the longest string while taking its starting position into consideration. Place the text on the right while the starting point is in the first half of the screen. After that we put it on the left to save the svg from being wider that it has to.
* analyze: share code to read a string array from sd-busThomas Hindoe Paaboel Andersen2013-10-31
|
* analyze: use sd_bus_get_propery_trivial and indentationThomas Hindoe Paaboel Andersen2013-10-31
|
* general: various cleanupsLennart Poettering2013-10-30
|
* analyze: port to sd-busThomas Hindoe Paaboel Andersen2013-10-25
|
* analyze: systemd-analyze.c -> analyze.cKay Sievers2013-10-22
|
* analyze: set white backgoundThomas Hindoe Paaboel Andersen2013-10-21
| | | | | | | In programs like eog and gimp the transparant background did not look very good. https://bugs.freedesktop.org/show_bug.cgi?id=70720
* Fix write-only use of a few variablesZbigniew Jędrzejewski-Szmek2013-10-13
| | | | | | Since the invention of read-only memory, write-only memory has been considered deprecated. Where appropriate, either make use of the value, or avoid writing it, to make it clear that it is not used.
* Never call qsort on potentially NULL arraysZbigniew Jędrzejewski-Szmek2013-10-13
| | | | | | This extends 62678ded 'efi: never call qsort on potentially NULL arrays' to all other places where qsort is used and it is not obvious that the count is non-zero.
* systemctl: move set-log-level to systemd-analyzeLennart Poettering2013-07-26
| | | | | | "systemctl set-log-level" is a command for analysis and tracing hence "systemd-analyze" should be the better home for it, thus allowing us to make the overly large "systemctl" a bit smaller.
* systemctl: move "dump" command from systemctl to systemd-analyzeLennart Poettering2013-07-26
| | | | | | | | | | It's an analysis command and its format is explicitly not covered by any stability guarantees, hence move away from systemctl and into systemd-analyze, minimizing the already large interface of systemctl a bit. This patch also adds auto-paging to the various systemd-analyze commands where that makes sense
* systemd-analyze: Show critical chains for listed unitsGabriel de Perthuis2013-06-14
|
* analyze: fix font size on plotThomas Hindoe Paaboel Andersen2013-06-02
| | | | | The font-size was missing a unit so they were ignored. This patch sets the unit to 'px' and adjusts the sizes a bit as the text got very small.
* analyze: show unit file loading on plotThomas Hindoe Paaboel Andersen2013-06-02
| | | | | | This will add another color to the legend called "Loading unit files" Like the generators it will mark a part of the systemd bar indicating the time spent while loading unit files.
* analyze: show generators on plotUmut Tezduyar2013-06-02
|
* cgls: add --machine/-MZbigniew Jędrzejewski-Szmek2013-05-01
| | | | | cg_get_machine_path is modified to include the escaped machine name + ".nspawn" if the machine argument is nonnull.
* zsh-completion: add s-a critical-chainZbigniew Jędrzejewski-Szmek2013-05-01
|
* systemd-analyse: add "critical-chain" commandHarald Hoyer2013-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "critical-chain" prints a tree of the critical chain of units $ ./systemd-analyze critical-chain graphical.target @1.226s └─multi-user.target @1.226s └─nfs-lock.service @961ms +265ms └─rpcbind.service @958ms +1ms └─network.target @957ms └─NetworkManager.service @434ms +522ms └─basic.target @428ms └─sockets.target @428ms └─dbus.socket @428ms └─sysinit.target @427ms └─systemd-tmpfiles-setup.service @411ms +15ms └─local-fs.target @410ms └─boot-efi.automount @410ms └─boot.mount @397ms +9ms └─local-fs-pre.target @192ms └─systemd-udevd.service @187ms +5ms └─systemd-udevd-control.socket @140ms └─-.mount With the "--fuzz=<ms>" parameter one can display more units around the critical units. $ ./systemd-analyze --fuzz=10ms critical-chain └─multi-user.target @1.226s └─nfs-lock.service @961ms +265ms ├─rpcbind.service @958ms +1ms │ └─network.target @957ms │ └─NetworkManager.service @434ms +522ms │ ├─basic.target @428ms │ │ ├─sockets.target @428ms │ │ │ ├─dbus.socket @428ms │ │ │ │ └─sysinit.target @427ms │ │ │ │ ├─systemd-tmpfiles-setup.service @411ms +15ms │ │ │ │ │ └─local-fs.target @410ms │ │ │ │ │ └─boot-efi.automount @410ms │ │ │ │ │ └─boot.mount @397ms +9ms │ │ │ │ │ └─local-fs-pre.target @192ms │ │ │ │ │ └─systemd-udevd.service @187ms +5ms │ │ │ │ │ ├─systemd-udevd-control.socket @140ms │ │ │ │ │ │ └─-.mount │ │ │ │ │ └─systemd-udevd-kernel.socket @140ms │ │ │ │ └─swap.target @421ms │ │ │ │ └─dev-disk-by\x2duuid-....swap @414ms +6ms │ │ │ │ └─systemd-journald.socket │ │ │ ├─rpcbind.socket @428ms │ │ │ └─cups.socket @428ms │ │ ├─paths.target @428ms │ │ │ └─cups.path @428ms │ │ ├─timers.target @427ms │ │ │ └─systemd-tmpfiles-clean.timer @427ms │ │ └─sysinit.target @427ms │ │ └─... │ └─dbus.socket @428ms │ └─... └─network.target @957ms └─...
* analyze: various cleanupsLennart Poettering2013-04-08
|
* analyze: fix OOM handling + fix memory leakLennart Poettering2013-04-08
|
* analyze: add missing --help text entriesLennart Poettering2013-04-08
|
* systemd-analyze: filter dot outputŁukasz Stelmach2013-04-08
| | | | | | | | | | | | | | | | Make "systemd-analyze dot" output only lines with units matching given glob(7) patterns. Add --from-pattern and --to-pattern options. Without any patterns all relationships are printed as before. A relationship must match the follwing expression: (isempty(from) || from[0] || from[1] || .. || from[n]) && (isempty(to) || to[0] || to[1] || .. || to[n]) && (isempty(P) || P[0] || P[1] || ... || P[n]) where from[] and to[] are lists of patterns provided with subsequent --from-pattern and --to-pattern respectively. P[] is a list of additional patterns provided after the "dot" subcommand.