{"id":1113,"date":"2024-04-11T12:13:48","date_gmt":"2024-04-11T03:13:48","guid":{"rendered":"https:\/\/shinke1987.net\/?p=1113"},"modified":"2024-04-11T16:53:41","modified_gmt":"2024-04-11T07:53:41","slug":"ps%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e9%96%a2%e9%80%a3%e3%81%ae%e5%82%99%e5%bf%98%e9%8c%b2","status":"publish","type":"post","link":"https:\/\/shinke1987.net\/?p=1113","title":{"rendered":"ps\u30b3\u30de\u30f3\u30c9\u95a2\u9023\u306e\u5099\u5fd8\u9332"},"content":{"rendered":"\n<h2 id=\"toc0\" class=\"wp-block-heading\">Tips<\/h2>\n\n\n\n<h3 id=\"toc1\" class=\"wp-block-heading\">Apache\u3068php-fpm\u3068mariadb\u306e\u60c5\u5831\u8868\u793a<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ ps -FC httpd,php-fpm,mariadbd\n<\/pre><\/div>\n\n\n<h3 id=\"toc2\" class=\"wp-block-heading\">\u5168\u30d7\u30ed\u30bb\u30b9\u306e\u30b3\u30de\u30f3\u30c9\uff08\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\uff09\u306e\u540d\u524d\u3092\u8868\u793a<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ ps -eF c\n<\/pre><\/div>\n\n\n<h3 id=\"toc3\" class=\"wp-block-heading\">\u30d7\u30ed\u30bb\u30b9\u30c4\u30ea\u30fc\u3092\u8868\u793a<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ ps -eF --forest\n<\/pre><\/div>\n\n\n<h3 id=\"toc4\" class=\"wp-block-heading\">\u8868\u793a\u9805\u76ee\uff08\u7269\u7406\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u30e1\u30a4\u30f3\uff09\u3092\u8a2d\u5b9a\u3057\u3066\u8868\u793a<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# \u5168\u3066\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u8868\u793a\u3002\n$ ps -eo args,uname,%cpu,%mem,rss --forest\n\n# httpd\u3068php-fpm\u3068mariadb\u3068postgresql\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u8868\u793a\u3002\n$ ps -o args,uname,%cpu,%mem,rss --forest -C httpd,php-fpm,mariadbd,postgresql\n<\/pre><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>args<br>\u5168\u3066\u306e\u5f15\u6570\u3092\u542b\u3081\u305f\u30b3\u30de\u30f3\u30c9\u3092\u8868\u793a\u3002<\/li>\n\n\n\n<li>uname<br>\u30e6\u30fc\u30b6\u540d\u3002<\/li>\n\n\n\n<li>%cpu<br>CPU\u4f7f\u7528\u7387\u3002<\/li>\n\n\n\n<li>%mem<br>\u30e1\u30e2\u30ea\u4f7f\u7528\u7387\u3002<\/li>\n\n\n\n<li>rss<br>\u30b9\u30ef\u30c3\u30d7\u3067\u306a\u3044\u3001\u4f7f\u7528\u4e2d\u306e\u7269\u7406\u30e1\u30e2\u30ea\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306fKB\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<h3 id=\"toc5\" class=\"wp-block-heading\">\u6307\u5b9a\u3057\u305f\u30b3\u30de\u30f3\u30c9\u306e\u30d7\u30ed\u30bb\u30b9\u306e\u5408\u8a08\u3092\u8868\u793a<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# httpd\u3068php-fpm\u3068mariadb\u306e\u30d7\u30ed\u30bb\u30b9\u306e\u7269\u7406\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306e\u5408\u8a08\u3092KB\u5358\u4f4d\u3067\u8868\u793a\u3002\n\n$ ps h -o comm,uname,%cpu,%mem,rss -C httpd,php-fpm,mariadbd,postgresql | awk &#039;{sum += $5} END {print sum &quot; KB&quot;}&#039;\n<\/pre><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>comm<br>\u5f15\u6570\u3092\u542b\u307e\u306a\u3044\u30b3\u30de\u30f3\u30c9\u540d\u306e\u307f\u8868\u793a\u3002<\/li>\n<\/ul>\n\n\n\n<h2 id=\"toc6\" class=\"wp-block-heading\">ps -eF \u3067\u306e\u8868\u793a\u9805\u76ee\u307e\u3068\u3081<\/h2>\n\n\n\n<h3 id=\"toc7\" class=\"wp-block-heading\">UID<\/h3>\n\n\n\n<p>\u30e6\u30fc\u30b6ID<\/p>\n\n\n\n<h3 id=\"toc8\" class=\"wp-block-heading\">PID<\/h3>\n\n\n\n<p>\u30d7\u30ed\u30bb\u30b9ID<\/p>\n\n\n\n<h3 id=\"toc9\" class=\"wp-block-heading\">PPID<\/h3>\n\n\n\n<p>\u89aa\u30d7\u30ed\u30bb\u30b9ID<\/p>\n\n\n\n<h3 id=\"toc10\" class=\"wp-block-heading\">C<\/h3>\n\n\n\n<p>\u30d7\u30ed\u30bb\u30c3\u30b5\u4f7f\u7528\u7387<\/p>\n\n\n\n<h3 id=\"toc11\" class=\"wp-block-heading\">SZ<\/h3>\n\n\n\n<p>\u30d7\u30ed\u30bb\u30b9\u306e\u30b3\u30a2\u30a4\u30e1\u30fc\u30b8\u306e\u7269\u7406\u30da\u30fc\u30b8\u306e\u30b5\u30a4\u30ba<\/p>\n\n\n\n<h3 id=\"toc12\" class=\"wp-block-heading\">RSS<\/h3>\n\n\n\n<p>\u30b9\u30ef\u30c3\u30d7\u3067\u306a\u3044\u3001\u4f7f\u7528\u4e2d\u306e\u7269\u7406\u30e1\u30e2\u30ea\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306fKB\uff09<\/p>\n\n\n\n<h3 id=\"toc13\" class=\"wp-block-heading\">PSR<\/h3>\n\n\n\n<p>\u30d7\u30ed\u30bb\u30b9\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u3044\u308b\u30d7\u30ed\u30bb\u30c3\u30b5<\/p>\n\n\n\n<h3 id=\"toc14\" class=\"wp-block-heading\">STIME<\/h3>\n\n\n\n<p>\u30d7\u30ed\u30bb\u30b9\u304c\u958b\u59cb\u3057\u305f\u6642\u9593\u307e\u305f\u306f\u65e5\u4ed8<\/p>\n\n\n\n<h3 id=\"toc15\" class=\"wp-block-heading\">TTY<\/h3>\n\n\n\n<p>\u6a19\u6e96\u5165\u529b\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u30bf\u30fc\u30df\u30ca\u30eb<\/p>\n\n\n\n<h3 id=\"toc16\" class=\"wp-block-heading\">TIME<\/h3>\n\n\n\n<p>\u7d2f\u7a4d\u3055\u308c\u305fCPU\u4f7f\u7528\u6642\u9593<\/p>\n\n\n\n<h3 id=\"toc17\" class=\"wp-block-heading\">CMD<\/h3>\n\n\n\n<p>\u30b3\u30de\u30f3\u30c9\u540d\uff08\u5f15\u6570\u3092\u542b\u307e\u306a\u3044\uff09\uff08\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u307f\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tips Apache\u3068php-fpm\u3068mariadb\u306e\u60c5\u5831\u8868\u793a \u5168\u30d7\u30ed\u30bb\u30b9\u306e\u30b3\u30de\u30f3\u30c9\uff08\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\uff09\u306e\u540d\u524d\u3092\u8868\u793a \u30d7\u30ed\u30bb\u30b9\u30c4\u30ea\u30fc\u3092\u8868\u793a \u8868\u793a\u9805\u76ee\uff08\u7269\u7406\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u30e1\u30a4\u30f3\uff09\u3092\u8a2d\u5b9a\u3057\u3066\u8868\u793a \u6307\u5b9a\u3057\u305f\u30b3\u30de\u30f3\u30c9\u306e\u30d7\u30ed\u30bb\u30b9\u306e\u5408 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77],"tags":[32,42,103,78],"class_list":{"0":"post-1113","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-rocky-linux","7":"tag-apache","9":"tag-ps","10":"tag-rockylinux"},"_links":{"self":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1113"}],"version-history":[{"count":3,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1113\/revisions"}],"predecessor-version":[{"id":1119,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1113\/revisions\/1119"}],"wp:attachment":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}