aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2022-06-14 11:47:58 -0400
committerJake Hunsaker <jhunsake@redhat.com>2022-06-15 11:37:31 -0400
commitcbdd83b7ef984768aaf3a9a2c661b28d32f01aa2 (patch)
treebe5908220ea41d0427ee7810eeee1a7bc61f7477
parentb32647fb781a56b12b51fe92786baea3eec320d8 (diff)
downloadsos-cbdd83b7ef984768aaf3a9a2c661b28d32f01aa2.tar.gz
[host] Add collection of "top-level" symlinks and their targets
Adds collection of a `find` command that shows symlinks from /, or one subdirectory below, that lists all symlinks and their targets in `ls` output format. This is by request from a RH support team for situations where problematic systems have directories underneathe / that are solely symlinks, and this information is relevant to problem investigation. While the `host` plugin may not be the most intuitive place for this collection, there are no other existing plugins that would be "more correct", and adding a new "symlinks" plugin would likely only serve to confuse authors and maintainers going forward. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/host.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/sos/report/plugins/host.py b/sos/report/plugins/host.py
index 95a3b9cd..18be53d4 100644
--- a/sos/report/plugins/host.py
+++ b/sos/report/plugins/host.py
@@ -12,6 +12,14 @@ from sos.report.plugins import Plugin, IndependentPlugin
class Host(Plugin, IndependentPlugin):
+ """This plugin primarily collects hostname related information, as well
+ as a few collections that do not fit well in other plugins. For example,
+ uptime information and SoS configuration data from /etc/sos.
+
+ This plugin is not intended to be a catch-all "general" plugin however for
+ these types of collections that do not have a specific component/package
+ or pre-existing plugin.
+ """
short_desc = 'Host information'
@@ -25,6 +33,9 @@ class Host(Plugin, IndependentPlugin):
self.add_cmd_output('hostname', root_symlink='hostname')
self.add_cmd_output('uptime', root_symlink='uptime')
+ self.add_cmd_output('find / -maxdepth 2 -type l -ls',
+ root_symlink='root-symlinks')
+
self.add_cmd_output([
'hostname -f',
'hostid',