Skip to content

Commit

Permalink
[networking] Capture more networking commands
Browse files Browse the repository at this point in the history
Capture more ethtool, ss, and netstat command
outputs.

Related: sosreport#3708

Signed-off-by: Jose Castillo <[email protected]>
  • Loading branch information
jcastill committed Jan 23, 2025
1 parent 3cfc75c commit 4f0b44a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sos/report/plugins/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def setup(self):
self.add_cmd_output([
"nstat -zas",
"netstat -s",
"netstat -s -6",
f"netstat {self.ns_wide} -agn",
"networkctl status -a",
"ip -6 route show table all",
Expand Down Expand Up @@ -196,6 +197,8 @@ def collect_ss_ip_ethtool_info(self):
required={'kmods': 'all'})
self.add_cmd_output(ss_cmd, pred=ss_pred, changes=True)

ss_stats_cmd = "ss -s"
self.add_cmd_output(ss_stats_cmd, pred=ss_pred, changes=True)
# Get ethtool output for every device that does not exist in a
# namespace.
_ecmds = [f"ethtool -{opt}" for opt in self.ethtool_shortopts]
Expand All @@ -208,6 +211,8 @@ def collect_ss_ip_ethtool_info(self):
"ethtool --phy-statistics %(dev)s",
"ethtool --show-priv-flags %(dev)s",
"ethtool --show-eee %(dev)s",
"ethtool --show-fec %(dev)s",
"ethtool --show-ntuple %(dev)",
"tc -s filter show dev %(dev)s",
"tc -s filter show dev %(dev)s ingress",
], devices="ethernet")
Expand Down

0 comments on commit 4f0b44a

Please sign in to comment.