diff options
author | Franck Bui <fbui@suse.com> | 2022-09-13 16:13:16 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-13 00:47:42 +0200 |
commit | d1d8786c5b4493cc0f9836b1976f2cd41bfb461c (patch) | |
tree | df19253c23a7db5a219e03d6abf5cc0501632fbb /shell-completion/bash | |
parent | Merge pull request #24625 from yuwata/dissect-image-open-and-lock-decrypted (diff) | |
download | systemd-d1d8786c5b4493cc0f9836b1976f2cd41bfb461c.tar.xz systemd-d1d8786c5b4493cc0f9836b1976f2cd41bfb461c.zip |
analyze: extend the dump command to accept patterns
The new function DumpPatterns() can be used to limit (drastically) the size of
the data returned by PID1. Hence the optimization of serializing data into a
file descriptor should be less relevant than having the possibility to limit
the data when communicating with the service manager remotely.
NB: when passing patterns, the dump command omits the version of the manager as
well as the features and the timestamps.
Diffstat (limited to 'shell-completion/bash')
-rw-r--r-- | shell-completion/bash/systemd-analyze | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze index 9fe984d87c..fe2c1d122c 100644 --- a/shell-completion/bash/systemd-analyze +++ b/shell-completion/bash/systemd-analyze @@ -60,9 +60,10 @@ _systemd_analyze() { ) local -A VERBS=( - [STANDALONE]='time blame plot dump unit-paths exit-status calendar timestamp timespan' + [STANDALONE]='time blame plot unit-paths exit-status calendar timestamp timespan' [CRITICAL_CHAIN]='critical-chain' [DOT]='dot' + [DUMP]='dump' [VERIFY]='verify' [SECCOMP_FILTER]='syscall-filter' [CAT_CONFIG]='cat-config' @@ -125,6 +126,13 @@ _systemd_analyze() { comps='--help --version --system --user --global --from-pattern --to-pattern --order --require' fi + elif __contains_word "$verb" ${VERBS[DUMP]}; then + if [[ $cur = -* ]]; then + comps='--help --version --system --user --no-pager' + else + comps=$( __get_units_all ) + fi + elif __contains_word "$verb" ${VERBS[SECCOMP_FILTER]}; then if [[ $cur = -* ]]; then comps='--help --version --no-pager' |