Close the port process

windows environment:

Check whether the 8080 port is occupied
netstat -nao | findstr "8080"

tasklist | findstr "3640"

taskkill /pid 3640 /f

Linux environment:

Check if the port is occupied 8080

netstat -anp | grep 8080

Check that the program is occupied port

lsof -i:8080

View the process of the application information

ps PID (process ID)

View the status of the process

pidstat -p PID (process ID)

pid: process ID

% Usr: user application occupy cpu

% System: system occupied by cpu

% Guest: other cpu

% Cpu: Total occupied by cpu

cpu: cpu core number, because it is a virtual machine, so 0

command: Process instructions

Guess you like

Origin www.cnblogs.com/worklife/p/12106853.html