{"id":30791,"date":"2025-04-21T04:05:58","date_gmt":"2025-04-20T20:05:58","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/30791.html"},"modified":"2025-04-21T04:05:58","modified_gmt":"2025-04-20T20:05:58","slug":"linux%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%a6%82%e4%bd%95%e7%9c%8b%e8%bf%90%e8%a1%8c%e7%9a%84java%e7%a8%8b%e5%ba%8f%e6%9c%89%e5%93%aa%e4%ba%9b%ef%bc%88ps%e3%80%81jps%e3%80%81top%e3%80%81lsof%e3%80%81netstat","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/30791.html","title":{"rendered":"linux\u670d\u52a1\u5668\u5982\u4f55\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f\u6709\u54ea\u4e9b\uff08ps\u3001jps\u3001top\u3001lsof\u3001netstat\u3001ss\u547d\u4ee4\u7b49\uff09"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"1.%20%E4%BD%BF%E7%94%A8ps%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:80px\">1. \u4f7f\u7528ps\u547d\u4ee4<\/p>\n<p id=\"2.%20%E4%BD%BF%E7%94%A8jps%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:80px\">2. \u4f7f\u7528jps\u547d\u4ee4<\/p>\n<p id=\"3.%20%E4%BD%BF%E7%94%A8pgrep%E5%92%8Cpkill-toc\" style=\"margin-left:80px\">3. \u4f7f\u7528pgrep\u548cpkill<\/p>\n<p id=\"4.%20%E4%BD%BF%E7%94%A8top%E6%88%96htop-toc\" style=\"margin-left:80px\">4. \u4f7f\u7528top\u6216htop<\/p>\n<p id=\"5.%E6%A0%B9%E6%8D%AE%E7%AB%AF%E5%8F%A3%E5%8D%A0%E7%94%A8%E6%83%85%E5%86%B5%E6%89%BE%E5%88%B0pid-toc\" style=\"margin-left:80px\">5.\u6839\u636e\u7aef\u53e3\u5360\u7528\u60c5\u51b5\u627e\u5230pid<\/p>\n<p id=\"lsof-toc\" style=\"margin-left:120px\">lsof<\/p>\n<p id=\"netstat-toc\" style=\"margin-left:120px\">netstat<\/p>\n<p id=\"ss-toc\" style=\"margin-left:120px\">ss<\/p>\n<p id=\"ss%E5%91%BD%E4%BB%A4%E7%9A%84%E8%BF%87%E6%BB%A4%E5%8A%9F%E8%83%BD-toc\" style=\"margin-left:160px\">ss\u547d\u4ee4\u7684\u8fc7\u6ee4\u529f\u80fd<\/p>\n<p id=\"ss%E5%91%BD%E4%BB%A4%E7%9A%84%E4%BC%98%E5%8A%BF-toc\" style=\"margin-left:160px\">ss\u547d\u4ee4\u7684\u4f18\u52bf<\/p>\n<p id=\"%E6%A1%88%E4%BE%8B%EF%BC%9A%E5%8F%91%E7%8E%B0%E5%8D%A0%E7%94%A87300%E7%AB%AF%E5%8F%A3%E7%9A%84%E7%A8%8B%E5%BA%8F%EF%BC%8C%E5%B9%B6%E5%85%B3%E6%8E%89-toc\" style=\"margin-left:80px\">\u6848\u4f8b&#xff1a;\u53d1\u73b0\u5360\u75287300\u7aef\u53e3\u7684\u7a0b\u5e8f&#xff0c;\u5e76\u5173\u6389<\/p>\n<p id=\"1.%20%E5%8F%91%E7%8E%B0%E5%8D%A0%E7%94%A87300%E7%AB%AF%E5%8F%A3%E7%9A%84%E7%A8%8B%E5%BA%8FPID-toc\" style=\"margin-left:80px\">1. \u53d1\u73b0\u5360\u75287300\u7aef\u53e3\u7684\u7a0b\u5e8fPID<\/p>\n<p id=\"%E2%80%8B%E7%BC%96%E8%BE%91-toc\" style=\"margin-left:80px\">\u200b\u7f16\u8f91<\/p>\n<p id=\"2.%20%E5%81%9C%E6%8E%89%E5%8D%A0%E7%94%A87300%E7%AB%AF%E5%8F%A3%E7%9A%84%E7%A8%8B%E5%BA%8F-toc\" style=\"margin-left:80px\">2. \u505c\u6389\u5360\u75287300\u7aef\u53e3\u7684\u7a0b\u5e8f<\/p>\n<p id=\"%E6%80%BB%E7%BB%93-toc\" style=\"margin-left:80px\">\u603b\u7ed3<\/p>\n<hr id=\"hr-toc\" \/>\n<\/p>\n<p>\u5728Linux\u670d\u52a1\u5668\u4e0a\u67e5\u770b\u6b63\u5728\u8fd0\u884c\u7684Java\u7a0b\u5e8f&#xff0c;\u4f60\u53ef\u4ee5\u4f7f\u7528\u51e0\u79cd\u4e0d\u540c\u7684\u65b9\u6cd5\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528ps\u547d\u4ee4\u3001jps\u547d\u4ee4&#xff08;\u5982\u679c\u5df2\u5b89\u88c5Java Development Kit (JDK)&#xff09;\u3001\u4ee5\u53capgrep\u548ctop\u6216htop\u7b49\u5de5\u5177\u3002\u4e0b\u9762\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u65b9\u6cd5&#xff1a;<\/p>\n<h4 id=\"1.%20%E4%BD%BF%E7%94%A8ps%E5%91%BD%E4%BB%A4\" style=\"background-color:transparent\">1. \u4f7f\u7528ps\u547d\u4ee4<\/h4>\n<p>ps\u547d\u4ee4\u662f\u6700\u5e38\u7528\u7684\u5de5\u5177\u4e4b\u4e00&#xff0c;\u7528\u4e8e\u663e\u793a\u5f53\u524d\u8fdb\u7a0b\u7684\u5feb\u7167\u3002\u8981\u67e5\u627e\u6240\u6709Java\u8fdb\u7a0b&#xff0c;\u4f60\u53ef\u4ee5\u4f7f\u7528grep\u547d\u4ee4\u6765\u8fc7\u6ee4\u7ed3\u679c&#xff1a;<\/p>\n<p>ps -ef | grep java <\/p>\n<p>\u00a0 <\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u5217\u51fa\u6240\u6709\u5305\u542b&#034;java&#034;\u7684\u884c&#xff0c;\u8fd9\u901a\u5e38\u610f\u5473\u7740\u5b83\u4eec\u662fJava\u8fdb\u7a0b\u3002-ef\u9009\u9879\u7528\u4e8e\u663e\u793a\u5b8c\u6574\u7684\u683c\u5f0f\u4fe1\u606f\u3002<\/p>\n<hr \/>\n<h4 id=\"2.%20%E4%BD%BF%E7%94%A8jps%E5%91%BD%E4%BB%A4\">2. \u4f7f\u7528jps\u547d\u4ee4<\/h4>\n<p>jps&#xff08;Java Virtual Machine Process Status Tool&#xff09;\u662fJDK\u63d0\u4f9b\u7684\u4e00\u4e2a\u5de5\u5177&#xff0c;\u7528\u4e8e\u5217\u51fa\u5f53\u524d\u6240\u6709Java\u865a\u62df\u673a\u5b9e\u4f8b\u7684ID\u4ee5\u53ca\u4e3b\u7c7b&#xff08;main class&#xff09;\u7684\u540d\u79f0&#xff08;\u5982\u679c\u6709\u7684\u8bdd&#xff09;\u3002\u8981\u4f7f\u7528jps&#xff0c;\u4f60\u9700\u8981\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86JDK&#xff0c;\u5e76\u4e14jps\u547d\u4ee4\u5728\u4f60\u7684PATH\u4e2d\u3002<\/p>\n<p>jps -l <\/p>\n<p>-l\u9009\u9879\u4f1a\u8f93\u51fa\u4e3b\u7c7b\u7684\u5168\u540d&#xff0c;\u5982\u679c\u4e0d\u52a0-l&#xff0c;\u5219\u53ea\u663e\u793aJVM\u7684ID\u548c\u4e3b\u7c7b\u7684\u7b80\u77ed\u540d\u79f0&#xff08;\u6216\u4e3b\u7c7b\u7684jar\u5305\u540d\u79f0&#xff09;\u3002<\/p>\n<hr \/>\n<h4 id=\"3.%20%E4%BD%BF%E7%94%A8pgrep%E5%92%8Cpkill\" style=\"background-color:transparent\">3. \u4f7f\u7528pgrep\u548cpkill<\/h4>\n<p>pgrep\u547d\u4ee4\u7528\u4e8e\u67e5\u627e\u5339\u914d\u6761\u4ef6\u7684\u8fdb\u7a0bID\u3002\u8981\u67e5\u627e\u6240\u6709Java\u8fdb\u7a0b&#xff0c;\u53ef\u4ee5\u4f7f\u7528&#xff1a;<\/p>\n<p>pgrep java <\/p>\n<p>\u00a0 <\/p>\n<p>\u8fd9\u4f1a\u5217\u51fa\u6240\u6709\u540d\u4e3a&#034;java&#034;\u7684\u8fdb\u7a0b\u7684PID\u3002\u5982\u679c\u4f60\u60f3\u8981\u57fa\u4e8e\u8fd9\u4e9bPID\u505a\u8fdb\u4e00\u6b65\u7684\u64cd\u4f5c&#xff08;\u6bd4\u5982\u6740\u6b7b\u8fd9\u4e9b\u8fdb\u7a0b&#xff09;&#xff0c;\u53ef\u4ee5\u7ed3\u5408\u4f7f\u7528pkill&#xff08;pgrep\u7684&#034;kill&#034;\u7248\u672c&#xff09;\u6216kill\u547d\u4ee4\u3002<\/p>\n<hr \/>\n<h4 id=\"4.%20%E4%BD%BF%E7%94%A8top%E6%88%96htop\" style=\"background-color:transparent\">4. \u4f7f\u7528top\u6216htop<\/h4>\n<p>top\u547d\u4ee4\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5b9e\u65f6\u7684\u89c6\u56fe&#xff0c;\u663e\u793a\u4e86\u7cfb\u7edf\u4e0a\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\u53ca\u5176\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5&#xff08;\u5982CPU\u548c\u5185\u5b58&#xff09;\u3002\u867d\u7136\u5b83\u9ed8\u8ba4\u4e0d\u4f1a\u76f4\u63a5\u8fc7\u6ee4\u51faJava\u8fdb\u7a0b&#xff0c;\u4f46\u4f60\u53ef\u4ee5\u901a\u8fc7\u6309\u4e0bf\u952e\u6765\u5b9a\u5236\u663e\u793a\u7684\u5b57\u6bb5&#xff0c;\u5e76\u901a\u8fc7\u6dfb\u52a0COMMAND\u5b57\u6bb5&#xff08;\u5982\u679c\u5c1a\u672a\u9009\u4e2d&#xff09;\u6765\u66f4\u5bb9\u6613\u5730\u8bc6\u522bJava\u8fdb\u7a0b\u3002<\/p>\n<p>htop\u662ftop\u7684\u4e00\u4e2a\u589e\u5f3a\u7248\u672c&#xff0c;\u63d0\u4f9b\u4e86\u4e00\u4e2a\u66f4\u53cb\u597d\u7684\u7528\u6237\u754c\u9762\u548c\u66f4\u591a\u7684\u529f\u80fd&#xff0c;\u5305\u62ec\u901a\u8fc7\u6309F3\u6216\/\u6765\u641c\u7d22\u7279\u5b9a\u547d\u4ee4&#xff08;\u5982&#034;java&#034;&#xff09;\u7684\u8fdb\u7a0b\u3002<\/p>\n<p>\u66f4\u591atop\u547d\u4ee4\u4f7f\u7528<\/p>\n<hr \/>\n<h4 id=\"5.%E6%A0%B9%E6%8D%AE%E7%AB%AF%E5%8F%A3%E5%8D%A0%E7%94%A8%E6%83%85%E5%86%B5%E6%89%BE%E5%88%B0pid\">5.\u6839\u636e\u7aef\u53e3\u5360\u7528\u60c5\u51b5\u627e\u5230pid<\/h4>\n<h5 id=\"lsof\" style=\"background-color:transparent\">lsof<\/h5>\n<p>lsof&#xff08;list open files&#xff09;\u662f\u4e00\u4e2a\u5728Linux\u73af\u5883\u4e0b\u7528\u4e8e\u5217\u51fa\u5f53\u524d\u7cfb\u7edf\u6253\u5f00\u6587\u4ef6\u7684\u5de5\u5177\u3002\u7531\u4e8eUnix\/Linux\u7cfb\u7edf\u8ba4\u4e3a\u201c\u4e00\u5207\u7686\u6587\u4ef6\u201d&#xff0c;\u56e0\u6b64\u901a\u8fc7lsof\u53ef\u4ee5\u67e5\u770b\u7528\u6237\u548c\u8fdb\u7a0b\u64cd\u4f5c\u4e86\u54ea\u4e9b\u6587\u4ef6&#xff0c;\u4e5f\u53ef\u4ee5\u67e5\u770b\u7cfb\u7edf\u4e2d\u7f51\u7edc\u7684\u4f7f\u7528\u60c5\u51b5&#xff0c;\u4ee5\u53ca\u8bbe\u5907\u7684\u4fe1\u606f\u3002<\/p>\n<p>lsof\u547d\u4ee4\u7684\u8f93\u51fa\u5305\u542b\u4e86\u591a\u5217\u4fe1\u606f&#xff0c;\u6bcf\u5217\u90fd\u6709\u7279\u5b9a\u7684\u542b\u4e49&#xff1a;<\/p>\n<ul>\n<li>COMMAND&#xff1a;\u8fdb\u7a0b\u7684\u540d\u79f0\u3002<\/li>\n<li>PID&#xff1a;\u8fdb\u7a0b\u6807\u8bc6\u7b26\u3002<\/li>\n<li>USER&#xff1a;\u8fdb\u7a0b\u6240\u6709\u8005\u3002<\/li>\n<li>FD&#xff1a;\u6587\u4ef6\u63cf\u8ff0\u7b26&#xff0c;\u5e94\u7528\u7a0b\u5e8f\u901a\u8fc7\u6587\u4ef6\u63cf\u8ff0\u7b26\u8bc6\u522b\u8be5\u6587\u4ef6\u3002<\/li>\n<li>TYPE&#xff1a;\u6587\u4ef6\u7c7b\u578b\u3002<\/li>\n<li>DEVICE&#xff1a;\u6307\u5b9a\u78c1\u76d8\u7684\u540d\u79f0\u3002<\/li>\n<li>SIZE&#xff1a;\u6587\u4ef6\u7684\u5927\u5c0f\u3002<\/li>\n<li>NODE&#xff1a;\u7d22\u5f15\u8282\u70b9&#xff08;\u6587\u4ef6\u5728\u78c1\u76d8\u4e0a\u7684\u6807\u8bc6&#xff09;\u3002<\/li>\n<li>NAME&#xff1a;\u6253\u5f00\u6587\u4ef6\u7684\u786e\u5207\u540d\u79f0\u3002<\/li>\n<\/ul>\n<li>\n<p>\u5217\u51fa\u67d0\u4e2a\u8fdb\u7a0b\u6253\u5f00\u7684\u6240\u6709\u6587\u4ef6&#xff1a;<\/p>\n<p> lsof -p 1234 \u00a0 <\/p>\n<p>\u8fd9\u4f1a\u5217\u51fa\u8fdb\u7a0b\u53f7\u4e3a1234\u7684\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6240\u6709\u6587\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>\u5217\u51fa\u67d0\u4e2a\u7528\u6237\u6253\u5f00\u7684\u6587\u4ef6&#xff1a;<\/p>\n<p> lsof -u root \u00a0 <\/p>\n<p>\u8fd9\u4f1a\u5217\u51faroot\u7528\u6237\u6253\u5f00\u7684\u6240\u6709\u6587\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>\u67e5\u770b\u67d0\u4e2a\u7aef\u53e3\u7684\u4f7f\u7528\u60c5\u51b5&#xff1a;<\/p>\n<p> lsof -i :80 \u00a0 <\/p>\n<p>\u8fd9\u4f1a\u5217\u51fa\u6240\u6709\u6253\u5f0080\u7aef\u53e3\u7684\u8fdb\u7a0b\u3002<\/p>\n<\/li>\n<li>\n<p>\u67e5\u770b\u8fde\u63a5\u5230\u67d0\u4e2aIP\u5730\u5740\u548c\u7aef\u53e3\u7684\u8fdb\u7a0b&#xff1a;<\/p>\n<p> lsof -i &#064;192.168.1.1:22 <\/p>\n<p>\u8fd9\u4f1a\u5217\u51fa\u6240\u6709\u8fde\u63a5\u5230IP\u5730\u5740192.168.1.1\u768422\u7aef\u53e3\u7684\u8fdb\u7a0b\u3002<\/p>\n<\/li>\n<li>\n<p>\u5217\u51fa\u6240\u6709\u6253\u5f00\u7684\u7f51\u7edc\u8fde\u63a5&#xff1a;<\/p>\n<p> lsof -i <\/p>\n<p>\u8fd9\u4f1a\u5217\u51fa\u6240\u6709\u6253\u5f00\u7684\u7f51\u7edc\u8fde\u63a5&#xff0c;\u5305\u62ecTCP\u548cUDP\u8fde\u63a5\u3002<\/p>\n<\/li>\n<ul>\n<li>\u7531\u4e8elsof\u9700\u8981\u8bbf\u95ee\u6838\u5fc3\u5185\u5b58\u548c\u5404\u79cd\u6587\u4ef6&#xff0c;\u56e0\u6b64\u901a\u5e38\u9700\u8981\u4ee5root\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u3002<\/li>\n<li>\u5728\u4f7f\u7528lsof\u547d\u4ee4\u65f6&#xff0c;\u53ef\u4ee5\u7ec4\u5408\u591a\u4e2a\u53c2\u6570\u6765\u6ee1\u8db3\u590d\u6742\u7684\u67e5\u8be2\u9700\u6c42\u3002<\/li>\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;lsof\u7684\u8f93\u51fa\u53ef\u80fd\u4f1a\u5305\u542b\u5f88\u591a\u4fe1\u606f&#xff0c;\u53ef\u4ee5\u901a\u8fc7grep\u7b49\u5de5\u5177\u8fdb\u884c\u8fc7\u6ee4&#xff0c;\u4ee5\u83b7\u53d6\u66f4\u5177\u4f53\u7684\u7ed3\u679c\u3002<\/li>\n<\/ul>\n<hr \/>\n<h5 id=\"netstat\" style=\"background-color:transparent\">netstat<\/h5>\n<p>netstat&#xff08;\u7f51\u7edc\u7edf\u8ba1&#xff09;\u662f\u4e00\u4e2a\u5728Linux\u7cfb\u7edf\u4e2d\u5e7f\u6cdb\u4f7f\u7528\u7684\u547d\u4ee4\u884c\u5de5\u5177&#xff0c;\u7528\u4e8e\u663e\u793a\u7f51\u7edc\u8fde\u63a5\u3001\u8def\u7531\u8868\u3001\u63a5\u53e3\u7edf\u8ba1\u3001\u591a\u64ad\u6210\u5458\u7b49\u4fe1\u606f\u3002\u5b83\u5bf9\u4e8e\u7f51\u7edc\u6545\u969c\u6392\u9664\u3001\u6027\u80fd\u76d1\u6d4b\u4ee5\u53ca\u5b89\u5168\u5ba1\u8ba1\u7b49\u65b9\u9762\u90fd\u975e\u5e38\u6709\u7528\u3002<\/p>\n<li>\n<p>\u663e\u793a\u6240\u6709\u8fde\u63a5\u548c\u76d1\u542c\u7aef\u53e3<\/p>\n<p> netstat -a <\/p>\n<p>\u8fd9\u4f1a\u663e\u793a\u6240\u6709\u5f53\u524d\u6d3b\u52a8\u7684TCP\u3001UDP\u8fde\u63a5\u548c\u6240\u6709\u6b63\u5728\u76d1\u542c\u7684\u7aef\u53e3\u3002<\/p>\n<\/li>\n<li>\n<p>\u663e\u793aTCP\u8fde\u63a5<\/p>\n<p> netstat -t \u00a0 <\/p>\n<p>\u4ec5\u663e\u793a\u5f53\u524d\u6d3b\u52a8\u7684TCP\u8fde\u63a5\u53ca\u5176\u72b6\u6001\u3002<\/p>\n<\/li>\n<li>\n<p>\u663e\u793aUDP\u8fde\u63a5<\/p>\n<p> netstat -u <\/p>\n<p>\u4ec5\u663e\u793a\u5f53\u524d\u6d3b\u52a8\u7684UDP\u8fde\u63a5\u3002<\/p>\n<\/li>\n<li>\n<p>\u4ee5\u6570\u5b57\u5f62\u5f0f\u663e\u793a\u6240\u6709\u8fde\u63a5\u548c\u76d1\u542c\u7aef\u53e3<\/p>\n<p> netstat -an <\/p>\n<p>\u8fd9\u53ef\u4ee5\u52a0\u5feb\u8f93\u51fa\u901f\u5ea6&#xff0c;\u7279\u522b\u662f\u5728\u6709\u5927\u91cf\u8fde\u63a5\u65f6\u3002<\/p>\n<\/li>\n<li>\n<p>\u663e\u793a\u4e0e\u7279\u5b9a\u7aef\u53e3\u5173\u8054\u7684\u8fdb\u7a0b\u4fe1\u606f<\/p>\n<p> netstat -anp | grep \u7aef\u53e3\u53f7 <\/p>\n<p>\u6ce8\u610f&#xff1a;\u5728\u67d0\u4e9b\u7cfb\u7edf\u4e2d&#xff0c;\u53ef\u80fd\u9700\u8981root\u6743\u9650\u624d\u80fd\u663e\u793a\u8fdb\u7a0b\u4fe1\u606f\u3002<\/p>\n<\/li>\n<li>\n<p>\u663e\u793a\u8def\u7531\u8868<\/p>\n<p> netstat -r \u00a0 <\/p>\n<p>\u663e\u793a\u7cfb\u7edf\u7684\u8def\u7531\u8868&#xff0c;\u4e86\u89e3\u6570\u636e\u5305\u5982\u4f55\u5728\u7f51\u7edc\u4e2d\u8fdb\u884c\u8def\u7531\u3002<\/p>\n<\/li>\n<li>\n<p>\u663e\u793a\u7f51\u7edc\u63a5\u53e3\u4fe1\u606f<\/p>\n<p> netstat -i <\/p>\n<p>\u663e\u793a\u7f51\u7edc\u63a5\u53e3\u7684\u7edf\u8ba1\u4fe1\u606f&#xff0c;\u5305\u62ec\u63a5\u6536\u548c\u53d1\u9001\u7684\u6570\u636e\u5305\u6570\u3001\u9519\u8bef\u6570\u7b49\u3002<\/p>\n<\/li>\n<li>\n<p>\u8fde\u7eed\u663e\u793a\u7f51\u7edc\u72b6\u6001\u4fe1\u606f<\/p>\n<p> netstat -c 5 <\/p>\n<p>\u6bcf5\u79d2\u66f4\u65b0\u4e00\u6b21\u7f51\u7edc\u72b6\u6001\u4fe1\u606f&#xff0c;\u76f4\u5230\u7528\u6237\u4e2d\u65ad\u3002<\/p>\n<\/li>\n<p>netstat\u662f\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u7f51\u7edc\u5206\u6790\u5de5\u5177&#xff0c;\u901a\u8fc7\u4e0d\u540c\u7684\u9009\u9879\u548c\u53c2\u6570\u7ec4\u5408&#xff0c;\u53ef\u4ee5\u7075\u6d3b\u5730\u663e\u793a\u5404\u79cd\u7f51\u7edc\u8fde\u63a5\u548c\u7edf\u8ba1\u4fe1\u606f\u3002\u5b83\u5bf9\u4e8e\u7f51\u7edc\u7ba1\u7406\u5458\u548c\u5f00\u53d1\u4eba\u5458\u6765\u8bf4\u662f\u4e00\u4e2a\u4e0d\u53ef\u6216\u7f3a\u7684\u5de5\u5177&#xff0c;\u80fd\u591f\u5e2e\u52a9\u4ed6\u4eec\u66f4\u597d\u5730\u7ba1\u7406\u548c\u7ef4\u62a4Linux\u7cfb\u7edf\u4e2d\u7684\u7f51\u7edc\u73af\u5883\u3002<\/p>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u968f\u7740Linux\u7cfb\u7edf\u7684\u4e0d\u65ad\u53d1\u5c55\u548c\u66f4\u65b0&#xff0c;\u4e00\u4e9b\u65b0\u7684\u5de5\u5177&#xff08;\u5982ss\u547d\u4ee4&#xff09;\u9010\u6e10\u51fa\u73b0\u5e76\u63d0\u4f9b\u4e86\u7c7b\u4f3c\u6216\u66f4\u5f3a\u5927\u7684\u529f\u80fd\u3002\u7136\u800c&#xff0c;netstat\u547d\u4ee4\u4ecd\u7136\u56e0\u5176\u7b80\u5355\u6027\u548c\u6613\u7528\u6027\u800c\u53d7\u5230\u8bb8\u591a\u7528\u6237\u7684\u559c\u7231\u3002<\/p>\n<hr \/>\n<h5 id=\"ss\" style=\"background-color:transparent\">ss<\/h5>\n<p>ss\u547d\u4ee4\u662fSocket Statistics\u7684\u7f29\u5199&#xff0c;\u4e5f\u88ab\u79f0\u4e3aIPC&#xff08;Inter-Process Communication&#xff09;\u5957\u63a5\u5b57\u7edf\u8ba1\u3002\u5b83\u662fLinux\u4e0b\u4e00\u4e2a\u5f3a\u5927\u7684\u7f51\u7edc\u7ba1\u7406\u547d\u4ee4&#xff0c;\u4e3b\u8981\u7528\u4e8e\u83b7\u53d6\u7cfb\u7edf\u4e2dsocket\u7684\u7edf\u8ba1\u4fe1\u606f\u3002ss\u547d\u4ee4\u7684\u529f\u80fd\u4e0enetstat\u7c7b\u4f3c&#xff0c;\u4f46\u76f8\u6bd4netstat&#xff0c;ss\u547d\u4ee4\u80fd\u663e\u793a\u66f4\u591a\u66f4\u8be6\u7ec6\u7684TCP\u548c\u8fde\u63a5\u72b6\u6001\u7684\u4fe1\u606f&#xff0c;\u5e76\u4e14\u5728\u5904\u7406\u5927\u91cfsocket\u8fde\u63a5\u65f6\u66f4\u5feb\u66f4\u9ad8\u6548\u3002\u8fd9\u662f\u56e0\u4e3ass\u547d\u4ee4\u76f4\u63a5\u5229\u7528\u4e86TCP\u534f\u8bae\u6808\u4e2d\u7684tcp_diag\u6a21\u5757&#xff0c;\u8fd9\u4e2a\u6a21\u5757\u53ef\u4ee5\u83b7\u5f97Linux\u5185\u6838\u4e2d\u7684\u7b2c\u4e00\u624b\u4fe1\u606f&#xff0c;\u56e0\u6b64\u5176\u6027\u80fd\u4f18\u4e8e\u5176\u4ed6\u5de5\u5177\u3002<\/p>\n<p>ss\u547d\u4ee4\u7684\u57fa\u672c\u8bed\u6cd5\u4e3a&#xff1a;<\/p>\n<p>ss [\u9009\u9879] [\u8fc7\u6ee4\u5668] <\/p>\n<p>\u5176\u4e2d&#xff0c;\u9009\u9879\u548c\u8fc7\u6ee4\u5668\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8fdb\u884c\u8bbe\u7f6e&#xff0c;\u4ee5\u6ee1\u8db3\u4e0d\u540c\u7684\u67e5\u770b\u9700\u6c42\u3002<\/p>\n<li>\n<p>\u663e\u793a\u6240\u6709TCP\u5957\u63a5\u5b57\u4fe1\u606f&#xff1a;<\/p>\n<p> ss -t -a <\/p>\n<p>\u6b64\u547d\u4ee4\u4f1a\u5217\u51fa\u6240\u6709TCP\u5957\u63a5\u5b57\u7684\u4fe1\u606f&#xff0c;\u5305\u62ec\u76d1\u542c\u548c\u975e\u76d1\u542c\u72b6\u6001\u7684\u5957\u63a5\u5b57\u3002<\/p>\n<\/li>\n<li>\n<p>\u663e\u793a\u6240\u6709UDP\u5957\u63a5\u5b57\u4fe1\u606f&#xff1a;<\/p>\n<p> ss -u -a <\/p>\n<p>\u6b64\u547d\u4ee4\u4f1a\u5217\u51fa\u6240\u6709UDP\u5957\u63a5\u5b57\u7684\u4fe1\u606f\u3002<\/p>\n<\/li>\n<li>\n<p>\u663e\u793a\u6240\u6709\u76d1\u542c\u72b6\u6001\u7684\u5957\u63a5\u5b57\u53ca\u5176\u5bf9\u5e94\u7684\u8fdb\u7a0b\u4fe1\u606f&#xff1a;<\/p>\n<p> ss -l -p <\/p>\n<p>\u6b64\u547d\u4ee4\u4f1a\u5217\u51fa\u6240\u6709\u5904\u4e8e\u76d1\u542c\u72b6\u6001\u7684\u5957\u63a5\u5b57&#xff0c;\u5e76\u663e\u793a\u4e0e\u4e4b\u5173\u8054\u7684\u8fdb\u7a0b\u4fe1\u606f\u3002<\/p>\n<\/li>\n<li>\n<p>\u4ee5\u6570\u5b57\u683c\u5f0f\u663e\u793a\u6240\u6709\u5957\u63a5\u5b57\u4fe1\u606f\u53ca\u5176\u7edf\u8ba1\u6458\u8981&#xff1a;<\/p>\n<p> ss -n -s <\/p>\n<p>\u6b64\u547d\u4ee4\u4f1a\u4ee5\u6570\u5b57\u683c\u5f0f\u663e\u793a\u6240\u6709\u5957\u63a5\u5b57\u7684\u4fe1\u606f\u53ca\u5176\u7edf\u8ba1\u6458\u8981\u3002<\/p>\n<\/li>\n<h6 id=\"ss%E5%91%BD%E4%BB%A4%E7%9A%84%E8%BF%87%E6%BB%A4%E5%8A%9F%E8%83%BD\" style=\"background-color:transparent\">ss\u547d\u4ee4\u7684\u8fc7\u6ee4\u529f\u80fd<\/h6>\n<p>ss\u547d\u4ee4\u8fd8\u652f\u6301\u4f7f\u7528\u8fc7\u6ee4\u5668\u6765\u63d0\u4f9b\u66f4\u7cbe\u786e\u7684\u67e5\u8be2\u7ed3\u679c\u3002\u4f8b\u5982&#xff0c;\u53ef\u4ee5\u901a\u8fc7IP\u5730\u5740\u3001\u7aef\u53e3\u53f7\u3001\u72b6\u6001\u7b49\u6765\u7b5b\u9009\u6240\u9700\u7684\u4fe1\u606f\u3002\u4f8b\u5982&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u67e5\u770b\u6240\u6709\u5df2\u5efa\u7acb\u7684TCP\u8fde\u63a5&#xff1a;<\/p>\n<p> ss state ESTABLISHED <\/p>\n<\/li>\n<li>\n<p>\u67e5\u770b\u7279\u5b9aIP\u5730\u5740\u548c\u7aef\u53e3\u7684\u8fde\u63a5&#xff1a;<\/p>\n<p> ss dst 192.168.1.1:80 <\/p>\n<\/li>\n<\/ul>\n<h6 id=\"ss%E5%91%BD%E4%BB%A4%E7%9A%84%E4%BC%98%E5%8A%BF\" style=\"background-color:transparent\">ss\u547d\u4ee4\u7684\u4f18\u52bf<\/h6>\n<li>\u66f4\u8be6\u7ec6\u7684\u4fe1\u606f&#xff1a;ss\u547d\u4ee4\u80fd\u663e\u793a\u66f4\u591a\u66f4\u8be6\u7ec6\u7684TCP\u548c\u8fde\u63a5\u72b6\u6001\u7684\u4fe1\u606f\u3002<\/li>\n<li>\u66f4\u5feb\u7684\u6027\u80fd&#xff1a;\u5728\u5904\u7406\u5927\u91cfsocket\u8fde\u63a5\u65f6&#xff0c;ss\u547d\u4ee4\u6bd4netstat\u66f4\u5feb\u66f4\u9ad8\u6548\u3002<\/li>\n<li>\u76f4\u63a5\u5229\u7528\u5185\u6838\u4fe1\u606f&#xff1a;ss\u547d\u4ee4\u76f4\u63a5\u5229\u7528\u4e86\u5185\u6838\u7684TCP\u8fde\u63a5\u8ddf\u8e2a\u72b6\u6001\u4fe1\u606f&#xff0c;\u907f\u514d\u4e86\u50cfnetstat\u90a3\u6837\u901a\u8fc7\/proc\u63a5\u53e3\u83b7\u53d6\u6570\u636e\u7684\u5f00\u9500\u3002<\/li>\n<p>\u7efc\u4e0a\u6240\u8ff0&#xff0c;ss\u547d\u4ee4\u662fLinux\u4e0b\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u4e14\u5b9e\u7528\u7684\u7f51\u7edc\u7ba1\u7406\u547d\u4ee4&#xff0c;\u5b83\u80fd\u591f\u5e2e\u52a9\u7cfb\u7edf\u7ba1\u7406\u5458\u66f4\u597d\u5730\u76d1\u63a7\u548c\u7ba1\u7406\u7cfb\u7edf\u7684\u7f51\u7edc\u8fde\u63a5\u72b6\u6001\u3002<\/p>\n<hr \/>\n<h4 id=\"%E6%A1%88%E4%BE%8B%EF%BC%9A%E5%8F%91%E7%8E%B0%E5%8D%A0%E7%94%A87300%E7%AB%AF%E5%8F%A3%E7%9A%84%E7%A8%8B%E5%BA%8F%EF%BC%8C%E5%B9%B6%E5%85%B3%E6%8E%89\" style=\"background-color:transparent\">\u6848\u4f8b&#xff1a;\u53d1\u73b0\u5360\u75287300\u7aef\u53e3\u7684\u7a0b\u5e8f&#xff0c;\u5e76\u5173\u6389<\/h4>\n<h4 id=\"1.%20%E5%8F%91%E7%8E%B0%E5%8D%A0%E7%94%A87300%E7%AB%AF%E5%8F%A3%E7%9A%84%E7%A8%8B%E5%BA%8FPID\" style=\"background-color:transparent\">1. \u53d1\u73b0\u5360\u75287300\u7aef\u53e3\u7684\u7a0b\u5e8fPID<\/h4>\n<p>sudo lsof -i :7300<\/p>\n<p>sudo ss -ltnp | grep :7300<\/p>\n<h4 id=\"%E2%80%8B%E7%BC%96%E8%BE%91\" style=\"background-color:transparent\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"334\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420200556-680553a4ed931.png\" width=\"1200\" \/><\/h4>\n<h4 id=\"2.%20%E5%81%9C%E6%8E%89%E5%8D%A0%E7%94%A87300%E7%AB%AF%E5%8F%A3%E7%9A%84%E7%A8%8B%E5%BA%8F\">2. \u505c\u6389\u5360\u75287300\u7aef\u53e3\u7684\u7a0b\u5e8f<\/h4>\n<p>\u4e00\u65e6\u4f60\u627e\u5230\u4e86\u5360\u75287300\u7aef\u53e3\u7684\u8fdb\u7a0bPID&#xff0c;\u4f60\u53ef\u4ee5\u4f7f\u7528kill\u547d\u4ee4\u6765\u505c\u6389\u5b83\u3002\u5982\u679c\u4f60\u5df2\u7ecf\u77e5\u9053PID&#xff0c;\u5219\u8fd0\u884c&#xff1a;<\/p>\n<p>sudo kill 84292 <\/p>\n<p>\u00a0 <\/p>\n<p>\u5982\u679c\u8fdb\u7a0b\u6ca1\u6709\u54cd\u5e94&#xff0c;\u4f60\u53ef\u80fd\u9700\u8981\u4f7f\u7528kill -9\u6765\u5f3a\u5236\u7ec8\u6b62\u5b83&#xff1a;<\/p>\n<\/p>\n<p>sudo kill -9 84292 <\/p>\n<p>\u00a0 <\/p>\n<p>\u8bf7\u6ce8\u610f&#xff0c;\u4f7f\u7528kill -9\u662f\u5f3a\u5236\u7ec8\u6b62\u8fdb\u7a0b&#xff0c;\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u6216\u5176\u4ed6\u526f\u4f5c\u7528&#xff0c;\u56e0\u6b64\u5e94\u8be5\u8c28\u614e\u4f7f\u7528\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"148\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420200557-680553a551936.png\" width=\"932\" \/><\/p>\n<h4 id=\"%E6%80%BB%E7%BB%93\" style=\"background-color:transparent\">\u603b\u7ed3<\/h4>\n<ul>\n<li>\u4f7f\u7528lsof -i :8080\u6216ss -ltnp | grep :8080\u6765\u67e5\u627e\u5360\u75288080\u7aef\u53e3\u7684\u8fdb\u7a0bPID\u3002<\/li>\n<li>\u4f7f\u7528kill PID\u6216kill -9 PID\u6765\u505c\u6389\u8be5\u8fdb\u7a0b\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e30\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u4f7f\u7528\u6216\u6765\u67e5\u627e\u5360\u75288080\u7aef\u53e3\u7684\u8fdb\u7a0bPID\u3002\u4f7f\u7528kill PID\u6216\u6765\u505c\u6389\u8be5\u8fdb\u7a0b\u3002_linux\u67e5\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f<\/p>\n","protected":false},"author":2,"featured_media":30789,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,58,190,43],"topic":[],"class_list":["post-30791","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-java","tag-linux","tag-190","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>linux\u670d\u52a1\u5668\u5982\u4f55\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f\u6709\u54ea\u4e9b\uff08ps\u3001jps\u3001top\u3001lsof\u3001netstat\u3001ss\u547d\u4ee4\u7b49\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/30791.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"linux\u670d\u52a1\u5668\u5982\u4f55\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f\u6709\u54ea\u4e9b\uff08ps\u3001jps\u3001top\u3001lsof\u3001netstat\u3001ss\u547d\u4ee4\u7b49\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e30\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u4f7f\u7528\u6216\u6765\u67e5\u627e\u5360\u75288080\u7aef\u53e3\u7684\u8fdb\u7a0bPID\u3002\u4f7f\u7528kill PID\u6216\u6765\u505c\u6389\u8be5\u8fdb\u7a0b\u3002_linux\u67e5\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/30791.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-20T20:05:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420200556-680553a4ed931.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/30791.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/30791.html\",\"name\":\"linux\u670d\u52a1\u5668\u5982\u4f55\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f\u6709\u54ea\u4e9b\uff08ps\u3001jps\u3001top\u3001lsof\u3001netstat\u3001ss\u547d\u4ee4\u7b49\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-20T20:05:58+00:00\",\"dateModified\":\"2025-04-20T20:05:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/30791.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/30791.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/30791.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"linux\u670d\u52a1\u5668\u5982\u4f55\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f\u6709\u54ea\u4e9b\uff08ps\u3001jps\u3001top\u3001lsof\u3001netstat\u3001ss\u547d\u4ee4\u7b49\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"linux\u670d\u52a1\u5668\u5982\u4f55\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f\u6709\u54ea\u4e9b\uff08ps\u3001jps\u3001top\u3001lsof\u3001netstat\u3001ss\u547d\u4ee4\u7b49\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/30791.html","og_locale":"zh_CN","og_type":"article","og_title":"linux\u670d\u52a1\u5668\u5982\u4f55\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f\u6709\u54ea\u4e9b\uff08ps\u3001jps\u3001top\u3001lsof\u3001netstat\u3001ss\u547d\u4ee4\u7b49\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e30\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u4f7f\u7528\u6216\u6765\u67e5\u627e\u5360\u75288080\u7aef\u53e3\u7684\u8fdb\u7a0bPID\u3002\u4f7f\u7528kill PID\u6216\u6765\u505c\u6389\u8be5\u8fdb\u7a0b\u3002_linux\u67e5\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f","og_url":"https:\/\/www.wsisp.com\/helps\/30791.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-20T20:05:58+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420200556-680553a4ed931.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/30791.html","url":"https:\/\/www.wsisp.com\/helps\/30791.html","name":"linux\u670d\u52a1\u5668\u5982\u4f55\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f\u6709\u54ea\u4e9b\uff08ps\u3001jps\u3001top\u3001lsof\u3001netstat\u3001ss\u547d\u4ee4\u7b49\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-20T20:05:58+00:00","dateModified":"2025-04-20T20:05:58+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/30791.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/30791.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/30791.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"linux\u670d\u52a1\u5668\u5982\u4f55\u770b\u8fd0\u884c\u7684java\u7a0b\u5e8f\u6709\u54ea\u4e9b\uff08ps\u3001jps\u3001top\u3001lsof\u3001netstat\u3001ss\u547d\u4ee4\u7b49\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/30791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=30791"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/30791\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/30789"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=30791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=30791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=30791"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=30791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}