ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Linux--lsof查看1521這個port被那些程式打開

Linux--lsof查看1521這個port被那些程式打開

原创 Linux操作系统 作者:vongates 时间:2019-05-19 12:42:05 0 删除 编辑

lsof的功能很強,詳細的說明我們可以用lsof --help去看,再想看更詳細的說明就是用 man lsof了喲。。不多說了,查看某個port被那些程式打開的語法如下:

lsof -i TCP -n
lsof -i UDP -n


# lsof -i tcp:1521 -n
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
tnslsnr 2098 oracle 8u IPv4 4067 TCP *:1521 (LISTEN)
tnslsnr 2098 oracle 10u IPv4 4209 TCP 192.168.60.221:1521->192.168.60.221:32790 (ESTABLISHED)
tnslsnr 2098 oracle 11u IPv4 4210 TCP 192.168.60.221:1521->192.168.60.222:32791 (ESTABLISHED)
oracle 2150 oracle 15u IPv4 4206 TCP 192.168.60.221:32789->192.168.60.222:1521 (ESTABLISHED)
oracle 2150 oracle 16u IPv4 4208 TCP 192.168.60.221:32790->192.168.60.221:1521 (ESTABLISHED)
oracle 18827 oracle 14u IPv4 6974915 TCP 192.168.60.221:1521->192.168.60.224:3611 (ESTABLISHED)
oracle 18847 oracle 14u IPv4 6974984 TCP 192.168.60.221:1521->192.168.60.224:3643 (ESTABLISHED)
oracle 26175 oracle 14u IPv4 6998778 TCP 192.168.60.221:1521->192.168.60.15:3170 (ESTABLISHED)
oracle 26971 oracle 14u IPv4 7001444 TCP 192.168.60.221:1521->192.168.60.15:3412 (ESTABLISHED)
oracle 27244 oracle 14u IPv4 7002363 TCP 192.168.60.221:1521->192.168.60.15:3531 (ESTABLISHED)
oracle 27333 oracle 14u IPv4 7002655 TCP 192.168.60.221:1521->192.168.60.15:3550 (ESTABLISHED)
oracle 27795 oracle 14u IPv4 7004210 TCP 192.168.60.221:1521->192.168.60.15:3764 (ESTABLISHED)
oracle 27897 oracle 14u IPv4 7004543 TCP 192.168.60.221:1521->192.168.60.15:3802 (ESTABLISHED)
oracle 28069 oracle 14u IPv4 7009448 TCP 192.168.60.221:1521->192.168.60.15:3862 (ESTABLISHED)
oracle 28146 oracle 14u IPv4 7098746 TCP 192.168.60.221:1521->192.168.60.224:2584 (ESTABLISHED)
oracle 28148 oracle 14u IPv4 7098754 TCP 192.168.60.221:1521->192.168.60.15:3913 (ESTABLISHED)
oracle 28154 oracle 14u IPv4 7120767 TCP 192.168.60.221:1521->192.168.60.15:3915 (ESTABLISHED)
oracle 28156 oracle 14u IPv4 7120776 TCP 192.168.60.221:1521->192.168.60.223:2786 (ESTABLISHED)
oracle 28168 oracle 14u IPv4 7120808 TCP 192.168.60.221:1521->192.168.60.15:3919 (ESTABLISHED)
oracle 28170 oracle 14u IPv4 7120817 TCP 192.168.60.221:1521->192.168.60.15:3921 (ESTABLISHED)
oracle 28174 oracle 14u IPv4 7120830 TCP 192.168.60.221:1521->192.168.60.15:3922 (ESTABLISHED)
oracle 28188 oracle 14u IPv4 7120887 TCP 192.168.60.221:1521->192.168.60.15:3932 (ESTABLISHED)
oracle 28207 oracle 14u IPv4 7120938 TCP 192.168.60.221:1521->192.168.60.15:3933 (ESTABLISHED)
oracle 28234 oracle 14u IPv4 7120997 TCP 192.168.60.221:1521->192.168.60.15:3940 (ESTABLISHED)
oracle 28242 oracle 14u IPv4 7121027 TCP 192.168.60.221:1521->192.168.60.224:2775 (ESTABLISHED)
oracle 28244 oracle 14u IPv4 7121035 TCP 192.168.60.221:1521->192.168.60.15:3946 (ESTABLISHED)
oracle 28246 oracle 14u IPv4 7121044 TCP 192.168.60.221:1521->192.168.60.15:3949 (ESTABLISHED)
oracle 28258 oracle 14u IPv4 7121089 TCP 192.168.60.221:1521->192.168.60.15:3955 (ESTABLISHED)
oracle 28264 oracle 14u IPv4 7121115 TCP 192.168.60.221:1521->192.168.60.15:3959 (ESTABLISHED)
oracle 28266 oracle 14u IPv4 7121124 TCP 192.168.60.221:1521->192.168.60.15:3962 (ESTABLISHED)
oracle 28280 oracle 14u IPv4 7121161 TCP 192.168.60.221:1521->192.168.60.15:3964 (ESTABLISHED)
oracle 28310 oracle 14u IPv4 7181267 TCP 192.168.60.221:1521->192.168.60.223:2817 (ESTABLISHED)
oracle 28344 oracle 14u IPv4 7181392 TCP 192.168.60.221:1521->192.168.60.15:4021 (ESTABLISHED)
oracle 28346 oracle 14u IPv4 7181401 TCP 192.168.60.221:1521->192.168.60.223:2826 (ESTABLISHED)
oracle 28367 oracle 14u IPv4 7181461 TCP 192.168.60.221:1521->192.168.60.224:3116 (ESTABLISHED)
oracle 28381 oracle 14u IPv4 7181505 TCP 192.168.60.221:1521->192.168.60.224:3136 (ESTABLISHED)
oracle 28391 oracle 14u IPv4 7181542 TCP 192.168.60.221:1521->192.168.60.224:3159 (ESTABLISHED)
oracle 28395 oracle 14u IPv4 7181559 TCP 192.168.60.221:1521->192.168.60.223:2832 (ESTABLISHED)
oracle 28411 oracle 14u IPv4 7181607 TCP 192.168.60.221:1521->192.168.60.15:4030 (ESTABLISHED)
oracle 28432 oracle 14u IPv4 7181676 TCP 192.168.60.221:1521->192.168.60.15:4038 (ESTABLISHED)
oracle 28464 oracle 14u IPv4 7181784 TCP 192.168.60.221:1521->192.168.60.15:4046 (ESTABLISHED)
oracle 28466 oracle 14u IPv4 7181793 TCP 192.168.60.221:1521->192.168.60.15:4049 (ESTABLISHED)
oracle 28472 oracle 14u IPv4 7181819 TCP 192.168.60.221:1521->192.168.60.15:4054 (ESTABLISHED)
oracle 28487 oracle 14u IPv4 7181869 TCP 192.168.60.221:1521->192.168.60.224:3331 (ESTABLISHED)
oracle 28501 oracle 14u IPv4 7181919 TCP 192.168.60.221:1521->192.168.60.223:2856 (ESTABLISHED)
oracle 28525 oracle 14u IPv4 7181994 TCP 192.168.60.221:1521->192.168.60.223:2860 (ESTABLISHED)
oracle 28527 oracle 14u IPv4 7182006 TCP 192.168.60.221:1521->192.168.60.223:2862 (ESTABLISHED)
oracle 28529 oracle 14u IPv4 7182014 TCP 192.168.60.221:1521->192.168.60.224:3394 (ESTABLISHED)
oracle 28533 oracle 14u IPv4 7182030 TCP 192.168.60.221:1521->192.168.60.224:3397 (ESTABLISHED)
oracle 28537 oracle 14u IPv4 7182046 TCP 192.168.60.221:1521->192.168.60.224:3402 (ESTABLISHED)
oracle 28557 oracle 14u IPv4 7182106 TCP 192.168.60.221:1521->192.168.60.15:4072 (ESTABLISHED)
oracle 28561 oracle 14u IPv4 7182119 TCP 192.168.60.221:1521->192.168.60.223:2872 (ESTABLISHED)
oracle 28573 oracle 14u IPv4 7182156 TCP 192.168.60.221:1521->192.168.60.224:3456 (ESTABLISHED)
oracle 28583 oracle 14u IPv4 7182200 TCP 192.168.60.221:1521->192.168.60.15:4077 (ESTABLISHED)
oracle 28587 oracle 14u IPv4 7182214 TCP 192.168.60.221:1521->192.168.60.224:3469 (ESTABLISHED)
oracle 28589 oracle 14u IPv4 7182226 TCP 192.168.60.221:1521->192.168.60.224:3476 (ESTABLISHED)
oracle 28609 oracle 14u IPv4 7182296 TCP 192.168.60.221:1521->192.168.60.224:3523 (ESTABLISHED)
oracle 28611 oracle 14u IPv4 7182304 TCP 192.168.60.221:1521->192.168.60.15:4086 (ESTABLISHED)
oracle 28623 oracle 14u IPv4 7182345 TCP 192.168.60.221:1521->192.168.60.15:4096 (ESTABLISHED)
oracle 28690 oracle 14u IPv4 7182564 TCP 192.168.60.221:1521->192.168.60.223:2936 (ESTABLISHED)
oracle 28694 oracle 14u IPv4 7182576 TCP 192.168.60.221:1521->192.168.60.224:4060 (ESTABLISHED)
oracle 28698 oracle 14u IPv4 7182592 TCP 192.168.60.221:1521->192.168.60.223:2937 (ESTABLISHED)
oracle 28714 oracle 14u IPv4 7182652 TCP 192.168.60.221:1521->192.168.60.223:2943 (ESTABLISHED)
..................................
oracle 28816 oracle 14u IPv4 7182990 TCP 192.168.60.221:1521->192.168.60.15:4202 (ESTABLISHED)
oracle 28820 oracle 14u IPv4 7183003 TCP 192.168.60.221:1521->192.168.60.15:4204 (ESTABLISHED)
oracle 28822 oracle 14u IPv4 7183012 TCP 192.168.60.221:1521->192.168.60.224:4224 (ESTABLISHED)
oracle 28826 oracle 14u IPv4 7183024 TCP 192.168.60.221:1521->192.168.60.223:2960 (ESTABLISHED)

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29987/viewspace-51840/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2018-09-11

  • 博文量
    256
  • 访问量
    186610