Blob Blame History Raw
From 575ddeddf2f6e1d6a639922f9ccc51c7e46fbe12 Mon Sep 17 00:00:00 2001
From: Seiichi Ikarashi <s.ikarashi@jp.fujitsu.com>
Date: Fri, 14 May 2021 09:49:33 +0900
Subject: [PATCH] [networking] Add nstat command support

As netstat command is being deprecated,
we need nstat as an alternative to "netstat -s".

Signed-off-by: Seiichi Ikarashi <s.ikarashi@fujitsu.com>
---
 sos/report/plugins/networking.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sos/report/plugins/networking.py b/sos/report/plugins/networking.py
index 8b4614bb..acfa027f 100644
--- a/sos/report/plugins/networking.py
+++ b/sos/report/plugins/networking.py
@@ -87,6 +87,7 @@ class Networking(Plugin):
                             root_symlink="netstat")
 
         self.add_cmd_output([
+            "nstat -zas",
             "netstat -s",
             "netstat %s -agn" % self.ns_wide,
             "ip route show table all",
@@ -198,6 +199,7 @@ class Networking(Plugin):
                 ns_cmd_prefix + "netstat %s -neopa" % self.ns_wide,
                 ns_cmd_prefix + "netstat -s",
                 ns_cmd_prefix + "netstat %s -agn" % self.ns_wide,
+                ns_cmd_prefix + "nstat -zas",
             ])
 
             ss_cmd = ns_cmd_prefix + "ss -peaonmi"
-- 
2.26.3