|
|
c33036 |
From a55680e6c8ac87fdf4ee3100717001c1f6f6a08b Mon Sep 17 00:00:00 2001
|
|
|
c33036 |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c33036 |
Date: Thu, 9 Aug 2018 08:59:53 +0200
|
|
|
c33036 |
Subject: [PATCH 1/3] [process] make lsof execution optional
|
|
|
c33036 |
|
|
|
c33036 |
Make calling of lsof command optional (but enabled by default).
|
|
|
c33036 |
|
|
|
c33036 |
Also remove "collect lsof-threads when --all-logs" as all-logs
|
|
|
c33036 |
has nothing in common.
|
|
|
c33036 |
|
|
|
c33036 |
Resolves: #1394
|
|
|
c33036 |
|
|
|
c33036 |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c33036 |
---
|
|
|
c33036 |
sos/plugins/process.py | 6 ++++--
|
|
|
c33036 |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
c33036 |
|
|
|
c33036 |
diff --git a/sos/plugins/process.py b/sos/plugins/process.py
|
|
|
c33036 |
index 755eec8d..d1c455a5 100644
|
|
|
c33036 |
--- a/sos/plugins/process.py
|
|
|
c33036 |
+++ b/sos/plugins/process.py
|
|
|
c33036 |
@@ -17,6 +17,7 @@ class Process(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
|
c33036 |
profiles = ('system',)
|
|
|
c33036 |
|
|
|
c33036 |
option_list = [
|
|
|
c33036 |
+ ("lsof", "gathers information on all open files", "slow", True),
|
|
|
c33036 |
("lsof-threads", "gathers threads' open file info if supported",
|
|
|
c33036 |
"slow", False)
|
|
|
c33036 |
]
|
|
|
c33036 |
@@ -35,9 +36,10 @@ class Process(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
|
c33036 |
|
|
|
c33036 |
self.add_cmd_output("ps auxwww", root_symlink="ps")
|
|
|
c33036 |
self.add_cmd_output("pstree", root_symlink="pstree")
|
|
|
c33036 |
- self.add_cmd_output("lsof -b +M -n -l -c ''", root_symlink="lsof")
|
|
|
c33036 |
+ if self.get_option("lsof"):
|
|
|
c33036 |
+ self.add_cmd_output("lsof -b +M -n -l -c ''", root_symlink="lsof")
|
|
|
c33036 |
|
|
|
c33036 |
- if self.get_option("lsof-threads") or self.get_option("all_logs"):
|
|
|
c33036 |
+ if self.get_option("lsof-threads"):
|
|
|
c33036 |
self.add_cmd_output("lsof -b +M -n -l")
|
|
|
c33036 |
|
|
|
c33036 |
self.add_cmd_output([
|
|
|
c33036 |
--
|
|
|
c33036 |
2.17.1
|
|
|
c33036 |
|
|
|
c33036 |
From 48a1a00685c680ba9fbd5c9b10377e8d0551a926 Mon Sep 17 00:00:00 2001
|
|
|
c33036 |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c33036 |
Date: Thu, 9 Aug 2018 18:11:38 +0200
|
|
|
c33036 |
Subject: [PATCH 2/3] [policies] RHOSP preset with -k process.lsof=off
|
|
|
c33036 |
|
|
|
c33036 |
Make lsof calls on OSP systems disabled by default.
|
|
|
c33036 |
|
|
|
c33036 |
Relevant to: #1395
|
|
|
c33036 |
|
|
|
c33036 |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c33036 |
---
|
|
|
c33036 |
sos/policies/redhat.py | 4 +++-
|
|
|
c33036 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
c33036 |
|
|
|
c33036 |
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
|
|
|
c33036 |
index cfbf7808..ee687d46 100644
|
|
|
c33036 |
--- a/sos/policies/redhat.py
|
|
|
c33036 |
+++ b/sos/policies/redhat.py
|
|
|
c33036 |
@@ -192,6 +192,8 @@ ENV_HOST_SYSROOT = 'HOST'
|
|
|
c33036 |
_opts_verify = SoSOptions(verify=True)
|
|
|
c33036 |
_opts_all_logs = SoSOptions(all_logs=True)
|
|
|
c33036 |
_opts_all_logs_verify = SoSOptions(all_logs=True, verify=True)
|
|
|
c33036 |
+_opts_all_logs_no_lsof = SoSOptions(all_logs=True,
|
|
|
c33036 |
+ plugopts=['process.lsof=off'])
|
|
|
c33036 |
|
|
|
c33036 |
RHEL_RELEASE_STR = "Red Hat Enterprise Linux"
|
|
|
c33036 |
|
|
|
c33036 |
@@ -219,7 +221,7 @@ rhel_presets = {
|
|
|
c33036 |
opts=_opts_verify),
|
|
|
c33036 |
RHEL: PresetDefaults(name=RHEL, desc=RHEL_DESC),
|
|
|
c33036 |
RHOSP: PresetDefaults(name=RHOSP, desc=RHOSP_DESC, note=NOTE_SIZE,
|
|
|
c33036 |
- opts=_opts_all_logs),
|
|
|
c33036 |
+ opts=_opts_all_logs_no_lsof),
|
|
|
c33036 |
RHOCP: PresetDefaults(name=RHOCP, desc=RHOCP_DESC, note=NOTE_SIZE_TIME,
|
|
|
c33036 |
opts=_opts_all_logs_verify),
|
|
|
c33036 |
RH_SATELLITE: PresetDefaults(name=RH_SATELLITE, desc=RH_SATELLITE_DESC,
|
|
|
c33036 |
--
|
|
|
c33036 |
2.17.1
|
|
|
c33036 |
|
|
|
c33036 |
From 84c30742254a536f70bb4217756416bcf0e8a51b Mon Sep 17 00:00:00 2001
|
|
|
c33036 |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c33036 |
Date: Thu, 9 Aug 2018 18:14:56 +0200
|
|
|
c33036 |
Subject: [PATCH 3/3] [policies] enable RHOSP preset by presence of
|
|
|
c33036 |
rhosp-release package
|
|
|
c33036 |
|
|
|
c33036 |
Resolves: #1395
|
|
|
c33036 |
|
|
|
c33036 |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c33036 |
---
|
|
|
c33036 |
sos/policies/redhat.py | 2 ++
|
|
|
c33036 |
1 file changed, 2 insertions(+)
|
|
|
c33036 |
|
|
|
c33036 |
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
|
|
|
c33036 |
index ee687d46..5bfbade2 100644
|
|
|
c33036 |
--- a/sos/policies/redhat.py
|
|
|
c33036 |
+++ b/sos/policies/redhat.py
|
|
|
c33036 |
@@ -315,6 +315,8 @@ No changes will be made to system configuration.
|
|
|
c33036 |
# Package based checks
|
|
|
c33036 |
if self.pkg_by_name("satellite-common") is not None:
|
|
|
c33036 |
return self.find_preset(RH_SATELLITE)
|
|
|
c33036 |
+ if self.pkg_by_name("rhosp-release") is not None:
|
|
|
c33036 |
+ return self.find_preset(RHOSP)
|
|
|
c33036 |
|
|
|
c33036 |
# Vanilla RHEL is default
|
|
|
c33036 |
return self.find_preset(RHEL)
|
|
|
c33036 |
--
|
|
|
c33036 |
2.17.1
|
|
|
c33036 |
|