The `ss' tool from iproute-2.6.39-6.fc16.x86_64 has option `-a' to list sockets of all types. However it lists TCP sockets only: root@dhcp-0-146:~ # ss -ulnp | wc -l 28 root@dhcp-0-146:~ # ss -tlnp | wc -l 22 root@dhcp-0-146:~ # ss -alnp | wc -l 22
I just hit this one too :( $ ss -lan |grep 500 $ ss -lun |grep 500 UNCONN 0 0 76.10.157.69:500 *:* UNCONN 0 0 76.10.157.69:4500 *:*
The above was on Fedora with 3.6.0-2 On rhel with 2.6.32 it is worse: [root@nohats ~]# ss -a -l -n sport = :500 Recv-Q Send-Q Local Address:Port Peer Address:Port [root@nohats ~]# ss -u -l -n sport = :500 Recv-Q Send-Q Local Address:Port Peer Address:Port [root@nohats ~]# netstat -an |grep :500 udp 0 0 127.0.0.1:500 0.0.0.0:* udp 0 0 193.110.157.102:500 0.0.0.0:* udp 0 0 193.110.157.104:500 0.0.0.0:* udp 0 0 ::1:500 :::* udp 0 0 2a03:6000:1004:1::102:500 :::* udp 0 0 2001:888:2003:1004::102:500 :::* udp 0 0 2a03:6000:1004:1::104:500 :::*
case 'a': current_filter.states = SS_ALL; break; case 'l': current_filter.states = (1<<SS_LISTEN) | (1<<SS_CLOSE); break; (09:48:36 PM) misc: and the default filter is defined at the start of the code : (09:48:37 PM) misc: struct filter default_filter = { .dbs = (1<<TCP_DB), (09:48:44 PM) misc: and this is TCP (09:54:50 PM) misc: in fact, ss -a do not show udp socket on my old server either (09:55:15 PM) misc: and git log do not show change on that part ( at least, not a obvious change )
(In reply to comment #2) > The above was on Fedora with 3.6.0-2 > On rhel with 2.6.32 it is worse: > > [root@nohats ~]# ss -a -l -n sport = :500 > Recv-Q Send-Q Local Address:Port > Peer Address:Port > [root@nohats ~]# ss -u -l -n sport = :500 > Recv-Q Send-Q Local Address:Port > Peer Address:Port > [root@nohats ~]# netstat -an |grep :500 > udp 0 0 127.0.0.1:500 0.0.0.0:* > > udp 0 0 193.110.157.102:500 0.0.0.0:* > > udp 0 0 193.110.157.104:500 0.0.0.0:* > > udp 0 0 ::1:500 :::* > > udp 0 0 2a03:6000:1004:1::102:500 :::* > > udp 0 0 2001:888:2003:1004::102:500 :::* > > udp 0 0 2a03:6000:1004:1::104:500 :::* This is fixed in 2.6.32-21.el6 (bug #811219).
The current behavior, although different from netstat, is in line with ss documentation which just says 'all' lists both listening and non-listening sockets. The socket type defaults to TCP in ss, as pointed out in comment #3. I understand users expect netstat's behavior here, as ss is more or less its replacement.
Created attachment 661551 [details] ss - change default filter to include all socket types Submitted upstream.
iproute-3.6.0-4.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/iproute-3.6.0-4.fc18
iproute-3.3.0-3.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/iproute-3.3.0-3.fc17
iproute-2.6.39-7.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/iproute-2.6.39-7.fc16
Package iproute-3.6.0-4.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing iproute-3.6.0-4.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-20265/iproute-3.6.0-4.fc18 then log in and leave karma (feedback).
iproute-3.6.0-5.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/iproute-3.6.0-5.fc18
iproute-3.3.0-5.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/iproute-3.3.0-5.fc17
iproute-2.6.39-8.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/iproute-2.6.39-8.fc16
iproute-3.3.0-5.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
iproute-2.6.39-8.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
iproute-3.6.0-5.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.