From 34c77d6902ee1df403dc3836b4092d413fb95350 Mon Sep 17 00:00:00 2001 From: suresh2514 Date: Fri, 14 Aug 2020 22:59:34 +0530 Subject: [PATCH] [networking] remove 'ethtool -e' option for bnx2x NICs Running EEPROM dump (ethtool -e) can result in bnx2x driver NICs to pause for few seconds and is not recommended in production environment. Resolves: #2188 Resolves: #2200 Signed-off-by: suresh2514 Signed-off-by: Jake Hunsaker --- sos/plugins/networking.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py index ba9c0fb11..397549a56 100644 --- a/sos/plugins/networking.py +++ b/sos/plugins/networking.py @@ -182,7 +182,6 @@ def setup(self): "ethtool -a " + eth, "ethtool -c " + eth, "ethtool -g " + eth, - "ethtool -e " + eth, "ethtool -P " + eth, "ethtool -l " + eth, "ethtool --phy-statistics " + eth, @@ -189,6 +189,17 @@ class Networking(Plugin): "ethtool --show-eee " + eth ]) + # skip EEPROM collection for 'bnx2x' NICs as this command + # can pause the NIC and is not production safe. + bnx_output = { + "cmd": "ethtool -i %s" % eth, + "output": "bnx2x" + } + bnx_pred = SoSPredicate(self, + cmd_outputs=bnx_output, + required={'cmd_outputs': 'none'}) + self.add_cmd_output("ethtool -e %s" % eth, pred=bnx_pred) + # Collect information about bridges (some data already collected via # "ip .." commands) self.add_cmd_output([