From 2f0b286a44241cd943c894061a76c63056e2846a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Fern=C3=A1ndez=20Rodr=C3=ADguez?= Date: Wed, 20 Nov 2024 12:18:56 +0100 Subject: [PATCH] [system] List env_var names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: #3794 Signed-off-by: Pablo Fernández Rodríguez Signed-off-by: Pavel Moravec --- sos/report/plugins/system.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sos/report/plugins/system.py b/sos/report/plugins/system.py index fcba116162..33fbd5a6a2 100644 --- a/sos/report/plugins/system.py +++ b/sos/report/plugins/system.py @@ -6,6 +6,7 @@ # # See the LICENSE file in the source distribution for further information. +import os from sos.report.plugins import Plugin, IndependentPlugin @@ -40,6 +41,12 @@ def setup(self): "ld.so --list-tunables" ]) + var_names = list(os.environ.keys()) + var_names.sort() + self.add_string_as_file('\n'.join(var_names), + "environment_varnames", + plug_dir=True) + def postproc(self): self.do_paths_http_sub([ "/etc/sysconfig",