From 7c22fbdb266bb70f535483a1fce0a683b1af4e39 Mon Sep 17 00:00:00 2001 From: Jose Castillo Date: Fri, 10 Nov 2023 15:21:38 +0000 Subject: [ebpf] Check for bpftool presence before running plugin The plugin was running even when the bpftool was not present, throwing an exception when it tried to parse a json output: INFO: [plugin:ebpf] Could not parse bpftool prog list as JSON: Expecting value: line 1 column 1 (char 0) It now checks if the program is present before running any command at all. Related: RH SUPDEV-151 Signed-off-by: Jose Castillo --- sos/report/plugins/ebpf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sos/report/plugins/ebpf.py b/sos/report/plugins/ebpf.py index 6c426933..61598d31 100644 --- a/sos/report/plugins/ebpf.py +++ b/sos/report/plugins/ebpf.py @@ -15,6 +15,7 @@ class Ebpf(Plugin, IndependentPlugin): short_desc = 'eBPF tool' plugin_name = 'ebpf' profiles = ('system', 'kernel', 'network') + commands = ('bpftool',) option_list = [ PluginOpt("namespaces", default=None, val_type=int, -- cgit