Current location - Quotes Website - Team slogan - How does aix system host monitor port connectivity?
How does aix system host monitor port connectivity?
To maintain the system or check an unknown port, it is natural to find out which process is listening to this port.

Windows can use the command netstat -ano to check the pid of the process corresponding to the port.

Aix can't. Aix needs to use the following command procedure:

pekax 2 18:/& gt; Netstat-na | more

Active Internet connection (including server)

Proto Recv-Q Send-Q local address external address (state)

tcp4 0 0 *. 13 *。 * Listen

tcp 0 0 *.2 1 *。 * Listen

tcp4 0 0 *.22 *。 * Listen

tcp 0 0 *.23 *。 * Listen

tcp4 0 0 *.25 *。 * Listen

tcp4 0 0 *.37 *。 * Listen

tcp4 0 0 *. 1 1 1 *。 * Listen

tcp4 0 0 *. 199 *。 * Listen

tcp 0 0 *.5 12 *。 * Listen

tcp 0 0 *.5 13 *。 * Listen

tcp 0 0 *.5 14 *。 * Listen

tcp4 0 0 *.657 *。 * Listen

tcp4 0 0 *. 1334 *。 * Listen

tcp4 0 0 *. 152 1 *。 * Listen

...

For example, find out which process is listening on port 1334.

pekax 2 18:/& gt; netstat -Aan|grep 1334

f 10002000043 c 398 TCP 4 0 0 * . 1334 *。 * Listen

pekax 2 18:/& gt; RM sock f 10002000043 c 398 tcpcb

Socket 0x43c008 is being used by process 2 17248 (writesrv).

pekax 2 18:/& gt; ps -ef|grep 2 17248

Root2 1 7248159882018: 00 /usr/sbin/writesrv.