Current location - Quotes Website - Team slogan - How to check what program is occupying port 8080?
How to check what program is occupying port 8080?
When using tomcat, the default port 8080 is often occupied. Sometimes I want to find out which program is occupying this port. You can go to the website to find a software or something, or use the firewall to check the port used; Actually, it's not necessary In windows, there is a dos command to check the current port usage. This command is netstat. This command has many available parameters, which can be viewed through the -help parameter. For example, to view all connections and listening ports, you can add the -a parameter, and to display the process id of each connection, you can add the -o parameter; After checking the process id, you can find the process corresponding to pid in the process manager of windows. The process manager of windows does not display pid by default, and you can view it in View->. [Select a column] to view the pid, and then the pid will be displayed in the process viewer.

All parameters and descriptions of netstat are as follows:

Displays protocol statistics and current TCP/IP network connections.

NETSTAT[-a][-b][-e][-n][-o][-p proto][-r][-s][-v][interval]

-a shows all connections and listening ports.

-b display.

Executable component. In some cases, executable components are known.

There are multiple independent components, and in these cases,

A series of components involved in creating a connection or listening port.

Be displayed. In this case, the executable component name

In [] at the bottom, at the top is the component it calls.

Wait until the TCP/IP part. Please note this option.

If you don't have enough permissions, it may take a long time.

It may fail.

-e Displays Ethernet statistics. This option can be used with-s.

Options are grouped together.

-n Displays the address and port number as numbers.

-o Displays the owning process ID associated with each connection.

-p proto shows the connection of the protocol specified by proto; Proto can be

One of the following protocols: TCP, UDP, TCPv6 or UDPv6.

If used with the -s option to display statistics by protocol, proto can be the following protocol.

One:

IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP or UDPv6.

-r displays the routing table.

-s displays statistics by protocol. By default, IP is displayed,

Statistical information of IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP and UDPv6;

The p option is used to specify a subset of the default cases.

When the -v option is used with the -b option, the information contained in is displayed.

This creates a connection or listening port for all executable components.

Component.

Interval redisplays the selected statistics between each display.

Pause interval (seconds). Press CTRL+C to stop the restart.

Show statistics. If omitted, netstat will display the current

Configuration information (displayed only once)