{"id":16614,"date":"2024-11-18T08:19:01","date_gmt":"2024-11-18T00:19:01","guid":{"rendered":"https:\/\/fwq.ai\/blog\/16614\/"},"modified":"2024-11-18T08:19:01","modified_gmt":"2024-11-18T00:19:01","slug":"linux-11%e4%b8%aa%e6%ad%a5%e9%aa%a4%e6%95%99%e4%bd%a0%e5%ae%8c%e7%be%8e%e6%8e%92%e6%9f%a5%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%98%af%e5%90%a6%e8%a2%ab%e5%85%a5%e4%be%b5","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/16614\/","title":{"rendered":"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5"},"content":{"rendered":"<p> <\/p>\n<p style=\"text-align:center\"><strong><span style=\"font-family: mp-quote, -apple-system-font, BlinkMacSystemFont,\"><strong><span style=\"letter-spacing: 1px\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/6659f998645aa98d2c7aaa2aaaf29a91-0.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe\" \/><\/span><\/strong><\/span><\/strong><\/p>\n<p><span style=\"font-size: 16px;line-height: 25px\">\u968f\u7740\u5f00\u6e90\u4ea7\u54c1\u7684\u8d8a\u6765\u8d8a\u76db\u884c\uff0c\u4f5c\u4e3a\u4e00\u4e2aLinux\u8fd0\u7ef4\u5de5\u7a0b\u5e08\uff0c\u80fd\u591f\u6e05\u6670\u5730\u9274\u522b\u5f02\u5e38\u673a\u5668\u662f\u5426\u5df2\u7ecf\u88ab\u5165\u4fb5\u4e86\u663e\u5f97\u81f3\u5173\u91cd\u8981\uff0c\u4e2a\u4eba\u7ed3\u5408\u81ea\u5df1\u7684\u5de5\u4f5c\u7ecf\u5386\uff0c\u6574\u7406\u4e86\u51e0\u79cd\u5e38\u89c1\u7684\u673a\u5668\u88ab\u9ed1\u60c5\u51b5\u4f9b\u53c2\u8003\uff1a<\/span><br \/>\n<span style=\"font-size: 16px;line-height: 25px\">\u80cc\u666f\u4fe1\u606f\uff1a\u4ee5\u4e0b\u60c5\u51b5\u662f\u5728CentOS 6.9\u7684\u7cfb\u7edf\u4e2d\u67e5\u770b\u7684\uff0c\u5176\u5b83Linux\u53d1\u884c\u7248\u7c7b\u4f3c\u3002<\/span> <\/p>\n<h2><\/h2>\n<p style=\"margin-top: 15px;margin-right: 8px;margin-bottom: 20px;padding: 4px 10px;float: left;line-height: 20px\"><span style=\"line-height: 20px\">1<\/span><\/p>\n<p><span style=\"line-height: 28px\"><strong>\u5165\u4fb5\u8005<span style=\"line-height: 24px\">\u53ef\u80fd\u4f1a\u5220\u9664\u673a\u5668\u7684\u65e5\u5fd7\u4fe1\u606f<\/span><\/strong><\/span> <\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">\u53ef\u4ee5\u67e5\u770b\u65e5\u5fd7\u4fe1\u606f\u662f\u5426\u8fd8\u5b58\u5728\u6216\u8005\u662f\u5426\u88ab\u6e05\u7a7a\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a<\/span><\/p>\n<p style=\"margin: 15px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/6659f998645aa98d2c7aaa2aaaf29a91-1.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe1\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe1\" \/><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><\/p>\n<h2><\/h2>\n<p style=\"margin-top: 15px;margin-right: 8px;margin-bottom: 20px;padding: 4px 10px;float: left;line-height: 20px\"><span style=\"line-height: 20px\">2<\/span><\/p>\n<p><span style=\"line-height: 28px\"><strong>\u5165\u4fb5\u8005<span style=\"line-height: 24px\">\u53ef\u80fd\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5b58\u653e\u7528\u6237\u540d\u53ca\u5bc6\u7801\u6587\u4ef6<\/span><\/strong><\/span> <\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">\u53ef\u4ee5\u67e5\u770b\/etc\/passwd\u53ca\/etc\/shadow\u6587\u4ef6\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a<\/span><\/p>\n<p style=\"margin: 15px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/f220110603d38abdc37c4e6a05ed8418-2.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe2\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe2\" \/><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><\/p>\n<h2><\/h2>\n<p style=\"margin-top: 15px;margin-right: 8px;margin-bottom: 20px;padding: 4px 10px;float: left;line-height: 20px\"><span style=\"line-height: 20px\">3<\/span><\/p>\n<p><span style=\"line-height: 28px\"><strong>\u5165\u4fb5\u8005<span style=\"line-height: 24px\">\u53ef\u80fd\u4fee\u6539\u7528\u6237\u540d\u53ca\u5bc6\u7801\u6587\u4ef6<\/span><\/strong><\/span> <\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">\u53ef\u4ee5\u67e5\u770b\/etc\/passwd\u53ca\/etc\/shadow\u6587\u4ef6\u5185\u5bb9\u8fdb\u884c\u9274\u522b\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a<\/span><\/p>\n<p style=\"margin: 15px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/f220110603d38abdc37c4e6a05ed8418-3.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe3\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe3\" \/><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><\/p>\n<h2><\/h2>\n<p style=\"margin-top: 15px;margin-right: 8px;margin-bottom: 20px;padding: 4px 10px;float: left;line-height: 20px\"><span style=\"line-height: 20px\">4<\/span><\/p>\n<p><span style=\"line-height: 28px\"><strong>\u67e5\u770b<span style=\"line-height: 24px\">\u673a\u5668\u6700\u8fd1\u6210\u529f\u767b\u9646\u7684\u4e8b\u4ef6\u548c\u6700\u540e\u4e00\u6b21\u4e0d\u6210\u529f\u7684\u767b\u9646\u4e8b\u4ef6<\/span><\/strong><\/span> <\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">\u5bf9\u5e94\u65e5\u5fd7\u201c\/var\/log\/lastlog\u201d\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a<\/span><\/p>\n<p style=\"margin: 15px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/f220110603d38abdc37c4e6a05ed8418-4.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe4\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe4\" \/><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><\/p>\n<h2><\/h2>\n<p style=\"margin-top: 15px;margin-right: 8px;margin-bottom: 20px;padding: 4px 10px;float: left;line-height: 20px\"><span style=\"line-height: 20px\">5<\/span><\/p>\n<p><span style=\"line-height: 28px\"><strong>\u67e5\u770b<span style=\"line-height: 24px\">\u673a\u5668\u5f53\u524d\u767b\u5f55\u7684\u5168\u90e8\u7528\u6237<\/span><\/strong><\/span> <\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">\u5bf9\u5e94\u65e5\u5fd7\u6587\u4ef6\u201c\/var\/run\/utmp\u201d\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a<\/span><\/p>\n<p style=\"margin: 15px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/f220110603d38abdc37c4e6a05ed8418-5.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe5\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe5\" \/><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><\/p>\n<h2><\/h2>\n<p style=\"margin-top: 15px;margin-right: 8px;margin-bottom: 20px;padding: 4px 10px;float: left;line-height: 20px\"><span style=\"line-height: 20px\">6<\/span><\/p>\n<p><span style=\"line-height: 28px\"><strong>\u67e5\u770b<span style=\"line-height: 24px\">\u673a<\/span><\/strong><strong><span style=\"line-height: 24px\">\u5668\u521b\u5efa\u4ee5\u6765\u767b\u9646\u8fc7\u7684\u7528\u6237<\/span><\/strong><\/span> <\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">\u5bf9\u5e94\u65e5\u5fd7\u6587\u4ef6\u201c\/var\/log\/wtmp\u201d\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a<\/span><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\">\u53e6\u5916\uff0c\u641c\u7d22\u516c\u4f17\u53f7Linux\u5c31\u8be5\u8fd9\u6837\u5b66\u540e\u53f0\u56de\u590d\u201cgit\u4e66\u7c4d\u201d\uff0c\u83b7\u53d6\u4e00\u4efd\u60ca\u559c\u793c\u5305\u3002<\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/ae9f3c1fb118e28d22e75021afb0f72c-6.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe6\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe6\" \/><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><\/p>\n<h2><\/h2>\n<p style=\"margin-top: 15px;margin-right: 8px;margin-bottom: 20px;padding: 4px 10px;float: left;line-height: 20px\"><span style=\"line-height: 20px\">7<\/span><\/p>\n<p><span style=\"line-height: 28px\"><strong>\u67e5\u770b<span style=\"line-height: 24px\">\u673a\u5668\u6240\u6709\u7528\u6237\u7684\u8fde\u63a5\u65f6\u95f4\uff08\u5c0f\u65f6\uff09<\/span><\/strong><\/span> <\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">\u5bf9\u5e94\u65e5\u5fd7\u6587\u4ef6\u201c\/var\/log\/wtmp\u201d\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a<\/span><\/p>\n<p style=\"margin: 15px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/ae9f3c1fb118e28d22e75021afb0f72c-7.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe7\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe7\" \/><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><\/p>\n<h2><\/h2>\n<p style=\"margin-top: 15px;margin-right: 8px;margin-bottom: 20px;padding: 4px 10px;float: left;line-height: 20px\"><span style=\"line-height: 20px\">8<\/span><\/p>\n<p><span style=\"line-height: 28px\"><strong>\u5982\u679c<span style=\"line-height: 24px\">\u53d1\u73b0\u673a\u5668\u4ea7\u751f\u4e86\u5f02\u5e38\u6d41\u91cf<\/span><\/strong><\/span> <\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u201ctcpdump\u201d\u6293\u53d6\u7f51\u7edc\u5305\u67e5\u770b\u6d41\u91cf\u60c5\u51b5\u6216\u8005\u4f7f\u7528\u5de5\u5177\u201diperf\u201d\u67e5\u770b\u6d41\u91cf\u60c5\u51b5<\/span><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><\/p>\n<h2><\/h2>\n<p style=\"margin-top: 15px;margin-right: 8px;margin-bottom: 20px;padding: 4px 10px;float: left;line-height: 20px\"><span style=\"line-height: 20px\">9<\/span><\/p>\n<p><span style=\"line-height: 28px\"><strong>\u53ef\u4ee5\u67e5\u770b<span style=\"line-height: 24px\">\/var\/log\/secure<span style=\"line-height: 24px\">\u65e5\u5fd7\u6587\u4ef6<\/span><\/span><\/strong><\/span> <\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">\u5c1d\u8bd5\u53d1\u73b0\u5165\u4fb5\u8005\u7684\u4fe1\u606f\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a<\/span><\/p>\n<p style=\"margin: 15px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/ae9f3c1fb118e28d22e75021afb0f72c-8.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe8\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe8\" \/><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><\/p>\n<h2><\/h2>\n<p style=\"margin-top: 15px;margin-right: 8px;margin-bottom: 20px;padding: 4px 10px;float: left;line-height: 20px\"><span style=\"line-height: 20px\">10<\/span><\/p>\n<p><span style=\"line-height: 28px\">\u67e5\u8be2\u5f02\u5e38\u8fdb\u7a0b\u6240\u5bf9\u5e94\u7684\u6267\u884c\u811a\u672c\u6587\u4ef6<\/span> <\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">a.top\u547d\u4ee4\u67e5\u770b\u5f02\u5e38\u8fdb\u7a0b\u5bf9\u5e94\u7684PID<\/span><\/p>\n<p style=\"margin: 15px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/ae9f3c1fb118e28d22e75021afb0f72c-9.jpg\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe9\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe9\" \/><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">b.\u5728\u865a\u62df\u6587\u4ef6\u7cfb\u7edf\u76ee\u5f55\u67e5\u627e\u8be5\u8fdb\u7a0b\u7684\u53ef\u6267\u884c\u6587\u4ef6&nbsp;<\/span><\/p>\n<p style=\"margin: 15px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/c2c6fc266b2ca558a294b93d31098c1d-10.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe10\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe10\" \/><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><\/p>\n<h2><\/h2>\n<p style=\"margin-top: 15px;margin-right: 8px;margin-bottom: 20px;padding: 4px 10px;float: left;line-height: 20px\"><span style=\"line-height: 20px\">11<\/span><\/p>\n<p><span style=\"line-height: 28px\">\u5982\u679c\u786e\u8ba4\u673a\u5668\u5df2\u88ab\u5165\u4fb5\uff0c\u91cd\u8981\u6587\u4ef6\u5df2\u88ab\u5220\u9664\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u627e\u56de\u88ab\u5220\u9664\u7684\u6587\u4ef6Note:<\/span><br \/>\n<span style=\"font-size: 16px;line-height: 25px\">1\u3001\u5f53\u8fdb\u7a0b\u6253\u5f00\u4e86\u67d0\u4e2a\u6587\u4ef6\u65f6\uff0c\u53ea\u8981\u8be5\u8fdb\u7a0b\u4fdd\u6301\u6253\u5f00\u8be5\u6587\u4ef6\uff0c\u5373\u4f7f\u5c06\u5176\u5220\u9664\uff0c\u5b83\u4f9d\u7136\u5b58\u5728\u4e8e\u78c1\u76d8\u4e2d\u3002\u8fd9\u610f\u5473\u7740\uff0c\u8fdb\u7a0b\u5e76\u4e0d\u77e5\u9053\u6587\u4ef6\u5df2\u7ecf\u88ab\u5220\u9664\uff0c\u5b83\u4ecd\u7136\u53ef\u4ee5\u5411\u6253\u5f00\u8be5\u6587\u4ef6\u65f6\u63d0\u4f9b\u7ed9\u5b83\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u8fdb\u884c\u8bfb\u53d6\u548c\u5199\u5165\u3002\u9664\u4e86\u8be5\u8fdb\u7a0b\u4e4b\u5916\uff0c\u8fd9\u4e2a\u6587\u4ef6\u662f\u4e0d\u53ef\u89c1\u7684\uff0c\u56e0\u4e3a\u5df2\u7ecf\u5220\u9664\u4e86\u5176\u76f8\u5e94\u7684\u76ee\u5f55\u7d22\u5f15\u8282\u70b9\u3002<\/span><br \/>\n<span style=\"font-size: 16px;line-height: 25px\">2\u3001\u5728\/proc \u76ee\u5f55\u4e0b\uff0c\u5176\u4e2d\u5305\u542b\u4e86\u53cd\u6620\u5185\u6838\u548c\u8fdb\u7a0b\u6811\u7684\u5404\u79cd\u6587\u4ef6\u3002\/proc\u76ee\u5f55\u6302\u8f7d\u7684\u662f\u5728\u5185\u5b58\u4e2d\u6240\u6620\u5c04\u7684\u4e00\u5757\u533a\u57df\uff0c\u6240\u4ee5\u8fd9\u4e9b\u6587\u4ef6\u548c\u76ee\u5f55\u5e76\u4e0d\u5b58\u5728\u4e8e\u78c1\u76d8\u4e2d\uff0c\u56e0\u6b64\u5f53\u6211\u4eec\u5bf9\u8fd9\u4e9b\u6587\u4ef6\u8fdb\u884c\u8bfb\u53d6\u548c\u5199\u5165\u65f6\uff0c\u5b9e\u9645\u4e0a\u662f\u5728\u4ece\u5185\u5b58\u4e2d\u83b7\u53d6\u76f8\u5173\u4fe1\u606f\u3002\u5927\u591a\u6570\u4e0e lsof \u76f8\u5173\u7684\u4fe1\u606f\u90fd\u5b58\u50a8\u4e8e\u4ee5\u8fdb\u7a0b\u7684 PID \u547d\u540d\u7684\u76ee\u5f55\u4e2d\uff0c\u5373 \/proc\/1234 \u4e2d\u5305\u542b\u7684\u662f PID \u4e3a 1234 \u7684\u8fdb\u7a0b\u7684\u4fe1\u606f\u3002\u6bcf\u4e2a\u8fdb\u7a0b\u76ee\u5f55\u4e2d\u5b58\u5728\u7740\u5404\u79cd\u6587\u4ef6\uff0c\u5b83\u4eec\u53ef\u4ee5\u4f7f\u5f97\u5e94\u7528\u7a0b\u5e8f\u7b80\u5355\u5730\u4e86\u89e3\u8fdb\u7a0b\u7684\u5185\u5b58\u7a7a\u95f4\u3001\u6587\u4ef6\u63cf\u8ff0\u7b26\u5217\u8868\u3001\u6307\u5411\u78c1\u76d8\u4e0a\u7684\u6587\u4ef6\u7684\u7b26\u53f7\u94fe\u63a5\u548c\u5176\u4ed6\u7cfb\u7edf\u4fe1\u606f\u3002lsof \u7a0b\u5e8f\u4f7f\u7528\u8be5\u4fe1\u606f\u548c\u5176\u4ed6\u5173\u4e8e\u5185\u6838\u5185\u90e8\u72b6\u6001\u7684\u4fe1\u606f\u6765\u4ea7\u751f\u5176\u8f93\u51fa\u3002\u6240\u4ee5lsof \u53ef\u4ee5\u663e\u793a\u8fdb\u7a0b\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u548c\u76f8\u5173\u7684\u6587\u4ef6\u540d\u7b49\u4fe1\u606f\u3002\u4e5f\u5c31\u662f\u6211\u4eec\u901a\u8fc7\u8bbf\u95ee\u8fdb\u7a0b\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u53ef\u4ee5\u627e\u5230\u8be5\u6587\u4ef6\u7684\u76f8\u5173\u4fe1\u606f\u3002<\/span><br \/>\n<span style=\"font-size: 16px;line-height: 25px\">3\u3001\u5f53\u7cfb\u7edf\u4e2d\u7684\u67d0\u4e2a\u6587\u4ef6\u88ab\u610f\u5916\u5730\u5220\u9664\u4e86\uff0c\u53ea\u8981\u8fd9\u4e2a\u65f6\u5019\u7cfb\u7edf\u4e2d\u8fd8\u6709\u8fdb\u7a0b\u6b63\u5728\u8bbf\u95ee\u8be5\u6587\u4ef6\uff0c\u90a3\u4e48\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7lsof\u4ece\/proc\u76ee\u5f55\u4e0b\u6062\u590d\u8be5\u6587\u4ef6\u7684\u5185\u5bb9\u3002<\/span><br \/>\n<span style=\"font-size: 16px;line-height: 25px\">\u5047\u8bbe\u5165\u4fb5\u8005\u5c06\/var\/log\/secure\u6587\u4ef6\u5220\u9664\u6389\u4e86\uff0c\u5c1d\u8bd5\u5c06\/var\/log\/secure\u6587\u4ef6\u6062\u590d\u7684\u65b9\u6cd5\u53ef\u4ee5\u53c2\u8003\u5982\u4e0b\uff1a<\/span> <\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">a.\u67e5\u770b\/var\/log\/secure\u6587\u4ef6\uff0c\u53d1\u73b0\u5df2\u7ecf\u6ca1\u6709\u8be5\u6587\u4ef6<\/span><\/p>\n<p style=\"margin: 15px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/c2c6fc266b2ca558a294b93d31098c1d-11.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe11\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe11\" \/><\/p>\n<p style=\"margin: 15px 0.5em 20px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">b.\u4f7f\u7528lsof\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u662f\u5426\u6709\u8fdb\u7a0b\u6253\u5f00\/var\/log\/secure\uff0c<\/span><\/p>\n<p style=\"margin: 15px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/c2c6fc266b2ca558a294b93d31098c1d-12.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe12\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe12\" \/><\/p>\n<p><span style=\"font-size: 16px;line-height: 25px\">c.\u4ece\u4e0a\u9762\u7684\u4fe1\u606f\u53ef\u4ee5\u770b\u5230 PID 1264\uff08rsyslogd\uff09\u6253\u5f00\u6587\u4ef6\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u4e3a4\u3002\u540c\u65f6\u8fd8\u53ef\u4ee5\u770b\u5230\/var\/log\/ secure\u5df2\u7ecf\u6807\u8bb0\u4e3a\u88ab\u5220\u9664\u4e86\u3002\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u5728\/proc\/1264\/fd\/4\uff08fd\u4e0b\u7684\u6bcf\u4e2a\u4ee5\u6570\u5b57\u547d\u540d\u7684\u6587\u4ef6\u8868\u793a\u8fdb\u7a0b\u5bf9\u5e94\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\uff09\u4e2d\u67e5\u770b\u76f8\u5e94\u7684\u4fe1\u606f\uff0c\u5982\u4e0b\uff1a<\/span> <\/p>\n<p style=\"margin: 10px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/c2c6fc266b2ca558a294b93d31098c1d-13.jpg\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe13\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe13\" \/><\/p>\n<p style=\"margin: 10px 0.5em 15px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">d.\u4ece\u4e0a\u9762\u7684\u4fe1\u606f\u53ef\u4ee5\u770b\u51fa\uff0c\u67e5\u770b\/proc\/1264\/fd\/4\u5c31\u53ef\u4ee5\u5f97\u5230\u6240\u8981\u6062\u590d\u7684\u6570\u636e\u3002\u5982\u679c\u53ef\u4ee5\u901a\u8fc7\u6587\u4ef6\u63cf\u8ff0\u7b26\u67e5\u770b\u76f8\u5e94\u7684\u6570\u636e\uff0c\u90a3\u4e48\u5c31\u53ef\u4ee5\u4f7f\u7528I\/O\u91cd\u5b9a\u5411\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u4e2d\uff0c\u5982:<\/span><\/p>\n<p style=\"margin: 10px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/c2c6fc266b2ca558a294b93d31098c1d-14.png\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe14\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe14\" \/><\/p>\n<p style=\"margin: 10px 0.5em 15px;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><span style=\"font-size: 16px;line-height: 25px\">e.\u518d\u6b21\u67e5\u770b\/var\/log\/secure\uff0c\u53d1\u73b0\u8be5\u6587\u4ef6\u5df2\u7ecf\u5b58\u5728\u3002\u5bf9\u4e8e\u8bb8\u591a\u5e94\u7528\u7a0b\u5e8f\uff0c\u5c24\u5176\u662f\u65e5\u5fd7\u6587\u4ef6\u548c\u6570\u636e\u5e93\uff0c\u8fd9\u79cd\u6062\u590d\u5220\u9664\u6587\u4ef6\u7684\u65b9\u6cd5\u975e\u5e38\u6709\u7528\u3002<\/span><\/p>\n<p style=\"margin: 10px 0.5em 0em;letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont,\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/275\/013\/c1da467b5d1782c2f52a72be77c3d95a-15.jpg\" class=\"aligncenter\" title=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe15\" alt=\"Linux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u63d2\u56fe15\" \/><\/p>\n<p><strong><span style=\"font-family: mp-quote, -apple-system-font, BlinkMacSystemFont,\"><strong><span style=\"letter-spacing: 1px\"><br \/><\/span><\/strong><\/span><\/strong><br \/>\n<strong><\/strong><br \/>\n<strong><span style=\"font-family: mp-quote, -apple-system-font, BlinkMacSystemFont,\"><strong><span style=\"letter-spacing: 1px\"><em><\/em><\/span><\/strong><\/span><\/strong> <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fLinux\u2014\u201411\u4e2a\u6b65\u9aa4\u6559\u4f60\u5b8c\u7f8e\u6392\u67e5\u670d\u52a1\u5668\u662f\u5426\u88ab\u5165\u4fb5\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u968f\u7740\u5f00\u6e90\u4ea7\u54c1\u7684\u8d8a\u6765\u8d8a\u76db\u884c\uff0c\u4f5c\u4e3a\u4e00\u4e2aLinux\u8fd0\u7ef4\u5de5\u7a0b\u5e08\uff0c\u80fd\u591f\u6e05\u6670\u5730\u9274\u522b\u5f02\u5e38\u673a\u5668\u662f\u5426\u5df2\u7ecf\u88ab\u5165\u4fb5\u4e86\u663e\u5f97\u81f3\u5173\u91cd\u8981\uff0c\u4e2a\u4eba\u7ed3\u5408\u81ea\u5df1\u7684\u5de5\u4f5c\u7ecf\u5386\uff0c\u6574\u7406\u4e86\u51e0\u79cd\u5e38\u89c1\u7684\u673a\u5668\u88ab\u9ed1\u60c5\u51b5\u4f9b\u53c2\u8003\uff1a \u80cc\u666f\u4fe1\u606f\uff1a\u4ee5\u4e0b\u60c5\u51b5\u662f\u5728CentOS 6.9\u7684\u7cfb\u7edf\u4e2d\u67e5\u770b\u7684\uff0c\u5176\u5b83Linux\u53d1\u884c\u7248\u7c7b\u4f3c\u3002 1 \u5165\u4fb5\u8005\u53ef\u80fd\u4f1a\u5220\u9664\u673a\u5668\u7684\u65e5\u5fd7\u4fe1\u606f \u53ef\u4ee5\u67e5\u770b\u65e5\u5fd7\u4fe1\u606f\u662f\u5426\u8fd8\u5b58\u5728\u6216\u8005\u662f\u5426\u88ab\u6e05\u7a7a\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a 2 \u5165\u4fb5\u8005\u53ef\u80fd\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5b58\u653e\u7528\u6237\u540d\u53ca\u5bc6\u7801\u6587\u4ef6 \u53ef\u4ee5\u67e5\u770b\/etc\/passwd\u53ca\/etc\/shadow\u6587\u4ef6\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a 3 \u5165\u4fb5\u8005\u53ef\u80fd\u4fee\u6539\u7528\u6237\u540d\u53ca\u5bc6\u7801\u6587\u4ef6 \u53ef\u4ee5\u67e5\u770b\/etc\/passwd\u53ca\/etc\/shadow\u6587\u4ef6\u5185\u5bb9\u8fdb\u884c\u9274\u522b\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a 4 \u67e5\u770b\u673a\u5668\u6700\u8fd1\u6210\u529f\u767b\u9646\u7684\u4e8b\u4ef6\u548c\u6700\u540e\u4e00\u6b21\u4e0d\u6210\u529f\u7684\u767b\u9646\u4e8b\u4ef6 \u5bf9\u5e94\u65e5\u5fd7\u201c\/var\/log\/lastlog\u201d\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a 5 \u67e5\u770b\u673a\u5668\u5f53\u524d\u767b\u5f55\u7684\u5168\u90e8\u7528\u6237 \u5bf9\u5e94\u65e5\u5fd7\u6587\u4ef6\u201c\/var\/run\/utmp\u201d\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a 6 \u67e5\u770b\u673a\u5668\u521b\u5efa\u4ee5\u6765\u767b\u9646\u8fc7\u7684\u7528\u6237 \u5bf9\u5e94\u65e5\u5fd7\u6587\u4ef6\u201c\/var\/log\/wtmp\u201d\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a \u53e6\u5916\uff0c\u641c\u7d22\u516c\u4f17\u53f7Linux\u5c31\u8be5\u8fd9\u6837\u5b66\u540e\u53f0\u56de\u590d\u201cgit\u4e66\u7c4d\u201d\uff0c\u83b7\u53d6\u4e00\u4efd\u60ca\u559c\u793c\u5305\u3002 7 \u67e5\u770b\u673a\u5668\u6240\u6709\u7528\u6237\u7684\u8fde\u63a5\u65f6\u95f4\uff08\u5c0f\u65f6\uff09 \u5bf9\u5e94\u65e5\u5fd7\u6587\u4ef6\u201c\/var\/log\/wtmp\u201d\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a 8 \u5982\u679c\u53d1\u73b0\u673a\u5668\u4ea7\u751f\u4e86\u5f02\u5e38\u6d41\u91cf \u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u201ctcpdump\u201d\u6293\u53d6\u7f51\u7edc\u5305\u67e5\u770b\u6d41\u91cf\u60c5\u51b5\u6216\u8005\u4f7f\u7528\u5de5\u5177\u201diperf\u201d\u67e5\u770b\u6d41\u91cf\u60c5\u51b5 9 \u53ef\u4ee5\u67e5\u770b\/var\/log\/secure\u65e5\u5fd7\u6587\u4ef6 \u5c1d\u8bd5\u53d1\u73b0\u5165\u4fb5\u8005\u7684\u4fe1\u606f\uff0c\u76f8\u5173\u547d\u4ee4\u793a\u4f8b\uff1a 10 \u67e5\u8be2\u5f02\u5e38\u8fdb\u7a0b\u6240\u5bf9\u5e94\u7684\u6267\u884c\u811a\u672c\u6587\u4ef6 a.top\u547d\u4ee4\u67e5\u770b\u5f02\u5e38\u8fdb\u7a0b\u5bf9\u5e94\u7684PID b.\u5728\u865a\u62df\u6587\u4ef6\u7cfb\u7edf\u76ee\u5f55\u67e5\u627e\u8be5\u8fdb\u7a0b\u7684\u53ef\u6267\u884c\u6587\u4ef6&nbsp; 11 \u5982\u679c\u786e\u8ba4\u673a\u5668\u5df2\u88ab\u5165\u4fb5\uff0c\u91cd\u8981\u6587\u4ef6\u5df2\u88ab\u5220\u9664\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u627e\u56de\u88ab\u5220\u9664\u7684\u6587\u4ef6Note: 1\u3001\u5f53\u8fdb\u7a0b\u6253\u5f00\u4e86\u67d0\u4e2a\u6587\u4ef6\u65f6\uff0c\u53ea\u8981\u8be5\u8fdb\u7a0b\u4fdd\u6301\u6253\u5f00\u8be5\u6587\u4ef6\uff0c\u5373\u4f7f\u5c06\u5176\u5220\u9664\uff0c\u5b83\u4f9d\u7136\u5b58\u5728\u4e8e\u78c1\u76d8\u4e2d\u3002\u8fd9\u610f\u5473\u7740\uff0c\u8fdb\u7a0b\u5e76\u4e0d\u77e5\u9053\u6587\u4ef6\u5df2\u7ecf\u88ab\u5220\u9664\uff0c\u5b83\u4ecd\u7136\u53ef\u4ee5\u5411\u6253\u5f00\u8be5\u6587\u4ef6\u65f6\u63d0\u4f9b\u7ed9\u5b83\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u8fdb\u884c\u8bfb\u53d6\u548c\u5199\u5165\u3002\u9664\u4e86\u8be5\u8fdb\u7a0b\u4e4b\u5916\uff0c\u8fd9\u4e2a\u6587\u4ef6\u662f\u4e0d\u53ef\u89c1\u7684\uff0c\u56e0\u4e3a\u5df2\u7ecf\u5220\u9664\u4e86\u5176\u76f8\u5e94\u7684\u76ee\u5f55\u7d22\u5f15\u8282\u70b9\u3002 2\u3001\u5728\/proc \u76ee\u5f55\u4e0b\uff0c\u5176\u4e2d\u5305\u542b\u4e86\u53cd\u6620\u5185\u6838\u548c\u8fdb\u7a0b\u6811\u7684\u5404\u79cd\u6587\u4ef6\u3002\/proc\u76ee\u5f55\u6302\u8f7d\u7684\u662f\u5728\u5185\u5b58\u4e2d\u6240\u6620\u5c04\u7684\u4e00\u5757\u533a\u57df\uff0c\u6240\u4ee5\u8fd9\u4e9b\u6587\u4ef6\u548c\u76ee\u5f55\u5e76\u4e0d\u5b58\u5728\u4e8e\u78c1\u76d8\u4e2d\uff0c\u56e0\u6b64\u5f53\u6211\u4eec\u5bf9\u8fd9\u4e9b\u6587\u4ef6\u8fdb\u884c\u8bfb\u53d6\u548c\u5199\u5165\u65f6\uff0c\u5b9e\u9645\u4e0a\u662f\u5728\u4ece\u5185\u5b58\u4e2d\u83b7\u53d6\u76f8\u5173\u4fe1\u606f\u3002\u5927\u591a\u6570\u4e0e lsof \u76f8\u5173\u7684\u4fe1\u606f\u90fd\u5b58\u50a8\u4e8e\u4ee5\u8fdb\u7a0b\u7684 PID \u547d\u540d\u7684\u76ee\u5f55\u4e2d\uff0c\u5373 \/proc\/1234 \u4e2d\u5305\u542b\u7684\u662f PID \u4e3a 1234 \u7684\u8fdb\u7a0b\u7684\u4fe1\u606f\u3002\u6bcf\u4e2a\u8fdb\u7a0b\u76ee\u5f55\u4e2d\u5b58\u5728\u7740\u5404\u79cd\u6587\u4ef6\uff0c\u5b83\u4eec\u53ef\u4ee5\u4f7f\u5f97\u5e94\u7528\u7a0b\u5e8f\u7b80\u5355\u5730\u4e86\u89e3\u8fdb\u7a0b\u7684\u5185\u5b58\u7a7a\u95f4\u3001\u6587\u4ef6\u63cf\u8ff0\u7b26\u5217\u8868\u3001\u6307\u5411\u78c1\u76d8\u4e0a\u7684\u6587\u4ef6\u7684\u7b26\u53f7\u94fe\u63a5\u548c\u5176\u4ed6\u7cfb\u7edf\u4fe1\u606f\u3002lsof \u7a0b\u5e8f\u4f7f\u7528\u8be5\u4fe1\u606f\u548c\u5176\u4ed6\u5173\u4e8e\u5185\u6838\u5185\u90e8\u72b6\u6001\u7684\u4fe1\u606f\u6765\u4ea7\u751f\u5176\u8f93\u51fa\u3002\u6240\u4ee5lsof \u53ef\u4ee5\u663e\u793a\u8fdb\u7a0b\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u548c\u76f8\u5173\u7684\u6587\u4ef6\u540d\u7b49\u4fe1\u606f\u3002\u4e5f\u5c31\u662f\u6211\u4eec\u901a\u8fc7\u8bbf\u95ee\u8fdb\u7a0b\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u53ef\u4ee5\u627e\u5230\u8be5\u6587\u4ef6\u7684\u76f8\u5173\u4fe1\u606f\u3002 3\u3001\u5f53\u7cfb\u7edf\u4e2d\u7684\u67d0\u4e2a\u6587\u4ef6\u88ab\u610f\u5916\u5730\u5220\u9664\u4e86\uff0c\u53ea\u8981\u8fd9\u4e2a\u65f6\u5019\u7cfb\u7edf\u4e2d\u8fd8\u6709\u8fdb\u7a0b\u6b63\u5728\u8bbf\u95ee\u8be5\u6587\u4ef6\uff0c\u90a3\u4e48\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7lsof\u4ece\/proc\u76ee\u5f55\u4e0b\u6062\u590d\u8be5\u6587\u4ef6\u7684\u5185\u5bb9\u3002 \u5047\u8bbe\u5165\u4fb5\u8005\u5c06\/var\/log\/secure\u6587\u4ef6\u5220\u9664\u6389\u4e86\uff0c\u5c1d\u8bd5\u5c06\/var\/log\/secure\u6587\u4ef6\u6062\u590d\u7684\u65b9\u6cd5\u53ef\u4ee5\u53c2\u8003\u5982\u4e0b\uff1a a.\u67e5\u770b\/var\/log\/secure\u6587\u4ef6\uff0c\u53d1\u73b0\u5df2\u7ecf\u6ca1\u6709\u8be5\u6587\u4ef6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-16614","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/16614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=16614"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/16614\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=16614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=16614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=16614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}