diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2019-09-26 10:50:18 +0200 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-10-01 14:25:54 +0100 |
commit | d2d5b9da6d4af7ead8a47468db0bbfcc8fb2b5bf (patch) | |
tree | 00321c36bce08b13564062c5604f22161cd65dff | |
parent | 55949fb88c492eec542c69157a8763ddb3555345 (diff) | |
download | sos-d2d5b9da6d4af7ead8a47468db0bbfcc8fb2b5bf.tar.gz |
[kernel] Don't collect trace file by default
Updates the plugin to don't collect trace file by default. Collecting
trace file may take a lot of time, so trace file is not collected
by default, and use the new plug-in option when collecting.
Original author: MIZUTA Takeshi <mizuta.takeshi@fujitsu.com>
Closes: #1688
Resolves: #1800
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/kernel.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py index bf3c3dea..b498f55e 100644 --- a/sos/plugins/kernel.py +++ b/sos/plugins/kernel.py @@ -23,7 +23,8 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): sys_module = '/sys/module' option_list = [ - ("with-timer", "gather /proc/timer* statistics", "slow", False) + ("with-timer", "gather /proc/timer* statistics", "slow", False), + ("trace", "gather /sys/kernel/debug/tracing/trace file", "slow", False) ] def get_bpftool_prog_ids(self, prog_file): @@ -138,6 +139,9 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): # and may also cause softlockups self.add_copy_spec("/proc/timer*") + if not self.get_option("trace"): + self.add_forbidden_path("/sys/kernel/debug/tracing/trace") + # collect list of bpf program attachments in the kernel # networking subsystem self.add_cmd_output("bpftool net list") |