From d1d8786c5b4493cc0f9836b1976f2cd41bfb461c Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 13 Sep 2022 16:13:16 +0200 Subject: 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. --- man/org.freedesktop.systemd1.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'man/org.freedesktop.systemd1.xml') diff --git a/man/org.freedesktop.systemd1.xml b/man/org.freedesktop.systemd1.xml index 6127541f8b..9fb215a136 100644 --- a/man/org.freedesktop.systemd1.xml +++ b/man/org.freedesktop.systemd1.xml @@ -162,6 +162,8 @@ node /org/freedesktop/systemd1 { Subscribe(); Unsubscribe(); Dump(out s output); + DumpPatterns(in as patterns, + out s output); DumpByFileDescriptor(out h fd); Reload(); @org.freedesktop.DBus.Method.NoReply("true") @@ -868,6 +870,8 @@ node /org/freedesktop/systemd1 { + + @@ -1338,7 +1342,9 @@ node /org/freedesktop/systemd1 { string guaranteed, and new fields may be added any time, and old fields removed. The general structure may be rearranged drastically between releases. This is exposed by systemd-analyze1's - dump command. The DumpByFileDescriptor() method is identical to + dump command. Similarly, DumpPatterns() returns the internal + state of units whose names match the glob expressions specified in the patterns + argument. The DumpByFileDescriptor() method is identical to Dump() but returns the data serialized into a file descriptor (the client should read the text data from it until hitting EOF). Given the size limits on D-Bus messages and the possibly large size of the returned string, DumpByFileDescriptor() is usually the -- cgit v1.2.1