{"id":294546,"date":"2024-11-25T12:10:40","date_gmt":"2024-11-25T04:10:40","guid":{"rendered":"https:\/\/lrxjmw.cn\/lxtglpmlzkjc.html"},"modified":"2024-11-25T12:10:40","modified_gmt":"2024-11-25T04:10:40","slug":"lxtglpmlzkjc","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lxtglpmlzkjc.html","title":{"rendered":"Linux\u7cfb\u7edf\u7ba1\u7406\uff1aps\u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b\u7684\u7528\u6cd5\u4e0e\u91cd\u8981\u6027"},"content":{"rendered":"

Linux<\/a>\u7cfb\u7edf\u7ba1\u7406\u4e2d\uff0cps\u547d\u4ee4<\/a>\u662f\u67e5\u770b\u8fdb\u7a0b\u7684\u5173\u952e\u5de5\u5177\u3002\u5b83\u4f7f\u6211\u4eec\u80fd\u6e05\u695a\u4e86\u89e3\u7cfb\u7edf\u5185\u8fd0\u884c\u8fdb\u7a0b\u7684\u72b6\u6001\uff0c\u5305\u62ec\u8fdb\u7a0b\u7684\u7528\u6237\u3001\u8fdb\u7a0bID\u3001\u4f7f\u7528\u7684CPU\u548c\u5185\u5b58\u7b49\u91cd\u8981\u4fe1\u606f\u3002\u638c\u63e1ps\u547d\u4ee4\u7684\u4f7f\u7528\uff0c\u80fd\u5e2e\u52a9\u6211\u4eec\u6709\u6548\u76d1\u63a7\u7cfb\u7edf\u8fd0\u884c\u3001\u6392\u67e5\u95ee\u9898\u4ee5\u53ca\u7ba1\u7406\u8d44\u6e90\u3002<\/p>\n

ps\u547d\u4ee4\u7684\u57fa\u672c\u683c\u5f0f<\/b><\/p>\n

ps\u547d\u4ee4\u5355\u72ec\u4f7f\u7528\u65f6\uff0c\u4f1a\u5c55\u793a\u4e0e\u5f53\u524d\u7ec8\u7aef\u76f8\u5173\u7684\u8fdb\u7a0b\u4fe1\u606f\u3002\u8fd9\u4e9b\u4fe1\u606f\u76f8\u5bf9\u7b80\u660e\uff0c\u4e3b\u8981\u5305\u62ec\u8fdb\u7a0b\u7684PID\u3001TTY\u3001TIME\u548cCMD\u7b49\u8981\u7d20\u3002\u4ee5\u8fd9\u79cd\u6700\u7b80\u5f62\u5f0f\uff0c\u6709\u65f6\u80fd\u8fc5\u901f\u4e86\u89e3\u5f53\u524d\u7ec8\u7aef\u6b63\u5728\u6267\u884c\u7684\u4efb\u52a1\u3002\u6bd4\u5982\uff0c\u4f60\u5728\u547d\u4ee4\u884c\u6267\u884c\u67d0\u9879\u4efb\u52a1\uff0c\u60f3\u67e5\u770b\u8be5\u4efb\u52a1\u7684\u8fdb\u7a0bPID\uff0c\u53ea\u9700\u76f4\u63a5\u4f7f\u7528ps\u547d\u4ee4\u5373\u53ef\u3002\u6b64\u5916\uff0cps\u547d\u4ee4\u8fd8\u6709\u5176\u4ed6\u53c2\u6570\u5f62\u5f0f\uff0c\u5982ps-ef\uff0c\u5b83\u80fd\u663e\u793a\u66f4\u8be6\u5c3d\u7684\u8fdb\u7a0b\u4fe1\u606f\uff0c\u5305\u62ec\u6bcf\u4e2a\u8fdb\u7a0b\u7684\u542f\u52a8\u547d\u4ee4\u5168\u540d\u3001\u6240\u5c5e\u7528\u6237\u7b49\uff0c\u8fd9\u5728\u591a\u7528\u6237\u73af\u5883\u6216\u590d\u6742\u7684\u591a\u4efb\u52a1\u7cfb\u7edf\u4e2d\u6392\u67e5\u95ee\u9898\u65f6\u5c24\u4e3a\u5b9e\u7528\u3002<\/p>\n

ps\u547d\u4ee4\u5728\u6545\u969c\u6392\u67e5\u4e2d\u626e\u6f14\u7740\u81f3\u5173\u91cd\u8981\u7684\u89d2\u8272\u3002\u6bd4\u5982\uff0c\u5f53\u7cfb\u7edf\u8fd0\u884c\u901f\u5ea6\u7a81\u7136\u4e0b\u964d\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7\u6267\u884cps-aux\u547d\u4ee4\u6765\u67e5\u770b\u6240\u6709\u7528\u6237\u8fdb\u7a0b\u53ca\u5176\u8d44\u6e90\u5360\u7528\u60c5\u51b5\u3002\u901a\u8fc7\u5206\u6790\u90a3\u4e9b\u5360\u7528CPU\u6216\u5185\u5b58\u8d44\u6e90\u8fc7\u9ad8\u7684\u8fdb\u7a0b\uff0c\u6211\u4eec\u80fd\u591f\u627e\u51fa\u5bfc\u81f4\u7cfb\u7edf\u53d8\u6162\u7684\u771f\u6b63\u539f\u56e0\u3002\u6709\u65f6\uff0c\u67d0\u4e2a\u7a0b\u5e8f\u56e0\u5185\u5b58\u6cc4\u6f0f\u800c\u51fa\u73b0\u95ee\u9898\uff0cps\u547d\u4ee4\u4fbf\u80fd\u5e2e\u52a9\u6211\u4eec\u8fc5\u901f\u5b9a\u4f4d\u5230\u5f02\u5e38\u7684\u8fdb\u7a0b\uff0c\u5e76\u786e\u5b9a\u9700\u8981\u8c03\u6574\u548c\u4f18\u5316\u7684\u7a0b\u5e8f\u3002<\/p>\n

linux ps \u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b_linux\u67e5\u770b\u8fdb\u7a0b\u547d\u4ee4\u884c_\u67e5\u770b\u8fdb\u7a0b\u547d\u4ee4linux<\/p>\n

\u5e38\u7528\u53c2\u6570\u89e3\u6790<\/b><\/p>\n

ps-a\u53c2\u6570\u7528\u6765\u5c55\u793a\u6240\u6709\u7ec8\u7aef\u4e2d\u8fd0\u884c\u7684\u7a0b\u5e8flinux\u4f0a\u7538\u56ed\uff0c\u4f46\u4e0d\u5305\u62ec\u9636\u6bb5\u4f5c\u4e1a\u7684\u7ba1\u7406\u8005\u3002\u8fd9\u6837\u7684\u529f\u80fd\u8ba9\u6211\u4eec\u80fd\u5168\u9762\u4e86\u89e3\u7cfb\u7edf\u5185\u5404\u7ec8\u7aef\u7684\u8fdb\u7a0b\u60c5\u51b5\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5f53\u524d\u7ec8\u7aef\u7684\u6d41\u7a0b\u3002\u6bd4\u5982\uff0c\u5728\u591a\u7528\u6237\u591a\u7ec8\u7aef\u7684\u7cfb\u7edf\u4e2d\uff0c\u7528\u5b83\u6765\u67e5\u770b\u975e\u4e3b\u8981\u4efb\u52a1\u7684\u7ec8\u7aef\u4efb\u52a1\u5c31\u5341\u5206\u5b9e\u7528\u3002\u81f3\u4e8eps-u\u53c2\u6570\uff0c\u5b83\u5219\u7528\u4e8e\u663e\u793a\u7279\u5b9a\u7528\u6237\u7684\u6240\u6709\u8fdb\u7a0b\u3002\u5f53\u4f60\u9700\u8981\u8c03\u67e5\u67d0\u4eba\u662f\u5426\u5f71\u54cd\u4e86\u7cfb\u7edf\u8fd0\u884clinux ps \u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b<\/strong>\uff0c\u6216\u8005\u8981\u68c0\u67e5\u7279\u5b9a\u7528\u6237\u7684\u5de5\u4f5c\u4efb\u52a1\u5360\u7528\u4e86\u591a\u5c11\u8d44\u6e90\u65f6\uff0c\u4f7f\u7528ps-u\u53c2\u6570\u4f1a\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n

ps-x\u53c2\u6570\u7684\u529f\u80fd\u662f\u5c55\u793a\u90a3\u4e9b\u6ca1\u6709\u63a7\u5236\u7ec8\u7aef\u7684\u8fdb\u7a0b\uff0c\u8fd9\u5bf9\u4e8e\u89c2\u5bdf\u90a3\u4e9b\u5728\u540e\u53f0\u6084\u65e0\u58f0\u606f\u8fd0\u884c\u7684\u7a0b\u5e8f\u975e\u5e38\u6709\u7528\uff0c\u5c24\u5176\u662f\u90a3\u4e9b\u7cfb\u7edf\u7ea7\u7684\u5b88\u62a4\u7a0b\u5e8f\u3002\u5728\u73b0\u5b9e\u751f\u6d3b\u4e2d\uff0c\u7f51\u7edc\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u4f1a\u6709\u4e00\u4e9b\u540e\u53f0\u8fdb\u7a0b\uff0c\u5b83\u4eec\u6301\u7eed\u8fdb\u884c\u4fe1\u606f\u4ea4\u6362\u3001\u7f51\u7edc\u76d1\u63a7\u7b49\u5de5\u4f5c\uff0c\u800c\u4f7f\u7528ps-x\u547d\u4ee4\uff0c\u6211\u4eec\u5c31\u80fd\u5c06\u8fd9\u4e9b\u8fdb\u7a0b\u6e05\u6670\u5730\u5c55\u73b0\u51fa\u6765\u3002<\/p>\n

linux\u67e5\u770b\u8fdb\u7a0b\u547d\u4ee4\u884c_linux ps \u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b_\u67e5\u770b\u8fdb\u7a0b\u547d\u4ee4linux<\/p>\n

\u8f93\u51fa\u4fe1\u606f\u89e3\u8bfb<\/b><\/p>\n

\u4f7f\u7528ps-ef\u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b\u4fe1\u606f\u65f6\uff0c\u4f1a\u53d1\u73b0\u4f17\u591a\u5b57\u6bb5\u3002\u5176\u4e2d\uff0cUID\u5b57\u6bb5\u6807\u8bc6\u8fdb\u7a0b\u6240\u5c5e\u7528\u6237\u7684\u552f\u4e00\u6807\u8bc6\u3002\u901a\u8fc7\u8fd9\u4e2a\u5b57\u6bb5\uff0c\u6211\u4eec\u53ef\u4ee5\u5224\u65ad\u8fdb\u7a0b\u662f\u7531\u54ea\u4e2a\u7528\u6237\u542f\u52a8\u7684\uff0c\u8fd9\u5728\u8fdb\u884c\u5b89\u5168\u5ba1\u8ba1\u6216\u6392\u67e5\u6743\u9650\u95ee\u9898\u65f6\u5c24\u4e3a\u5173\u952e\u3002\u6b64\u5916linux ps \u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b<\/strong>\uff0c\u8fd8\u6709\u4e00\u4e2a\u91cd\u8981\u7684\u5b57\u6bb5STIME\uff0c\u5b83\u8bb0\u5f55\u4e86\u8fdb\u7a0b\u542f\u52a8\u7684\u5177\u4f53\u65f6\u95f4\u3002\u901a\u8fc7\u5206\u6790\u8fd9\u4e2a\u65f6\u95f4\uff0c\u6211\u4eec\u53ef\u4ee5\u63a8\u7b97\u51fa\u8fdb\u7a0b\u7684\u8fd0\u884c\u65f6\u957f\uff0c\u8fd9\u5bf9\u4e8e\u8bc4\u4f30\u8fdb\u7a0b\u7684\u7a33\u5b9a\u6027\u7b49\u65b9\u9762\u5927\u6709\u88e8\u76ca\u3002<\/p>\n

\u540c\u6837\uff0c\u89c2\u5bdfps-aux\u7684\u8f93\u51fa\uff0c\u53ef\u4ee5\u770b\u5230%CPU\u548c%MEM\u5b57\u6bb5\u5206\u522b\u4ee3\u8868\u8fdb\u7a0b\u4f7f\u7528\u7684CPU\u548c\u5185\u5b58\u7684\u767e\u5206\u6bd4\u3002\u5f53\u7cfb\u7edf\u8d44\u6e90\u7d27\u5f20\uff0c\u6bd4\u5982CPU\u8d1f\u8377\u8fc7\u91cd\u6216\u5185\u5b58\u4e0d\u8db3\u65f6\uff0c\u53ea\u9700\u67e5\u770b\u8fd9\u4e24\u4e2a\u5b57\u6bb5\uff0c\u4fbf\u80fd\u8fc5\u901f\u5b9a\u4f4d\u5230\u5360\u7528\u8d44\u6e90\u6700\u591a\u7684\u8fdb\u7a0b\u3002\u636e\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u8003\u8651\u5bf9\u8fd9\u4e00\u8fdb\u7a0b\u5b9e\u65bd\u9650\u5236\u6216\u4f18\u5316\u63aa\u65bd\u3002<\/p>\n

\u67e5\u770b\u8fdb\u7a0b\u547d\u4ee4linux_linux ps \u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b_linux\u67e5\u770b\u8fdb\u7a0b\u547d\u4ee4\u884c<\/p>\n

ps\u547d\u4ee4\u4e0e\u5176\u4ed6\u547d\u4ee4\u7ed3\u5408\u4f7f\u7528<\/b><\/p>\n

ps\u547d\u4ee4\u4e0egrep\u547d\u4ee4\u7684\u642d\u914d\u4f7f\u7528\u975e\u5e38\u666e\u904d\u3002\u4e3e\u4f8b\u6765\u8bf4\uff0c\u82e5\u8981\u5bfb\u627e\u67d0\u4e2a\u7279\u5b9a\u540d\u5b57\u7684\u8fdb\u7a0b\uff0c\u6211\u4eec\u53ef\u4ee5\u91c7\u7528ps-ef|grepprocess_name\u7684\u547d\u4ee4\u683c\u5f0f\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u80fd\u591f\u8fc5\u901f\u5224\u65ad\u7cfb\u7edf\u5185\u662f\u5426\u5b58\u5728\u8be5\u540d\u79f0\u7684\u8fdb\u7a0b\u6b63\u5728\u8fd0\u884c\u3002\u5728\u590d\u6742\u7684\u670d\u52a1\u73af\u5883\u4e2d\uff0c\u8fd9\u79cd\u65b9\u6cd5\u5c24\u5176\u6709\u52a9\u4e8e\u5feb\u901f\u9501\u5b9a\u5bf9\u5e94\u670d\u52a1\u7684\u8fdb\u7a0b\u3002<\/p>\n

ps\u4e0ekill\u547d\u4ee4\u5e38\u5e38\u642d\u914d\u4f7f\u7528\u3002\u9047\u5230\u65e0\u7528\u7684\u6216\u51fa\u9519\u7684\u8fdb\u7a0b\uff0c\u6211\u4eec\u9996\u5148\u7528ps-ef\u547d\u4ee4\u67e5\u627e\u5176\u8fdb\u7a0bID\uff08PID\uff09\u3002\u968f\u540e\uff0c\u4fbf\u53ef\u4ee5\u7528kill-9PID\u547d\u4ee4\u5f3a\u5236\u7ed3\u675f\u8be5\u8fdb\u7a0b\u3002\u8fd9\u79cd\u505a\u6cd5\u5728\u8fdb\u7a0b\u6545\u969c\uff0c\u65e0\u6cd5\u6b63\u5e38\u5173\u95ed\u65f6\u5c24\u4e3a\u6709\u6548\u3002<\/p>\n

\u67e5\u770b\u8fdb\u7a0b\u547d\u4ee4linux_linux\u67e5\u770b\u8fdb\u7a0b\u547d\u4ee4\u884c_linux ps \u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b<\/p>\n

\u8fdb\u7a0b\u72b6\u6001\u5206\u7c7b<\/b><\/p>\n

PS\u8f93\u51fa\u7ed3\u679c\u4f1a\u663e\u793a\u8fdb\u7a0b\u7684\u72b6\u6001\u4fe1\u606f\u3002\u5728\u4f17\u591a\u72b6\u6001\u4e2d\uff0cR\u72b6\u6001\u6307\u7684\u662f\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\uff0c\u5b83\u4eec\u6b63\u5728\u88abCPU\u5904\u7406\u5e76\u5360\u7528\u8d44\u6e90\u3002\u800cS\u72b6\u6001\uff0c\u5373\u7761\u7720\u72b6\u6001\uff0c\u610f\u5473\u7740\u8fdb\u7a0b\u6b63\u5728\u7b49\u5f85\u67d0\u4e2a\u4e8b\u4ef6\u7684\u53d1\u751f\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u5904\u4e8eS\u72b6\u6001\u7684\u8fdb\u7a0b\u662f\u6682\u65f6\u505c\u6b62\u8fd0\u884c\u7684\uff0c\u4f46\u5b83\u53ef\u4ee5\u968f\u65f6\u88ab\u5524\u9192\uff0c\u7ee7\u7eed\u6267\u884c\u4efb\u52a1\u3002\u5728\u5206\u6790\u7cfb\u7edf\u6027\u80fd\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u89c2\u5bdf\u8fd9\u4e9b\u72b6\u6001\u6765\u8bc4\u4f30\u8fdb\u7a0b\u662f\u5426\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n

\u72b6\u6001\u4e3aZ\uff0c\u610f\u5473\u7740\u662f\u50f5\u5c38\u8fdb\u7a0b\u3002\u8fd9\u79cd\u72b6\u6001\u5c5e\u4e8e\u7279\u6b8a\u8fdb\u7a0b\uff0c\u56e0\u5b50\u8fdb\u7a0b\u7ed3\u675f\u800c\u7236\u8fdb\u7a0b\u672a\u6e05\u7406\u6240\u81f4\u3002\u50f5\u5c38\u8fdb\u7a0b\u4f1a\u8017\u8d39\u7cfb\u7edf\u8d44\u6e90\uff0c\u8fd8\u53ef\u80fd\u5f71\u54cd\u7cfb\u7edf\u7a33\u5b9a\u6027\u3002\u4e00\u65e6\u53d1\u73b0\u5904\u4e8e\u6b64\u72b6\u6001\u7684\u8fdb\u7a0b\uff0c\u5e94\u53ca\u65f6\u5904\u7406\u3002<\/p>\n

\u67e5\u770b\u8fdb\u7a0b\u547d\u4ee4linux_linux ps \u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b_linux\u67e5\u770b\u8fdb\u7a0b\u547d\u4ee4\u884c<\/p>\n

\u6211\u60f3\u8bf7\u6559\u5927\u5bb6\uff0c\u5728\u4f7f\u7528Linux\u7684\u8fc7\u7a0b\u4e2dlinux\u5d4c\u5165\u5f0f\u5f00\u53d1\uff0c\u662f\u5426\u66fe\u906d\u9047\u8fc7\u56e0\u8fdb\u7a0b\u95ee\u9898\u5f15\u53d1\u7684\u7cfb\u7edf\u6545\u969c\uff1f\u671f\u5f85\u5927\u5bb6\u7684\u70ed\u60c5\u53c2\u4e0e\uff0c\u6b22\u8fce\u7559\u8a00\u4ea4\u6d41\uff0c\u540c\u65f6\u4e5f\u8bf7\u5927\u5bb6\u70b9\u8d5e\u5e76\u8f6c\u53d1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Linux\u7cfb\u7edf\u7ba1\u7406\u4e2d\uff0cps\u547d\u4ee4\u662f\u67e5\u770b\u8fdb\u7a0b\u7684\u5173\u952e\u5de5\u5177\u3002\u6b64\u5916\uff0cps\u547d\u4ee4\u8fd8\u6709\u5176\u4ed6\u53c2\u6570\u5f62\u5f0f\uff0c\u5982ps-ef\uff0c\u5b83\u80fd\u663e\u793a\u66f4\u8be6\u5c3d\u7684\u8fdb\u7a0b\u4fe1\u606f\uff0c\u5305\u62ec\u6bcf\u4e2a\u8fdb\u7a0b\u7684\u542f\u52a8\u547d\u4ee4\u5168\u540d\u3001\u6240\u5c5e\u7528\u6237\u7b49\uff0c\u8fd9\u5728\u591a\u7528\u6237\u73af\u5883\u6216\u590d\u6742\u7684\u591a\u4efb\u52a1\u7cfb\u7edf\u4e2d\u6392\u67e5\u95ee\u9898\u65f6\u5c24\u4e3a\u5b9e\u7528\u3002ps-a\u53c2\u6570\u7528\u6765\u5c55\u793a\u6240\u6709\u7ec8\u7aef\u4e2d\u8fd0\u884c\u7684\u7a0b\u5e8f\uff0c\u4f46\u4e0d\u5305\u62ec\u9636\u6bb5\u4f5c\u4e1a\u7684\u7ba1\u7406\u8005\u3002<\/p>\n","protected":false},"author":1,"featured_media":294547,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[4442,4443,4445,4446,4444],"class_list":["post-294546","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-lxtgl","tag-pml-2","tag-zkjc","tag-ztxx","tag-jcxx-2"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/294546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=294546"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/294546\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/294547"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=294546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=294546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=294546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}