View the program commands used by the port in Windows (port 80 is used as an example)

Source: Internet
Author: User

Today, I found that my apache cannot be started. The log shows that the 80 product has been occupied by the application. Next, let's take the program that is occupied by port 80 as an example, we can use some methods to check whether other ports are occupied by the program.

Start-run-cmd enter the command prompt and enter netstat-ano. Then you can see all connected PIDs and find the program corresponding to the PID in the task manager. If no PID exists in the task manager, you can 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, next we will introduce a very simple method and hope it will be useful to you.

We need to determine who is using port 80.

Run the following command in the windows command line window:

The Code is as follows: Copy code

C:/> netstat-aon | findstr "80 ″
TCP 0.0.0.0: 19780 0.0.0.0: 0 LISTENING 2044
TCP 10.72.224.5: 2558 96.17.109.8: 80 ESTABLISHED 2044
TCP 10.72.224.5: 2757 60.210.176.209: 80 TIME_WAIT 0
TCP 10.72.224.5: 3956 125.46.1.234: 80 ESTABLISHED 2044
TCP 10.72.224.5: 3959 125.46.1.234: 80 ESTABLISHED 2044
UDP 0.0.0.0: 2280 *: * 3700

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

 

The Code is as follows: Copy code
C:/> tasklist | findstr "2044 ″
Avp.exe 2044 Console 0 37,680 K

Obviously, avp Kabbah listens to port 80 and adjusts the Kabbah network listening settings.
Of course, if your port 80 is occupied by other programs, kill or adjust the port.

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.