www.cendio.com

Bug 5982

Summary: netstat is deprecated so we should stop using it
Product: ThinLinc Reporter: Pierre Ossman <ossman@cendio.se>
Component: VSM AgentAssignee: Karl Mikaelsson <derfian@cendio.se>
Status: CLOSED FIXED QA Contact: Bugzilla mail exporter <bugzilla-qa@cendio.se>
Severity: Normal    
Priority: P2 CC: astrand@cendio.se
Version: 1.3.1Keywords: ossman_tester, relnotes
Target Milestone: 4.8.0   
Hardware: PC   
OS: Unknown   
Acceptance Criteria:

Description From cendio 2016-09-09 11:32:11
From netstat's man page:

       This  program  is  mostly  obsolete.   Replacement  for  netstat is ss.
       Replacement for netstat -r is ip route.  Replacement for netstat -i  is
       ip -s link.  Replacement for netstat -g is ip maddr.

Perhaps we should just avoid external commands and dig around in /proc
ourselves.
------- Comment #1 From cendio 2016-09-12 11:30:10 -------
Backwards compat note: RHEL5 has both ss and ip.
------- Comment #2 From cendio 2017-01-09 15:57:53 -------
Also note bug 6125 where the performance of this command can be a problem.
------- Comment #3 From cendio 2017-01-11 16:12:42 -------
Facebook has written a Python lib for using Netlink, if we want to avoid
dealing with subprocesses:

https://github.com/facebook/gnlpy
------- Comment #4 From cendio 2017-01-11 16:13:22 -------
(In reply to comment #0)
> 
> Perhaps we should just avoid external commands and dig around in /proc
> ourselves.

As noted on bug 6125, /proc is slow and should be avoided.
------- Comment #5 From cendio 2017-01-30 14:07:40 -------
(In reply to comment #3)
> Facebook has written a Python lib for using Netlink, if we want to avoid
> dealing with subprocesses:
> 
> https://github.com/facebook/gnlpy

Requires at least Python 2.6 judging from the __future__ imports.
------- Comment #6 From cendio 2017-02-06 10:28:09 -------
Solved by solving bug 6125.
------- Comment #7 From cendio 2017-02-08 14:30:50 -------
Basis function verified on:

 - Fedora 25
 - RHEL 6
 - RHEL 5
 - Ubuntu 16.04
 - SLES 12

tl-setup works well:

> 2017-02-06 15:07:44,224: 'ss' not found

Tested package names on:

 - RHEL 6
 - Ubuntu 16.04
 - SLES 12

checkenvironment:

> Starting ThinLinc vsmagent
> ss is missing.