Skip to content

Optimise and extend the port command.

Anton Shepelev requested to merge ant/modules:ant-master-patch-50763 into master
  1. greatly improved the efficiency of the the -u and -a modes, by gathering port state once instead of invoking netstat for each port (O(n^2)).
  2. reduced code duplication.
  3. added new command -f to pick a random free port.
  4. improved the -s command so that report port state in exit as well, and also print the user cgroup postfix.
  5. migrated from 'netstat' (obsolete according to the man page) to 'ss'.
  6. 'ss' output is handled by 'awk' as better suitable for tabular format.

Merge request reports

Loading