0

I have the following output from lsof -i:portnumber

[ztao@MongoDB ~]$ lsof -i:6379
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
redis-ser 5341 ztao    4u  IPv6  23457      0t0  TCP *:6379 (LISTEN)
redis-ser 5341 ztao    5u  IPv4  23459      0t0  TCP *:6379 (LISTEN)
redis-ser 5341 ztao    6u  IPv4  23533      0t0  TCP localhost:6379->localhost:6633 (ESTABLISHED)
redis-ser 5341 ztao    7u  IPv4  23535      0t0  TCP localhost:6379->localhost:6634 (ESTABLISHED)
redis-ser 5341 ztao    8u  IPv4  23538      0t0  TCP localhost:6379->localhost:6635 (ESTABLISHED)
redis-ser 5341 ztao    9u  IPv4  23540      0t0  TCP localhost:6379->localhost:6636 (ESTABLISHED)
redis-ser 5341 ztao   10u  IPv4  23839      0t0  TCP localhost:6379->localhost:6747 (ESTABLISHED)
redis-ser 5341 ztao   11u  IPv4  23842      0t0  TCP localhost:6379->localhost:6748 (ESTABLISHED)
newsProvi 5349 ztao    6u  IPv4  23530      0t0  TCP localhost:6633->localhost:6379 (ESTABLISHED)
newsProvi 5349 ztao    7u  IPv4  23532      0t0  TCP localhost:6634->localhost:6379 (ESTABLISHED)
newsProvi 5349 ztao    8u  IPv4  23536      0t0  TCP localhost:6635->localhost:6379 (ESTABLISHED)
newsProvi 5349 ztao    9u  IPv4  23539      0t0  TCP localhost:6636->localhost:6379 (ESTABLISHED)
newsDistr 5456 ztao   12u  IPv4  23838      0t0  TCP localhost:6747->localhost:6379 (ESTABLISHED)
newsDistr 5456 ztao   13u  IPv4  23841      0t0  TCP localhost:6748->localhost:6379 (ESTABLISHED)

I am having trouble understanding what localhost:6379->localhost:6633 (ESTABLISHED) means. I tried to search but could not find an answer. This must be some really basic knowledge, but I am new and I don't know. any helps?

1

localhost:6379->localhost:6633 (ESTABLISHED) means that there’s an established connection between localhost’s ports 6379 and 6633. (“Established” is a state in the TCP/IP state machine; other protocols have similar states.)

The arrow doesn’t represent a direction in terms of communications; it reflects the ports’ ownership. The left side of the arrow is the port belonging to the listed process (Redis), the right side of the arrow is the port belonging to the remote end of the connection.

Since both sides of the connection are local, you can see the other end of the connection:

newsProvi 5349 ztao    6u  IPv4  23530      0t0  TCP localhost:6633->localhost:6379 (ESTABLISHED)
|improve this answer|||||
  • Thank you for the answer. Now I know :) – Kid_Learning_C Nov 22 '19 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.