window to view port occupancy, corresponding process, kill process, etc. via CMD command

Source: Internet
Author: User
Tags port number tomcat

How to view the ports that a program occupies

  First, see the ports that all processes occupy

At start-run-cmd, enter: Netstat–ano can view all processes

 Second, view the program that occupies the specified port

When you are using Tomcat to publish a program, often encounter the situation that the port is occupied, we want to know which program or process occupies the port, you can use this command netstat–ano|findstr "specify port number" Two, view the program that occupies the specified port when you are using Tomcat to release the program, Often encounter the situation of the port is occupied, we want to know which program or process occupies the port, you can use this command netstat–ano|findstr "specify port number" Two, view the program that occupies the specified port

When you are using Tomcat to publish a program, often encounter the situation that the port is occupied, we want to know which program or process occupies the port, can use this command netstat–ano|findstr "specify port number"

Such as: Query takes up 8080 ports of process: Netstat-ano|findstr "8080"

  Kill related processes through Task Manager

Method One: Use Task Manager to kill a process

Open Task Manager-> view-> Select column-> then check the PID option, return to the task Manager to see the corresponding PID, and then end the process

Of course, the above methods sometimes difficult to use, is the task manager in the process of more time, and then to find the corresponding process is very troublesome, so there is a way to kill the process of

Method Two: Kill process with Command

1> first find the process name corresponding to the process number

TASKLIST|FINDSTR Process Number

such as: Tasklist|findstr 3112

2> then kills the process according to the process name

taskkill/f/t/im Process Name

such as: taskkill/f/t/im/javaw.exe

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.