본문 바로가기
IT/DB

MongoDB 연결된 상태 보기

mongo shell 명령도 있겠지만, 일단 리눅스에서 네트워크 정보를 보는 것으로 간단하게 살펴보자.

아래와 같은 명령으로 대략은 살펴 볼 수 있겠다.

 

$ sudo netstat -anp --tcp --udp | grep mongo


tcp        0      0 192.168.0.4:27017       0.0.0.0:*               LISTEN      1091/mongod
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46976         ESTABLISHED 1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46988         ESTABLISHED 1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46994         ESTABLISHED 1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46986         ESTABLISHED 1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46998         ESTABLISHED 1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46974         ESTABLISHED 1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46984         ESTABLISHED 1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46978         ESTABLISHED 1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46982         ESTABLISHED 1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46992         ESTABLISHED 1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46990         ESTABLISHED 1091/mongod
tcp        0      0 127.0.0.1:27017         127.0.0.1:46980         ESTABLISHED 1091/mongod

 

 

웃으며일하자

Vlada Karpovich 님의 사진, 출처: Pexels