Understanding the netstat output
Asked Answered
B

2

1
tcp        0      0  :::111                      :::*                        LISTEN

Above is the output of netstat -nl | grep 111What is the meaning of :::111 segment?

Barron answered 27/10, 2016 at 5:49 Comment(4)
possible duplicate superuser.com/questions/661188/…Lonesome
mention in answer section . I will acceptBarron
:: is localhost, the next : separates the IP address from the port number, and 111 is the port number.Balaklava
answers in these would also help superuser.com/questions/515379/…Balladry
S
4

technet.microsoft.com says that:

Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Used without parameters, netstat displays active TCP connections.

So you can find which addresses and ports are used and listening. for example you want to run a Tomcat server on port 8080. but it used. so you can run:

netstat -ano | find "8080"

output will be something like:

 TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       1185
 TCP    [::]:8080              [::]:0                 LISTENING       1185

It says that process number 1185 is using this port. If it is necessary to use this port you can shutdown the app that use this port and run your server on it by this command:

taskkill /F /PID 1185
Somewhat answered 6/8, 2017 at 11:22 Comment(0)
G
0
@echo off
:myline
netstat -nob
echo.
echo.
ping 127.0.0.1 > %temp%\pingio.txt
goto myline

Put this in a batch file and run it as Administrator to monitor network processes.

Gilda answered 29/9, 2020 at 17:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.