Monitor services shell script

The script to monitor services here is really great but does not listen on tcp6 port

line approx 80 need to be changed as follow with -A inet6 and double rev pipe plus field f1

RPORTS=$($NETSTAT -tulpn -A inet -A inet6 | grep -vE '^Active|Proto' | grep 'LISTEN' | awk '{ print $4}' | rev | cut -d: -f1 | rev | sed '/^$/d' | sort  -u
1 Like

Fixed. Thanks for the feedback.

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki