i4是查询ipv4端口
[wei@vm-cbu-qa-168-13 web-deploy]$ lsof -Pnl +M -i4 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME portmap 1616 32 3u IPv4 3488 UDP *:111[portmapper] portmap 1616 32 4u IPv4 3489 TCP *:111[portmapper] (LISTEN) DragoonAg 4153 0 6u IPv4 28872832 TCP 10.20.168.13:54978->10.20.149.114:13888 (ESTABLISHED) DragoonAg 4153 0 8u IPv4 28872826 TCP 127.0.0.1:15777 (LISTEN) DragoonAg 4153 0 10u IPv4 28872828 TCP 127.0.0.1:15778 (LISTEN) DragoonAg 4153 0 12u IPv4 28872836 UDP 10.20.168.13:13777->10.20.149.114:60569 DragoonAg 4153 0 13u IPv4 86898035 TCP 10.20.168.13:38027->10.20.159.108:15888 (ESTABLISHED) DragoonAg 4153 0 15u IPv4 86648332 TCP 127.0.0.1:15777->127.0.0.1:41653 (ESTABLISHED) python 10488 0 4u IPv4 292127 TCP 10.20.168.13:8022 (LISTEN) java 15239 710 5u IPv4 86647757 TCP *:4208 (LISTEN) java 15239 710 15u IPv4 86647829 TCP *:35485 (LISTEN) java 15239 710 18u IPv4 86647831 TCP *:4207 (LISTEN) java 15239 710 20u IPv4 86647833 TCP *:42483 (LISTEN) java 15239 710 22u IPv4 87286934 TCP 10.20.168.13:44190->110.75.194.17:80 (CLOSE_WAIT) java 15239 710 246u IPv4 86648330 TCP 127.0.0.1:41653->127.0.0.1:15777 (ESTABLISHED) java 15239 710 253u IPv4 86648976 TCP *:4110 (LISTEN) java 15239 710 255u IPv4 87010313 TCP 10.20.168.13:4110->10.20.172.31:38036 [wei@vm-cbu-qa-168-13 web-deploy]$ lsof -Pnl +M -i6 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME cfservd 5513 0 4u IPv6 17813 TCP *:5308 (LISTEN) java 13334 0 64u IPv6 85851503 TCP 10.20.168.13:46591->10.20.145.12:57126 (ESTABLISHED) java 13334 0 65u IPv6 86276005 TCP 10.20.168.13:34506->10.20.172.85:80 (CLOSE_WAIT) java 13334 0 66u IPv6 86313523 TCP 10.20.168.13:36320->10.20.172.85:80 (CLOSE_WAIT) java 13334 0 67u IPv6 86382763 TCP 10.20.168.13:52680->10.20.172.85:80 (CLOSE_WAIT) java 13334 0 71u IPv6 85851508 TCP *:58126 (LISTEN)lsof命令参数解释