www.cendio.com
Bug 5982 - netstat is deprecated so we should stop using it
: netstat is deprecated so we should stop using it
Status: CLOSED FIXED
: ThinLinc
VSM Agent
: 1.3.1
: PC Unknown
: P2 Normal
: 4.8.0
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2016-09-09 11:32 by
Modified: 2017-03-20 17:09 (History)
Acceptance Criteria:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


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.