Problem

掲題の通り。netstat なのはわかるんですけど、引数がわからないのです。
まぁRHELだけの話ではないですけど。

Solution

こんな感じ。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$ netstat -tanp | grep LISTEN
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 30587/vino-server
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 31497/vino-server
tcp 0 0 0.0.0.0:5902 0.0.0.0:* LISTEN 30335/Xvnc
tcp 0 0 0.0.0.0:5903 0.0.0.0:* LISTEN 31265/Xvnc
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:6002 0.0.0.0:* LISTEN 30335/Xvnc
tcp 0 0 0.0.0.0:6003 0.0.0.0:* LISTEN 31265/Xvnc
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
tcp6 0 0 :::5900 :::* LISTEN 30587/vino-server
tcp6 0 0 :::5901 :::* LISTEN 31497/vino-server
tcp6 0 0 :::5902 :::* LISTEN 30335/Xvnc
tcp6 0 0 :::5903 :::* LISTEN 31265/Xvnc
tcp6 0 0 :::111 :::* LISTEN -
tcp6 0 0 :::6002 :::* LISTEN 30335/Xvnc
tcp6 0 0 :::6003 :::* LISTEN 31265/Xvnc
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 ::1:631 :::* LISTEN -
tcp6 0 0 ::1:25 :::* LISTEN -
tcp6 20 0 :::2375 :::* LISTEN -
tcp6 0 0 :::9000 :::* LISTEN -