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?
1. Windows Platform
Run the following command in the Windows command line window:
E: \ oracle \ ora92 \ bin> netstat
-Ano | find ": 80"
TCP
172.18.2.56: 3311
172.18.40.3: 80
Established 3704
TCP
172.18.2.56: 3319
172.18.65.7: 80
Established 3704
TCP
172.18.2.56: 4641
172.18.40.3: 80
Established 3704
TCP
172.18.2.56: 4734
172.18.65.7: 80
Established 3704
TCP
172.18.2.56: 4847
172.18.40.3: 80
Established 3560
TCP
172.18.2.56: 4848
172.18.40.3: 80
Established
3560
A process with a PID of 3560 occupies port 80 and continues to execute the following command:
E: \ oracle \ ora92 \ bin> tasklist
| Find
"3560"
Firefox.exe
3560
Console
0 147,564
K
It can be found that it is a Firefox process, and the Occupied memory size can be seen.
Comparison of the netstat command parameters:
E: \ oracle \ ora92 \ bin> netstat
-A | find ": 8080"
TCP
Wan: 8080
0.0.0.0: 0
Listening
E: \ oracle \ ora92 \ bin> netstat-an | find ": 8080"
TCP
0.0.0.0: 8080
0.0.0.0: 0
Listening
E: \ oracle \ ora92> netstat-ano | find ": 8080"
TCP
0.0.0.0: 8080
0.0.0.0: 0
Listening 3796.