summaryrefslogtreecommitdiff
path: root/src/analyze
Commit message (Collapse)AuthorAgeFilesLines
* verify: ignore nonexistent executables if requiredGiedrius Statkevičius2020-04-143-1/+25
| | | | | | | | | | | | | | We provide a way via the '-' symbol to ignore errors when nonexistent executable files are passed to Exec* parameters & so on. In such a case, the flag `EXEC_COMMAND_IGNORE_FAILURE` is set and we go on happily with our life if that happens. However, `systemd-analyze verify` complained about missing executables even in such a case. In such a case it is not an error for this to happen so check if the flag is set before checking if the file is accessible and executable. Add some small tests to check this condition. Closes #15218.
* analyze: fix table time outputHaochen Tong2020-03-091-10/+10
|
* systemd: Fix busctl crash on aarch64 when setting output table formatAlin Popa2020-02-162-3/+3
| | | | | | | | The enum used for column names is integer type while table_set_display() is parsing arguments on size_t alignment which may result in assert in table_set_display() if the size between types missmatch. This patch cast the enums to size_t. It also fixes all other occurences for table_set_display() and table_set_sort().
* analyze: Add ProtectClock= to analyze-securityKevin Kuehler2020-01-261-0/+16
|
* typo: "May modify to" -> "May modify"Wieland Hoffmann2020-01-181-1/+1
|
* Merge pull request #14547 from keszybz/networkctl-matchingYu Watanabe2020-01-151-4/+4
|\ | | | | networkctl: return error or warning when interfaces are not matched
| * basic/strv: drop flags argument from strv_fnmatch()Zbigniew Jędrzejewski-Szmek2020-01-141-4/+4
| |
* | analyze: optimize table creation by using table_add_many()Yu Watanabe2020-01-102-140/+82
|/
* analyze: badness if neither of RootImage and RootDirectory existsTopi Miettinen2019-12-181-1/+1
| | | | | Instead of requiring both RootImage and RootDirectory directives, give badness points if neither is present. Fixes conversion in d737b451f.
* 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-041-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-111-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-161-15/+69
| |
* | analyze: format output of 'systemd-analyze timespan' by using TableYu Watanabe2019-07-161-8/+54
| |
* | analyze: format output of 'systemd-analyze calendar' by using TableYu Watanabe2019-07-161-20/+93
| |
* | analyze: format output of 'systemd-analyze blame' by using TableYu Watanabe2019-07-161-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.