You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
resolvectl: Add a way to show resolved's cache entries #14796
Is your feature request related to a problem? Please describe.
resolvectl doesn't seem to provide a command to show a list of discovered hosts on the local network (cache entries).
Describe the solution you'd like
Add a command to resolvectl that lists the entries in the resolved cache.
From a quick look at resolved's code, it seems we'd need to add a dbus call to retrieve the entries from resolved's cache which would take a few filtering options to allow filtering the output (just like the ResolveHostname dbus call). In the dbus call we'd simply iterate over the necessary dns scope caches and construct a response.
What I'm not so sure about is how we'd best expose this in resolvectl's CLI. Two possible options that I can see:
Add a table with cache entries to the status output produced by resolvectl's mdns, llmnr and dns commands.
Add a explicit command (resolvetctl discover (like avahi-discover), resolvectl dump, ...) that lists all entries from all caches and allow filtering with the existing -i, -p, -4, -6, ... options.
I'm leaning towards the second option because it provides greater flexibility but I would be fine with either one.
Any opinions? This seems doable to implement on my own so I can have a go at it but it would be great to know if something like this would be accepted.
Reacted by ಚಿರಾಗ್ ನಟರಾಜ್, kmille, Benedikt Radtke, icyrockcom, Hillar, Timothy Brush, Osqui LittleRiver, Laurenz, Ilya Palopezhentsev, Jan Pokorný and 2 more
Reacted by bug Lady, Timothy Brush and Ilya Palopezhentsev
Activity
yuwata commentedon Feb 5, 2020
I like the idea. Please implement that.
dimyme commentedon Oct 9, 2020
meanwhile (not sure about local entries), use
sudo killall -USR1 systemd-resolved # dump cache and keep going
the output will be redirected to journald in "cockpit" at
http://localhost:9090/system/logs#/?prio=debug&service=systemd-resolved.service&tag=systemd-resolved
q2dg commentedon Dec 11, 2021
I think this issue should be reopened until a final solution is achieved
resolved: add DumpCache varlink call for acquiring a complete dump of…
resolved: add DumpCache varlink call for acquiring a complete dump of…