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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2024-11-6 11:39:16 | 显示全部楼层 |阅读模式
[root@it-elassearch-1 kibana-8.15.3]# netstat -ntlp ' x  k1 E' e, o  f+ K
Active Internet connections (only servers)
! \/ H. J! I$ z* q7 c$ N1 ]Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
* ], ~# ^& o( q# c3 R! b, N5 S0 ltcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1221/master         
3 ?4 O) }0 G" d' t$ Y' Ltcp        0      0 0.0.0.0:60028           0.0.0.0:*               LISTEN      1260/sshd           
1 ~' k$ o$ L8 l4 c# F% x  F+ wtcp        0      0 172.24.110.125:5601     0.0.0.0:*               LISTEN      28593/bin/../node/g 4 Y" X: I0 R9 G- x2 I0 C$ n1 x
tcp6       0      0 :::9300                 :::*                    LISTEN      26728/java          ; t; [# r# N; \3 D: F) d
tcp6       0      0 ::1:25                  :::*                    LISTEN      1221/master         6 c7 i0 }1 W7 j9 |% D) Y
tcp6       0      0 :::60028                :::*                    LISTEN      1260/sshd           ! L: G( y3 e" C: G; P7 c6 {
tcp6       0      0 :::9200                 :::*                    LISTEN      26728/java          . V% ]. @- [) l$ o9 ]- _3 m6 H  [7 l
[root@it-elassearch-1 kibana-8.15.3]# lsof -i:5601
" Z2 ?3 f9 L( w; d( v; SCOMMAND   PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME; M8 F7 h$ U( L
node    28593   es   19u  IPv4 15295164      0t0  TCP it-elassearch-1:esmagent (LISTEN)
; U( u. l" G. q+ D4 U! {2 x- x& iYou have mail in /var/spool/mail/root
! a: r' B: D& b8 c, H+ z# T. n[root@it-elassearch-1 kibana-8.15.3]# kill -9 28593+ z8 x2 Y: |) H! A# j
[root@it-elassearch-1 kibana-8.15.3]# lsof -i:5601
* ]& `0 W9 v7 `* q: l$ a[root@it-elassearch-1 kibana-8.15.3]# netstat -ntlp
% Y6 N+ i8 ^' O1 _6 M( TActive Internet connections (only servers)1 R+ y1 l$ o& t# X, g
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    ' _5 s+ c0 k+ h
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1221/master         # C7 r# H* ^2 q) y1 B3 J) y) I- N  ^& \
tcp        0      0 0.0.0.0:60028           0.0.0.0:*               LISTEN      1260/sshd           
% E& a% G- ~0 u; G4 a. Ctcp6       0      0 :::9300                 :::*                    LISTEN      26728/java         
9 @  I4 ^, S& A5 _& t! d4 {2 wtcp6       0      0 ::1:25                  :::*                    LISTEN      1221/master         
1 c! v6 c# o( f) y  o; T& Dtcp6       0      0 :::60028                :::*                    LISTEN      1260/sshd           
% e, N, s* H% Z8 g* L' rtcp6       0      0 :::9200                 :::*                    LISTEN      26728/java         
& X- w- b/ ]4 X( l$ L' w# ~3 t7 I# U* z6 q1 D- c
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 00:47 , Processed in 0.016233 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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