summaryrefslogtreecommitdiffstats
path: root/src/analyze/analyze-dump.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* analyze: add 'malloc' verb to dump malloc_info()Luca Boccassi2023-02-231-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Gets the memory state of the manager: root@image:~# systemd-analyze malloc <malloc version=1> <heap nr=0> <sizes> <size from=33 to=33 total=396 count=12/> <unsorted from=20385 to=20385 total=20385 count=1/> </sizes> <total type=fast count=0 size=0/> <total type=rest count=14 size=36589/> <system type=current size=1691648/> <system type=max size=1839104/> <aspace type=total size=1691648/> <aspace type=mprotect size=1691648/> </heap> <total type=fast count=0 size=0/> <total type=rest count=14 size=36589/> <total type=mmap count=0 size=0/> <system type=current size=1691648/> <system type=max size=1839104/> <aspace type=total size=1691648/> <aspace type=mprotect size=1691648/> </malloc>
* analyze: use DumpUnitsMatchingPatternsByFileDescriptorZbigniew Jędrzejewski-Szmek2022-10-181-41/+90
| | | | | | | | | | | | | | | | Similarly to DumpByFileDescriptor vs Dump, DumpUnitsMatchingPatternsByFileDescriptor is used in preference. Dissimilarly, a fallback to DumpUnitsMatchingPatterns is not done on error, because there is no need for backwards compatibility. The code is still more verbose than I'd like, but there are four different code paths with slightly different rules in each case, so it's hard to make this all very brief. Since we have a separate file dedicated to making those calls, the verbose-but-easy-to-follow implementation should be OK. Closes #24989. I only did a quick test that all both variants works locally and over ssh.
* manager: rename dbus methodZbigniew Jędrzejewski-Szmek2022-10-141-2/+2
| | | | Fixes #24989.
* analyze: extend the dump command to accept patternsFranck Bui2022-10-131-0/+43
| | | | | | | | | | 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.
* analyze: allow verbs to return positive failureZbigniew Jędrzejewski-Szmek2022-05-191-1/+5
| | | | | | | | | No functional change is intended. The verbs where it wasn't immediately clear if the success exit status is 0 or >= 0 are changed to explicitly return 0. (I think it's better to be explicit than to rely on some call stack always returning 0 on success.) Some other functions are cleaned up to be more idiomatic.
* analyze: systematically name verb entry point functions verb_xyz()Lennart Poettering2022-02-211-1/+1
| | | | | | Some of the functions so far were named do_xyz(), others dump_xyz() and even others test_xyz(). let's instead name them exactly like the verb exposed in the command line, just prefixed with verb_
* analyze: split out "dump" verbLennart Poettering2022-02-211-0/+64