Bug 5982 - netstat is deprecated so we should stop using it
Summary: netstat is deprecated so we should stop using it
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Agent (show other bugs)
Version: 1.3.1
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.8.0
Assignee: Karl Mikaelsson
URL:
Keywords: ossman_tester, relnotes
Depends on:
Blocks:
 
Reported: 2016-09-09 11:32 CEST by Pierre Ossman
Modified: 2017-03-20 17:09 CET (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2016-09-09 11:32:11 CEST
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 Karl Mikaelsson cendio 2016-09-12 11:30:10 CEST
Backwards compat note: RHEL5 has both ss and ip.
Comment 2 Pierre Ossman cendio 2017-01-09 15:57:53 CET
Also note bug 6125 where the performance of this command can be a problem.
Comment 3 Pierre Ossman cendio 2017-01-11 16:12:42 CET
Facebook has written a Python lib for using Netlink, if we want to avoid dealing with subprocesses:

https://github.com/facebook/gnlpy
Comment 4 Pierre Ossman cendio 2017-01-11 16:13:22 CET
(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 Karl Mikaelsson cendio 2017-01-30 14:07:40 CET
(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 Karl Mikaelsson cendio 2017-02-06 10:28:09 CET
Solved by solving bug 6125.
Comment 7 Pierre Ossman cendio 2017-02-08 14:30:50 CET
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.

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