找回密码
 注册
查看: 12|回复: 0

使用lsof 及netstat 确定进程及端口号

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2024-11-6 11:39:16 | 显示全部楼层 |阅读模式
[root@it-elassearch-1 kibana-8.15.3]# netstat -ntlp
1 ]. C8 T2 v+ u8 V6 JActive Internet connections (only servers)+ k- V7 |8 @1 b6 D5 H; w/ R1 D
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    / H- m0 j# r, U& |5 d' {
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1221/master         
+ s" E$ H- Z# o  j7 l% |: jtcp        0      0 0.0.0.0:60028           0.0.0.0:*               LISTEN      1260/sshd           
: f! ^) S  k) X2 N% ntcp        0      0 172.24.110.125:5601     0.0.0.0:*               LISTEN      28593/bin/../node/g / n# _5 @: {" c6 Z- M
tcp6       0      0 :::9300                 :::*                    LISTEN      26728/java          # Q; M2 d6 Y" J% G- n! g
tcp6       0      0 ::1:25                  :::*                    LISTEN      1221/master         ' a3 f1 r/ W1 [9 ~4 x  w
tcp6       0      0 :::60028                :::*                    LISTEN      1260/sshd           
* [0 g8 ?' K" H' t# p4 F0 atcp6       0      0 :::9200                 :::*                    LISTEN      26728/java         
0 K, z  n6 ]% ^# G0 u/ C[root@it-elassearch-1 kibana-8.15.3]# lsof -i:5601: f0 K5 s& D: q" G) R/ g! S
COMMAND   PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME; ~- {) [6 s. e9 R' n. B$ F
node    28593   es   19u  IPv4 15295164      0t0  TCP it-elassearch-1:esmagent (LISTEN)3 t; R$ `: J5 R5 L- k/ o+ p
You have mail in /var/spool/mail/root
9 j% I, q( s9 f& h' i+ o[root@it-elassearch-1 kibana-8.15.3]# kill -9 28593
  V/ b9 I& _0 \. h" \) w5 e* ][root@it-elassearch-1 kibana-8.15.3]# lsof -i:5601' D/ Q( }2 M5 }, a' b4 j, E: Q
[root@it-elassearch-1 kibana-8.15.3]# netstat -ntlp
. M) Z4 _7 N! N) E9 t- l# }Active Internet connections (only servers)
5 }) v. P9 f& xProto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    5 ]6 a# N  g# R
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1221/master         5 X7 J" u* Q' w9 m  W
tcp        0      0 0.0.0.0:60028           0.0.0.0:*               LISTEN      1260/sshd           
! X5 v7 I- m; b* E" mtcp6       0      0 :::9300                 :::*                    LISTEN      26728/java          6 X3 c3 f: P& N
tcp6       0      0 ::1:25                  :::*                    LISTEN      1221/master         
! n( y( s, b. s2 q) c3 ~tcp6       0      0 :::60028                :::*                    LISTEN      1260/sshd           ; Q( Z& ?7 o8 ~
tcp6       0      0 :::9200                 :::*                    LISTEN      26728/java         
8 C' k# u* n9 o' T
" |0 A1 H; R2 G9 B  b
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:45 , Processed in 0.017687 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表