summaryrefslogtreecommitdiffstats
path: root/src/analyze (follow)
Commit message (Collapse)AuthorAgeFilesLines
* analyze: deprecate the commands moved to systemctlZbigniew Jędrzejewski-Szmek2019-11-181-5/+2
| | | | | This just removes the commands from --help and the man pages, everything works as before.
* systemctl: add service-watchdogs commandZbigniew Jędrzejewski-Szmek2019-11-181-20/+17
| | | | | The rationale is the same as for log-level/log-target: this controls the behaviour of the manager, and belongs in systemctl.
* analyze: adjust the description of the default verbZbigniew Jędrzejewski-Szmek2019-11-181-1/+1
|
* tree-wide: clean up --help texts a bitLennart Poettering2019-11-181-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleans up and unifies the outut of --help texts a bit: 1. Highlight the human friendly description string, not the command line via ANSI sequences. Previously both this description string and the brief command line summary was marked with the same ANSI highlight sequence, but given we auto-page to less and less does not honour multi-line highlights only the command line summary was affectively highlighted. Rationale: for highlighting the description instead of the command line: the command line summary is relatively boring, and mostly the same for out tools, the description on the other hand is pregnant, important and captions the whole thing and hence deserves highlighting. 2. Always suffix "Options" with ":" in the help text 3. Rename "Flags" → "Options" in one case 4. Move commands to the top in a few cases 5. add coloring to many more help pages 6. Unify on COMMAND instead of {COMMAND} in the command line summary. Some tools did it one way, others the other way. I am not sure what precisely {} is supposed to mean, that uppercasing doesn't, hence let's simplify and stick to the {}-less syntax And minor other tweaks.
* Merge pull request #13940 from keur/protect_kernel_logsLennart Poettering2019-11-151-0/+15
|\ | | | | Add ProtectKernelLogs to systemd.exec
| * systemd-analyze: Add ProtectKernelLogs to securityKevin Kuehler2019-11-151-0/+15
| |
* | verify: fix segmentation faultHATAYAMA Daisuke2019-11-131-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | systemd-analyze verify command now results in segmentation fault if two consecutive non-existent unit file names are given: # ./build/systemd-analyze a.service b.service ...<snip irrelevant part>... Unit a.service not found. Unit b.service not found. Segmentation fault (core dumped) The cause of this is a wrong handling of return value of manager_load_startable_unit_or_warn() in verify_units() in failure case. It looks that the current logic wants to assign the first error status throughout verify_units() into variable r and count up variable count only when a given unit file exists. However, due to the wrong handling of the return value of manager_load_startable_unit_or_warn() in verify_units(), the variable count is unexpectedly incremented even when there is no such unit file because the variable r already contains non-zero value in the 2nd failure, set by the 1st failure, and then the condition k < 0 && r == 0 evaluates to false. This commit fixes the wrong handling of return value of manager_load_startable_unit_or_warn() in verify_units().
* | analyze: drop spurious newlineLennart Poettering2019-11-131-1/+0
| |
* | analyze: add --base-time= to specify base time for 'calendar' verbLennart Poettering2019-11-131-1/+15
|/
* tree-wide: drop locale.h when locale-util.h is includedYu Watanabe2019-11-031-1/+0
|
* tree-wide: drop missing.hYu Watanabe2019-10-311-2/+2
|
* analyze: fix minor memleakLennart Poettering2019-10-301-1/+1
|
* analyze: sort list of unknown syscalls kernel implementsLennart Poettering2019-10-301-4/+10
|
* various tools: be more explicit when a glob is passed when not supportedZbigniew Jędrzejewski-Szmek2019-10-251-1/+1
| | | | | | | | | | | | See https://bugzilla.redhat.com/show_bug.cgi?id=1763488: when we say that 'foo@*.service' is not a valid unit name, this is not clear enough. Let's include the name of the operation that does not support globbing in the error message: $ build/systemctl enable 'foo@*.service' Glob pattern passed to enable, but globs are not supported for this. Invalid unit name "foo@*.service" escaped as "foo@\x2a.service". ...
* Fix typo in `analyze-security.c`.Johannes Christ2019-08-101-1/+1
|
* analyze-security: move assert above first use of the variable (#13238)Jan Synacek2019-07-311-1/+2
|
* analyze: declare dump_exit_status outside of HAVE_SECCOMP blockMike Gilbert2019-07-311-46/+46
| | | | | Fixes: 76ed04d936f757763c32db5dbaaebd8b13785d7b Closes: https://github.com/systemd/systemd/issues/13230
* Merge pull request #13119 from keszybz/unit-loading-2Lennart Poettering2019-07-301-0/+50
|\ | | | | Rework unit loading to take into account all aliases
| * pid1: drop unit caches only based on mtimeZbigniew Jędrzejewski-Szmek2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | v2: - do not watch mtime of transient and generated dirs We'd reload the map after every transient unit we created, which we don't need to do, since we create those units ourselves and know their fragment path.
| * analyze: add "unit-files" to dump the unit fragment mapZbigniew Jędrzejewski-Szmek2019-07-301-0/+50
| | | | | | | | | | I'm not convinced that this is useful enough to be included... But it is certainly nice when debugging.
* | analyze: clarify that 'exit-status' optionally takes argumentsLennart Poettering2019-07-291-1/+1
| |
* | analyze: right-align exit status columnLennart Poettering2019-07-291-0/+4
| |
* | analyze: rename "exit-codes" to "exit-status"Lennart Poettering2019-07-291-12/+12
| | | | | | | | | | | | waitid(2) and the libc function signature calls this "exit status", and uses "exit code" for something different. Let's stick to the same nomenclature hence.
* | analyze: always use "int" to display exit status valuesLennart Poettering2019-07-291-2/+2
| | | | | | | | | | That's what it actually is, hence let's use that and cast when the type is bigger.
* | Merge pull request #13207 from keszybz/symbolic-exit-code-namesLennart Poettering2019-07-291-0/+45
|\ \ | | | | | | Symbolic exit code names
| * | analyze: add exit-codes verbZbigniew Jędrzejewski-Szmek2019-07-291-0/+45
| |/
* / analyze: dot(1) man page link should be urlifiedLennart Poettering2019-07-291-2/+8
|/ | | | | | | | I mean, let's not miss out on this excellent opportunity to use hyperlinks on terminals. (Unfortunately not see unless you invoke 'systemd-analyze --no-pager --help', because 'less' is so much stuck in the past :-(.)
* Merge pull request #13076 from keszybz/pr/13062Zbigniew Jędrzejewski-Szmek2019-07-161-9/+11
|\ | | | | Timer formatting fixes
| * tree-wide: use lowercase table headersZbigniew Jędrzejewski-Szmek2019-07-161-4/+4
| | | | | | | | | | | | | | https://github.com/systemd/systemd/pull/13062#discussion_r303847484 > the formatter uppercases them anyway, and this way the JSON output of the > formatter is nicer as it uses the table header fields 1:1 for the json > output.
| * analyze: fix formatting of timestamps with 0 µsZbigniew Jędrzejewski-Szmek2019-07-151-5/+7
| | | | | | | | | | There is a rule that "%.0d" formats 0 as "". There is no such rule for "%0d" and 0 :(. The output had an extra 0 if usec was 0.
* | Merge pull request #13074 from poettering/format-tree-manyLennart Poettering2019-07-161-28/+8
|\ \ | |/ |/| table_add_many() improvements
| * analyze: port over one part of systemd-analyze to use new table_add_many() ↵Lennart Poettering2019-07-161-28/+8
| | | | | | | | concepts
* | analyze: format output of 'systemd-analyze timestamp' by using TableYu Watanabe2019-07-151-15/+69
| |
* | analyze: format output of 'systemd-analyze timespan' by using TableYu Watanabe2019-07-151-8/+54
| |
* | analyze: format output of 'systemd-analyze calendar' by using TableYu Watanabe2019-07-151-20/+93
| |
* | analyze: format output of 'systemd-analyze blame' by using TableYu Watanabe2019-07-151-10/+41
|/
* basic/time-util: add helper function to check if timestamp is setZbigniew Jędrzejewski-Szmek2019-07-041-1/+1
| | | | No functional change.
* analyze: add 'condition' verbZbigniew Jędrzejewski-Szmek2019-06-274-0/+170
| | | | | We didn't have a straightforward way to parse and evaluate those strings. Prompted by #12881.
* bpf-firewall: custom BPF programs through IP(Ingress|Egress)FilterPath=Kai Lüke2019-06-251-1/+36
| | | | | | | Takes a single /sys/fs/bpf/pinned_prog string as argument, but may be specified multiple times. An empty assignment resets all previous filters. Closes https://github.com/systemd/systemd/issues/10227
* analyze: also print unix time in "timestamp"Zbigniew Jędrzejewski-Szmek2019-05-211-0/+6
|
* analyze: give a hint about calendar/timestamp/timespan useZbigniew Jędrzejewski-Szmek2019-05-211-6/+27
| | | | | This should help clear up the confusion in https://bugzilla.redhat.com/show_bug.cgi?id=1711065.
* analyze: add 'timestamp' verbZbigniew Jędrzejewski-Szmek2019-05-171-3/+47
| | | | | | | | | We had 'calendar' and 'timespan', but the third one was missing. Also consistently order the verbs as calendar/timestamp/timespan in help. The output from 'timespan' is highlighted more. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1711065.
* analyze: drop redundant call to calendar_spec_normalize()Zbigniew Jędrzejewski-Szmek2019-05-161-4/+0
| | | | calendar_spec_from_string() already does that.
* analyze: fix help messageYu Watanabe2019-05-151-2/+2
|
* Enable log colors for most of tools in /usr/binZbigniew Jędrzejewski-Szmek2019-05-081-0/+1
| | | | | | | | | | When emitting the calendarspec warning we want to see some color. Follow-up for 04220fda5c. Exceptions: - systemctl, because it has a lot hand-crafted coloring - tmpfiles, sysusers, stdio-bridge, etc, because they are also used in services and I'm not sure if this wouldn't mess up something.
* code style format: clang-format applied to src/a*/*Sebastian Jennen2019-04-123-89/+109
| | | | | | | [zj: this is a subset of changes generated by clang-format, just the ones I think improve readability or consistency.] This is a part of https://github.com/systemd/systemd/pull/11811.
* Merge pull request #12188 from poettering/coccinelle-fixletsYu Watanabe2019-04-021-4/+2
|\ | | | | tree-wide: let's run coccinelle again
| * analyze: use empty_or_root() where appropriateLennart Poettering2019-04-021-4/+2
| |
* | analyze: check for RestrictSUIDSGID= in "systemd-analyze security"Lennart Poettering2019-04-021-0/+12
|/ | | | | And let's give it a heigh weight, since it pretty much can be used for bad things only.
* analyze: check both possible mount points of tracefsLennart Poettering2019-03-291-3/+9
| | | | Let's try the new one first, the old one second.