The Tomcat publisher USES cmd to view commands for port occupation corresponding processes killing processes and so on

  • 2020-05-30 21:21:05
  • OfStack

How do I view the ports my application is using

1. View ports occupied by all processes

In start-run-cmd, enter: netstat and ano to view all processes

2. View the program that occupies the specified port

When you're using tomcat release program, often encounter the port was taken, we would like to know which program or process takes up port, you can use this command netstat � ano | findstr "specifies the port number 2. Check the occupancy specified port procedures when you are using tomcat release program, often encounter the port was taken, we would like to know which program or process takes up port, You can use the command netstat, ano|, findstr "specify port number" 2 to view the program occupying the specified port
When you use tomcat to publish applications, you will often encounter port occupation. We want to know which application or process is occupying the port. You can use the command netstat, ano|, findstr "specify port number".

For example, query the process occupying port 8080: netstat-ano |findstr "8080"

3. Kill related processes through the task manager

Method 1: kill the process with the task manager

Open task manager - > See - > Select columns - > Then check the PID option, go back to the task manager to see the corresponding pid, and end the process
Of course, the above method is sometimes not useful, is the task manager when the process is more, and then to find the corresponding process is very troublesome, so there is another way to kill the process

Method 2: kill the process with a command

1 > First, find the process name corresponding to the process number

tasklist | findstr process
Such as: tasklist | findstr 3112

2 > Then kill the process by its name

taskkill /f /t /im process name
For example :taskkill /f /t /im/javaw.exe

Thank you for reading, I hope to help you, thank you for your support of this site!


Related articles: