포트를 여는 Rabbitmq 관리 프로세스가 실행 중입니다 15672
.
tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 5431/beam
보시다시피 프로세스 PID
에는 5431
.
가서 /proc/5431
실행하면 해당 목록에 포트가 표시되지 않습니다 ls fd
(출력 억제).15672
lr-x------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 0 -> /dev/null
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 1 -> socket:[351505]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 12 -> socket:[375420]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 2 -> socket:[351505]
lr-x------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 3 -> /dev/null
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 4 -> anon_inode:[eventpoll]
lr-x------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 5 -> pipe:[351690]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 54 -> socket:[351702]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 55 -> socket:[351704]
l-wx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 6 -> pipe:[351690]
lr-x------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 60 -> pipe:[351726]
l-wx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 63 -> pipe:[351727]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 68 -> socket:[351740]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 69 -> socket:[351743]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 7 -> anon_inode:[timerfd]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 70 -> socket:[351774]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 71 -> socket:[357375]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 72 -> socket:[351818]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 8 -> socket:[351698]
lrwx------ 1 rabbitmq rabbitmq 64 Sep 12 14:59 9 -> socket:[357167]
15672
포트가 목록에 없는 이유를 누군가 말해 줄 수 있나요 ?
답변1
다음과 같이 fd를 찾을 수 있습니다.
pid=5431
find /proc/$pid/fd -lname 'socket:\['$(grep 00000000:3D38/proc/$pid/net/tcp|awk '{print $10}')'\]'
3D38은 16진수로 15672와 같습니다.