CentOS 7.2のssコマンド
ssコマンドはバグと地雷の塊なのでnetstatの代わりにならない - ろば電子が詰まっている
Red Hat Enterprise Linux 7.1でもssコマンドは腐っているので使い物にならない - ろば電子が詰まっている
これはどういうお話かと言うと:
- RHEL 7からはnetstatコマンドなどが収録されているnet-toolsパッケージが非推奨となり、デフォルトではインストールすらされなくなりました。
- しかしnetstatコマンドの代替であるssコマンドはかなり雑な感じで、UDPポートを「tcp」と表示するひどいバグがあります
というお話でした。
CentOS7.2ではudpも表示されるようになっている。
$ cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) [vagrant@localhost ~]$ rpm -qa iproute iproute-3.10.0-54.el7.x86_64 [vagrant@localhost ~]$ ss -antu Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port udp UNCONN 0 0 *:28928 *:* udp UNCONN 0 0 *:68 *:* udp UNCONN 0 0 :::7859 :::* tcp LISTEN 0 128 127.0.0.1:2224 *:* tcp LISTEN 0 128 *:22 *:* tcp LISTEN 0 100 127.0.0.1:25 *:* tcp ESTAB 0 0 10.0.2.15:22 10.0.2.2:51206 tcp LISTEN 0 128 ::1:2224 :::* tcp LISTEN 0 128 :::22 :::* tcp LISTEN 0 100 ::1:25 :::*