Check that the program occupies my port

Source: Internet
Author: User

Start -- run -- cmd enter the command prompt and enter netstat-ano. Then you can see all connected PIDs and find the corresponding PID in the task manager. Program If no PID exists in the task manager, select "View"-"Select column" in the task manager"

Often, when we start an application, we find that the ports required by the system are occupied by other programs. How do we know who owns the ports we need, the following describes a very simple method.

 

If we need to determine who occupies our port 9050

C: \> netstat-Aon | findstr "9050"

TCP127.0.0.1: 90500.0.0.0: 0Listening2016

As you can see, the port is occupied by a process with the process number 2016. Continue to execute the following command:

C: \> tasklist | findstr "2016"

Tor.exe2016 Console016,064 K

It is clear that the TOR occupies your port.

Tnslsnr.exe

The Listener service of oraclesql.

 

Netstat [-A] [-B] [-E] [-N] [-O] [-P proto] [-R] [-S] [-V] [Interval]

-A displays all connection and listening ports.

-B shows the executable components that contain each connection or listening port. In some cases, it is known that the executable component
has multiple independent components, and in these cases, the sequence of components included in the creation of a connection or listening port is displayed. In this case, the executable component name
is in the [] at the bottom, and the component called by the component is at the top until the TCP/IP part. Note that this option
may take a long time. failure may occur if you do not have sufficient permissions.
-e displays Ethernet statistics. This option can be combined with the-s option.
-N displays the address and port number in numbers.

-O displays the ID of the process 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 one of the following protocols:
IP, IPv6, ICMP, ICMPv6, TCP, tcpv6, UDP, or udpv6.

-R shows the route table.

-S displays statistics by protocol. By default, the IP address,
Statistics of IPv6, ICMP, ICMPv6, TCP, tcpv6, UDP, and udpv6;
The-P option is used to specify the default subset.

-V and-B options will be included in
Creates a connection or listener port for All executable components.

Interval re-displays the selected statistics.
Pause interval (in seconds ). Press Ctrl + C to stop and restart
Displays statistics. If omitted, netstat displays the current
Configuration Information (only once)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.