Find process running on port: Difference between revisions
Jump to navigation
Jump to search
m (→相關資料) |
(→相關資料) |
||
| Line 33: | Line 33: | ||
== 相關資料 == | == 相關資料 == | ||
* [http://puremonkey2010.blogspot.com/2010/11/windows-windows-netstat.html 程式扎記: | * [http://puremonkey2010.blogspot.com/2010/11/windows-windows-netstat.html 程式扎記: (Windows 技巧) windows常用網路管理指令 - netstat] | ||
* [https://stackoverflow.com/questions/3855127/find-and-kill-process-locking-port-3000-on-mac macos - Find (and kill) process locking port 3000 on Mac - Stack Overflow] | * [https://stackoverflow.com/questions/3855127/find-and-kill-process-locking-port-3000-on-mac macos - Find (and kill) process locking port 3000 on Mac - Stack Overflow] | ||
* [https://stackoverflow.com/questions/34815425/how-to-find-all-the-listening-port-in-php sockets - How to find all the listening port in PHP? - Stack Overflow] | * [https://stackoverflow.com/questions/34815425/how-to-find-all-the-listening-port-in-php sockets - How to find all the listening port in PHP? - Stack Overflow] | ||
* [http://www.techrepublic.com/blog/security/list-open-ports-and-listening-services/443 List open ports and listening services] | * [http://www.techrepublic.com/blog/security/list-open-ports-and-listening-services/443 List open ports and listening services] | ||
* [http://www.cyberciti.biz/faq/find-out-which-service-listening-specific-port/ Linux / UNIX Find Out What Program / Service is Listening on a Specific TCP Port] | * [http://www.cyberciti.biz/faq/find-out-which-service-listening-specific-port/ Linux / UNIX Find Out What Program / Service is Listening on a Specific TCP Port] | ||
* [https://errerrors.blogspot.com/2022/03/fix-control-center-occupy-port-5000-on%20mac.html 解決 Python Flask 網站伺服器無法啟動的問題 [Mac M1]] | |||
== 參考資料 == | == 參考資料 == | ||
Revision as of 10:45, 25 March 2022
Commands
- Win
netstat –na | find "<PORT>" e.g. netstat –na | find "4444" or netstat -a | find "3306" (note: require the double quote symbol, not single quote symbol) for Win
[1] - macOS
- Linux
CentOS7 netstat -na | grep <port> or ps -elf | grep <port>
## windows ## After running process on windows, and then input the command: netstat –na | find "4444" TCP 0.0.0.0:4444 0.0.0.0:0 LISTENING TCP [::]:4444 [::]:0 LISTENING ## mac ## After running process on mac, and then input the command: netstat -vanp tcp | grep 4444 tcp46 0 0 *.4444 *.* LISTEN 131072 131072 15476 0 0x0000 0x00000006 tcp4 0 0 127.0.0.1.54419 127.0.0.1.4444 TIME_WAIT 408300 146988 15476 0 0x2031 0x00000000 ## mac ## After running process on mac, and then input the command: lsof -i tcp:4444 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 15476 user 8u IPv6 0x8eb77926a50f8a53 0t0 TCP *:krb524 (LISTEN)
問題排除
FIND: 參數格式不正確
問題: Win
netstat –na | find 4444 輸入後遇到「FIND: 參數格式不正確」錯誤訊息。
解決方式: 請將 <port> 加上雙引號,例如: netstat –na | find "4444"
相關資料
- 程式扎記: (Windows 技巧) windows常用網路管理指令 - netstat
- macos - Find (and kill) process locking port 3000 on Mac - Stack Overflow
- sockets - How to find all the listening port in PHP? - Stack Overflow
- List open ports and listening services
- Linux / UNIX Find Out What Program / Service is Listening on a Specific TCP Port
- 解決 Python Flask 網站伺服器無法啟動的問題 [Mac M1]