The following sums up all connections (ESTABLISHED, TIME_WAIT, FIN_WAIT, etc.) and sorts it:
netstat -n | awk ' $5 ~ /^[0-9]/ {print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)
Works on FreeBSD and Linux.