{"id":1121,"date":"2024-04-17T11:57:09","date_gmt":"2024-04-17T02:57:09","guid":{"rendered":"https:\/\/shinke1987.net\/?p=1121"},"modified":"2024-04-17T11:57:09","modified_gmt":"2024-04-17T02:57:09","slug":"oom-killer%e3%81%8c%e5%8b%95%e3%81%84%e3%81%a6%e3%81%84%e3%82%8b%e3%81%ae%e3%81%a7%e3%82%b9%e3%83%af%e3%83%83%e3%83%97%e9%a0%98%e5%9f%9f%e8%bf%bd%e5%8a%a0","status":"publish","type":"post","link":"https:\/\/shinke1987.net\/?p=1121","title":{"rendered":"OOM Killer\u304c\u52d5\u3044\u3066\u3044\u308b\u306e\u3067\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u8ffd\u52a0"},"content":{"rendered":"\n<h2 id=\"toc0\" class=\"wp-block-heading\">\u76ee\u7684<\/h2>\n\n\n\n<p>dnf list\u7b49\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u5f37\u5236\u7d42\u4e86\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n\n\n\n<p>dnf\u30b3\u30de\u30f3\u30c9\u3092\u6b63\u5e38\u306b\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u78ba\u8a8d\u3059\u308b\u3068\u3001\u30e1\u30e2\u30ea\u3068\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u304c\u8db3\u308a\u306a\u3044\u306e\u3067OOM Killer\u304c\u52d5\u3044\u3066\u3044\u305f\u3002<\/p>\n\n\n\n<p>\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u3092\u5897\u3084\u3059\u3053\u3068\u3067OOM Killer\u304c\u52d5\u304b\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n\n\n\n<h2 id=\"toc1\" class=\"wp-block-heading\">\u74b0\u5883<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ cat \/etc\/redhat-release\n&gt; Rocky Linux release 9.3 (Blue Onyx)\n<\/pre><\/div>\n\n\n<h2 id=\"toc2\" class=\"wp-block-heading\">OOM Killer \u306e\u6982\u8981<\/h2>\n\n\n\n<p>OOM Killer = Out Of Memory Killer<\/p>\n\n\n\n<p>\u30e1\u30e2\u30ea\u304c\u67af\u6e07\u3057\u305f\u5834\u5408\u3001\u30d7\u30ed\u30bb\u30b9\u3092\u5f37\u5236\u7d42\u4e86\u3055\u305b\u3066\u30e1\u30e2\u30ea\u78ba\u4fdd\u3092\u884c\u3046\u4ed5\u7d44\u307f\u3002<\/p>\n\n\n\n<h2 id=\"toc3\" class=\"wp-block-heading\">\u30ed\u30b0\u306e\u78ba\u8a8d<\/h2>\n\n\n\n<p>\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo grep &#039;Killed&#039; \/var\/log\/message\n<\/pre><\/div>\n\n\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30ed\u30b0\u304c\u3042\u308c\u3070\u3001OOM Killer\u304c\u52d5\u3044\u3066\u3044\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nApr 17 10:47:28 srv kernel: Out of memory: Killed process 261831 (dnf) total-vm:695628kB, anon-rss:553620kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:1260kB oom_score_adj:0\n<\/pre><\/div>\n\n\n<h2 id=\"toc4\" class=\"wp-block-heading\">\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u306b\u3064\u3044\u3066\u78ba\u8a8d<\/h2>\n\n\n\n<p>\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo swapon --show\n<\/pre><\/div>\n\n\n<p>\u7d50\u679c\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3060\u3063\u305f\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nNAME      TYPE SIZE USED PRIO\n\/swapfile file 256M 229M   -2\n<\/pre><\/div>\n\n\n<p>\u3064\u3044\u3067\u306bfree -lm\u306e\u5b9f\u884c\u7d50\u679c\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3060\u3063\u305f\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n               total        used        free      shared  buff\/cache   available\nMem:             769         331         420           7         138         437\nLow:             769         348         420\nHigh:              0           0           0\nSwap:            255         200          55\n<\/pre><\/div>\n\n\n<h2 id=\"toc5\" class=\"wp-block-heading\">\u63a8\u5968\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u306e\u30b5\u30a4\u30ba<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/access.redhat.com\/documentation\/ja-jp\/red_hat_enterprise_linux\/9\/html\/managing_storage_devices\/recommended-system-swap-space_getting-started-with-swap\">16.2. \u30b7\u30b9\u30c6\u30e0\u306e\u63a8\u5968\u30b9\u30ef\u30c3\u30d7\u9818\u57df Red Hat Enterprise Linux 9 | Red Hat Customer Portal<\/a><\/li>\n<\/ul>\n\n\n\n<p>\u4e0a\u8a18\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\u3059\u308b\u3068\u3001<br>\u30e1\u30e2\u30ea\u9818\u57df\u304c700MB\u307b\u3069\u306a\u306e\u3067\u3068\u308a\u3042\u3048\u305a2GB\u306e\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u306b\u5909\u66f4\u3059\u308b\u3002<\/p>\n\n\n\n<h2 id=\"toc6\" class=\"wp-block-heading\">\u65e2\u5b58\u306e\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u3092\u7121\u52b9\u5316<\/h2>\n\n\n\n<p>\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo swapoff \/swapfile\n<\/pre><\/div>\n\n\n<p>\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u304c\u7121\u52b9\u5316\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo swapon --show \/\/ \u4f55\u3082\u8868\u793a\u3055\u308c\u306a\u3044\u306f\u305a\u3002\n$ sudo free -lm \/\/ Swap\u306etotal\u304c0\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3002\n<\/pre><\/div>\n\n\n<h2 id=\"toc7\" class=\"wp-block-heading\">\u30b9\u30ef\u30c3\u30d7\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210<\/h2>\n\n\n\n<p>\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo dd if=\/dev\/zero of=\/swapfile bs=1M count=2048\n$ sudo mkswap \/swapfile\n<\/pre><\/div>\n\n\n<h2 id=\"toc8\" class=\"wp-block-heading\">\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u3092\u6709\u52b9\u5316<\/h2>\n\n\n\n<p>\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo swapon \/swapfile\n<\/pre><\/div>\n\n\n<p>\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u304c\u6709\u52b9\u5316\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo swapon --show\n$ sudo free -lm\n<\/pre><\/div>\n\n\n<h2 id=\"toc9\" class=\"wp-block-heading\">dnf\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d<\/h2>\n\n\n\n<p>\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ dnf -y list\n<\/pre><\/div>\n\n\n<p>\u5f37\u5236\u7d42\u4e86\u305b\u305a\u306b\u5b9f\u884c\u3067\u304d\u305f\u3053\u3068\u3092\u78ba\u8a8d\u5f8c\u3001free -lm \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u7d50\u679c\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3060\u3063\u305f\u306e\u3067\u3001<br>\u5909\u66f4\u524d\u306e\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u306e\u30b5\u30a4\u30ba\uff08255MB\uff09\u3067\u306f\u8db3\u308a\u306a\u304b\u3063\u305f\u3053\u3068\u304c\u308f\u304b\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n               total        used        free      shared  buff\/cache   available\nMem:             769         320         381           6         188         448\nLow:             769         387         381\nHigh:              0           0           0\nSwap:           2047         263        1784\n<\/pre><\/div>\n\n\n<p>\u305d\u3082\u305d\u3082\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u4f7f\u308f\u306a\u3044\u3088\u3046\u30e1\u30e2\u30ea\u5897\u3084\u3057\u305f\u65b9\u304c\u826f\u3044\u3051\u308c\u3069\u3082\u3001\u4e88\u7b97\u304c\u304c\u304c\u304c\u2026\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u7684 dnf list\u7b49\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u5f37\u5236\u7d42\u4e86\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002 dnf\u30b3\u30de\u30f3\u30c9\u3092\u6b63\u5e38\u306b\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002 \u78ba\u8a8d\u3059\u308b\u3068\u3001\u30e1\u30e2\u30ea\u3068\u30b9\u30ef\u30c3\u30d7\u9818\u57df\u304c\u8db3\u308a\u306a\u3044\u306e\u3067OOM Killer\u304c\u52d5\u3044\u3066\u3044\u305f\u3002 \u30b9\u30ef\u30c3\u30d7\u9818\u57df\u3092\u5897\u3084 [&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":[78],"class_list":["post-1121","post","type-post","status-publish","format-standard","hentry","category-rocky-linux","tag-rockylinux"],"_links":{"self":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1121","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=1121"}],"version-history":[{"count":1,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1121\/revisions"}],"predecessor-version":[{"id":1122,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1121\/revisions\/1122"}],"wp:attachment":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}