aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2016-02-10 16:48:21 +0000
committerBryn M. Reeves <bmr@redhat.com>2016-02-10 16:48:21 +0000
commitaa7fd5739f528cd9534fb4d86daff0e7c0e9bd06 (patch)
tree7afacb06badff252bad27834ba0049726864f4b2
parent606dcbc7d1cc203487ae9e773fe7173aa1966f2c (diff)
downloadsos-aa7fd5739f528cd9534fb4d86daff0e7c0e9bd06.tar.gz
[networking] use -W for netstat -agn
The 'netstat -agn' command reports IPv4 and IPv6 group addresses which may also be truncated - apply the -W/-T switch to this command as well. Related: #734. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/networking.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py
index 8db28d59..647e4aee 100644
--- a/sos/plugins/networking.py
+++ b/sos/plugins/networking.py
@@ -23,8 +23,10 @@ class Networking(Plugin):
plugin_name = "networking"
profiles = ('network', 'hardware', 'system')
trace_host = "www.example.com"
- option_list = [("traceroute", "collects a traceroute to %s" % trace_host,
- "slow", False)]
+ option_list = [(
+ ("traceroute", "collect a traceroute to %s" % trace_host, "slow",
+ False)
+ )]
# switch to enable netstat "wide" (non-truncated) output mode
ns_wide = "-W"
@@ -150,7 +152,7 @@ class Networking(Plugin):
self.add_cmd_output([
"netstat -s",
- "netstat -agn",
+ "netstat %s -agn" % self.ns_wide,
"ip route show table all",
"ip -6 route show table all",
"ip -4 rule",
@@ -312,7 +314,9 @@ class RedHatNetworking(Networking, RedHatPlugin):
if int(netstat_pkg['version'][0]) < 2:
self.ns_wide = "-T"
except:
- pass # default to upstream option
+ # default to upstream option
+ pass
+
super(RedHatNetworking, self).setup()