cmd--return, enter netstat-ano--return, you can view the occupied port, note the PID of the port, and then open Task Manager, point to view, select columns, check the PID to determine, find the corresponding PID, end the process, if it does not end or does not work after the end, Just use the NTSD command .
Tomcat Port Occupancy workaround
If the front-end port is not occupied and is later occupied, you can go to the D:\tomcat-5.5.26\bin to execute shutdown.bat, so that the occupied port is released
If the task Manager cannot finish the process, use the command below
cmd--return, enter ntsd-c q-p pid--return
Ntsd-c q-p pid (change the last PID to the PID of the process you want to terminate). In the process list you can find the PID of a process.
The above parameter-P indicates that followed by the process PID,-c Q for the execution of Exit NTSD Debug command, from the command line to pass the above parameters in the past on the line.
The Windows system comes with a user-state debug tool NTSD, as long as you use NTSD at the command line to bring up a process, and then exit NTSD to terminate the process, and use NTSD automatically get debug permissions, so NTSD can kill most of the process.
NTSD cannot kill the process: only System,SMSS. EXE and CSRSS. EXE cannot kill. The first two are pure kernel state, the last one is the WIN32 subsystem, NTSD itself needs it.
In addition, the Tskill command kill process is also a choice
Tasklist can list all the processes and the corresponding information.
Tskill can kill processes based on the PID (process ID) process name.
The following is a detailed use of Tskill
TSKILL ProcessID | ProcessName [/server:servername] [/id:sessionid |/a] [/V]
The process ID of the ProcessID to end.
ProcessName the name of the process to end.
/server:servername the server that contains the ProcessID (the default value is the current value).
When working with process names and/server, you must specify/ID
OR/A
/id:sessionid ends a process that runs under a specified session.
/A ends a process that runs under all sessions.
/V Displays information about the operation that is being performed.
Here is the detailed usage of tasklist
TASKLIST [/S system [/u username [/p [password]]]
[/M [module] |/svc |/v] [/FI Filter] [/FO format] [/NH]
Describe:
This tool displays a list of processes currently running on a local or remote machine.
Parameter list:
/S system Specifies the remote system to which the connection is connected.
/u [domain\]user Specifies the user context in which the command should be executed.
/p [Password] specifies the password for the provided user context. If omitted, prompt
Input.
/M [Module] lists all tasks that currently use the given Exe/dll name.
If you do not specify a module name, all loaded modules are displayed.
/SVC Displays the services hosted in each process.
/V displays detailed task information.
/FI Filter displays a series of tasks that conform to the criteria specified by the filter.
The output format is specified by the/FO format.
Valid values: "TABLE", "LIST", "CSV".
/NH specifies that column headings should not be displayed in the output.
Valid only for "TABLE" and "CSV" formats.
/? Displays the help message.
Black Hair http://heisetoufa.iteye.com
Netstat-ano, view occupied ports, end occupied ports, NTSD, close the process that task Manager cannot kill