{"id":2881,"date":"2020-12-07T00:02:07","date_gmt":"2020-12-06T15:02:07","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=2881"},"modified":"2020-12-07T00:59:45","modified_gmt":"2020-12-06T15:59:45","slug":"do-your-best-to-control-the-temperature-of-raspberry-pi-with-softwar","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2020\/12\/07\/do-your-best-to-control-the-temperature-of-raspberry-pi-with-softwar\/","title":{"rendered":"Raspberry Pi \u306e\u6e29\u5ea6\u7ba1\u7406\u3092\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u9811\u5f35\u308b"},"content":{"rendered":"<div id=\"preamble\">\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>\u3053\u306e\u8a18\u4e8b\u306f<a href=\"https:\/\/qiita.com\/advent-calendar\/2020\/akbrobot\">\u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8 Advent Calendar 2020<\/a> \u306e12\/07\u5206\u306e\u8a18\u4e8b\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u5185\u5bb9\u306f <a href=\"https:\/\/akbrobot.connpass.com\/event\/187674\/\">\u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8 \u7b2c96\u56de\u52c9\u5f37\u4f1a<\/a> \u3067\u767a\u8868\u3057\u305f\u5185\u5bb9\u3092\u52a0\u7b46\u4fee\u6b63\u3057\u305f\u3082\u306e\u3067\u3059\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_\u306f\u3058\u3081\u306b\">\u306f\u3058\u3081\u306b<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Raspberry Pi \u3068\u3044\u3046\u82f1\u56fd\u767a\u306e\u6559\u80b2\u5411\u3051\u3068\u3057\u30662012\u5e74\u306b\u767a\u58f2\u3055\u308c\u305f\u5b89\u4fa1\u306a\u30b7\u30f3\u30b0\u30eb\u30dc\u30fc\u30c9\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u304c\u3042\u308a\u307e\u3059\uff0e\u6559\u80b2\u5411\u3051\u3068\u3057\u3066\u767a\u58f2\u3055\u308c\u307e\u3057\u305f\u304c\u8da3\u5473\u306b\u3082\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\uff0eOS\u306f\u6a19\u6e96\u3067\u306fLinux(Debian\u30d9\u30fc\u30b9\u306eRaspberry Pi OS)\u304c\u63a1\u7528\u3055\u308c\u3066\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li><a href=\"https:\/\/www.raspberrypi.org\/\">Teach, Learn, and Make with Raspberry Pi<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>\u79c1\u306f\u3082\u3063\u3071\u3089\u7701\u96fb\u529b\u306eLinux\u30de\u30b7\u30f3\u3068\u3057\u3066\u4f7f\u3046\u3053\u3068\u304c\u591a\u3044\u3067\u3059\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_\u30c8\u30e9\u30d6\u30eb\">\u30c8\u30e9\u30d6\u30eb<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>\u4eca\u590f\u7a7a\u8abf\u306e\u306a\u3044\u90e8\u5c4b\u306e\u81ea\u5b85\u30b5\u30fc\u30d0\u306e\u6a2a\u3067Raspberry Pi 3 model B + Raspberry Pi OS arm64(\u03b2)\u3067\u8a08\u7b97\u3092\u3055\u305b\u3066\u3044\u305f\u306e\u3067\u3059\u304c\uff0c\u3057\u3070\u3089\u304f\u52d5\u304b\u3057\u3066\u3044\u308b\u3068\u56fa\u307e\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li><a href=\"https:\/\/www.raspberrypi.org\/products\/raspberry-pi-3-model-b\/\">Buy a Raspberry Pi 3 Model B \u2013 Raspberry Pi<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>\u518d\u8d77\u52d5\u3059\u308c\u3070\u3057\u3070\u3089\u304f\u52d5\u304d\u307e\u3059\u304c\u3057\u3070\u3089\u304f\u3059\u308b\u3068\u3084\u306f\u308a\u56fa\u307e\u308a\u307e\u3059\uff0e\u3053\u308c\u3092\u3069\u3046\u306b\u304b\u51fa\u6765\u306a\u3044\u304b\u3068\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_\u30ed\u30b0\u306e\u53d6\u5f97\">\u30ed\u30b0\u306e\u53d6\u5f97<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>\u307e\u305a\u306f\u30ed\u30b0\u3092\u9332\u3063\u3066\u307f\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">crontab\u30671\u5206\u6bce\u306b\u60c5\u5831\u3092\u8a18\u9332<\/div>\n<div class=\"content\">\n<pre>* * * * *       printf \"`date +\\%s`,`cat \/sys\/class\/thermal\/thermal_zone0\/temp`,`echo \"obase=2; ibase=16; \\`vcgencmd get_throttled | cut -f2 -dx\\`\" | bc`,`vcgencmd measure_clock arm|cut -f2 -d=`\\n\" &gt;&gt; ~\/.temp.log<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u5185\u5bb9\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u3059\uff0e(\u5916\u6c17\u6e29\u5ea6\u3082\u9332\u308c\u3070\u3088\u304b\u3063\u305f)<\/p>\n<\/div>\n<div class=\"dlist\">\n<dl>\n<dt class=\"hdlist1\">UNIX Time<\/dt>\n<dd><code>date +%s<\/code><\/dd>\n<dt class=\"hdlist1\">SoC\u6e29\u5ea6<\/dt>\n<dd><code>\/sys\/class\/thermal\/thermal_zone0\/temp<\/code><\/dd>\n<dt class=\"hdlist1\">\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u5468\u308a\u306e\u30d5\u30e9\u30b0<\/dt>\n<dd><code>vcgencmd get_throttled<\/code><\/dd>\n<dt class=\"hdlist1\">arm\u5468\u6ce2\u6570<\/dt>\n<dd><code>vcgencmd measure_clock arm<\/code><\/dd>\n<\/dl>\n<\/div>\n<div class=\"paragraph\">\n<p>\u30ed\u30b0\u304c\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304b\u308c\u308b\u9593\u306b\u30d5\u30ea\u30fc\u30ba\u3057\u3066\u30c7\u30fc\u30bf\u304c\u5931\u308f\u308c\u308b\u306e\u3092\u9632\u3050\u305f\u3081\u306b <code>\/etc\/fstab<\/code> \u306e\u30de\u30a6\u30f3\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u306b <code>sync<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u4ed8\u3051\u3066\u304a\u304d\u307e\u3059\uff0e(\u518d\u8d77\u52d5\u304bremount\u3067\u53cd\u6620)<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u30ed\u30b0\u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u307e\u3059\uff0e\u4eca\u56de\u306f <code>\/dev\/urandom<\/code> \u3092cat\u3059\u308b\u3053\u3068\u3067\u8a08\u7b97\u3055\u305b\u307e\u3057\u305f\uff0e\u4eca\u56de\u306eRaspberry Pi 3 model B\u306f4core\u3042\u308b\u306e\u30674\u3064\u52d5\u304b\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">\u4eca\u56de\u306e\u30c6\u30b9\u30c8\u3067\u4f7f\u3063\u305f\u8ca0\u8377(\u3044\u3064\u3082\u306fvanity address\/vtt\u3068\u304b\u3068\u304b)<\/div>\n<div class=\"content\">\n<pre>$ cat \/dev\/urandom &gt; \/dev\/null &amp;\n$ cat \/dev\/urandom &gt; \/dev\/null &amp;\n$ cat \/dev\/urandom &gt; \/dev\/null &amp;\n$ cat \/dev\/urandom &gt; \/dev\/null &amp;<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_\u71b1\u304c\u539f\u56e0\">\u71b1\u304c\u539f\u56e0?<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>\u3057\u3070\u3089\u304f\u52d5\u304b\u3057\u3066Raspberry Pi\u304c\u56fa\u307e\u3063\u305f\u5f8c\u306b\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\uff0e<br \/>\nSoC\u306e\u6e29\u5ea6\u304c85\u5ea6\u3092\u4f55\u5ea6\u304b\u8a18\u9332\u3057\u305f\u5f8c\u306b\u56fa\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e<br \/>\n85\u5ea6\u3068\u3044\u3046\u306e\u306fRaspberry Pi OS\u3067\u306e\u6a19\u6e96\u306eSoC\u5236\u9650\u6e29\u5ea6\u306e\u3088\u3046\u3067\u3059\uff0e\u3053\u306e\u6e29\u5ea6\u306e5\u5ea6\u524d(\u6a19\u6e96\u3067\u306f80\u5ea6)\u304b\u3089\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u304c\u59cb\u307e\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3067\u30af\u30ed\u30c3\u30af\u304c\u4e0b\u304c\u3063\u3066\u6e29\u5ea6\u304c\u4e0b\u304c\u308c\u3070\u554f\u984c\u7121\u3055\u305d\u3046\u3060\u3051\u306980\u5ea6\u304b\u3089\u30af\u30ed\u30c3\u30af\u304c\u4e0b\u304c\u3063\u3066\u308285\u5ea6\u3092\u8d85\u3048\u3066\u56fa\u307e\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e<br \/>\n\u30d9\u30fc\u30bf\u7248\u306eRaspberry Pi OS amd64\u3092\u4f7f\u3063\u3066\u3044\u308b\u305b\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3068\u601d\u3044\uff0c\u6a19\u6e96\u306eRaspberry Pi OS armhf(32bit)\u7248\u306b\u5909\u66f4\u3057\u3066\u540c\u69d8\u306b\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u540c\u69d8\u306e\u52d5\u304d\u306e\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u6b63\u653b\u6cd5\u3068\u3057\u3066\u306f\u30d2\u30fc\u30c8\u30b7\u30f3\u30af\uff0c\u30d5\u30a1\u30f3\u306e\u5897\u8a2d\u3084\u7a7a\u8abf\u3092\u5165\u308c\u308b\u3068\u3088\u3055\u305d\u3046\u3067\u3059\u304c\uff0c\u91d1\u6b20\u306a\u306e\u3067\u3068\u308a\u3042\u3048\u305a\u30bd\u30d5\u30c8\u3060\u3051\u3067\u3069\u3046\u306b\u304b\u51fa\u6765\u306a\u3044\u304b\u3068\u8a66\u3057\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_soc\u5236\u9650\u6e29\u5ea6\u3092\u4e0b\u3052\u308b\">SoC\u5236\u9650\u6e29\u5ea6\u3092\u4e0b\u3052\u308b<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>\u307e\u305aSoC\u306e\u5236\u9650\u6e29\u5ea6\u3067\u3059\u304c\uff0c\u516c\u5f0f\u30d5\u30a9\u30fc\u30e9\u30e0\u306770\u5ea6\u4ee5\u4e0b\u306b\u3057\u305f\u307b\u3046\u304c\u3044\u3044\u3068\u3044\u3046\u66f8\u304d\u8fbc\u307f\u3092\u898b\u304b\u3051\u307e\u3057\u305f\uff0e\u9006\u306b100\u5ea6\u3067\u3082\u5927\u4e08\u592b\u3068\u3044\u3046\u4eba\u3082\u5c45\u308b\u306e\u3067\u3059\u304c\u5b89\u5168\u5074\u306e70\u5ea6\u306b\u3057\u3066\u307f\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u306e\u8a2d\u5b9a\u306f <code>\/boot\/config.txt<\/code> \u3067\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306f70\u5ea6\u306b\u8a2d\u5b9a\u305f\u3068\u304d\u306e\u4f8b\u3067\u3059\uff0e\u3053\u306e\u72b6\u614b\u3067\u518d\u8d77\u52d5\u3059\u308b\u3068\u53cd\u6620\u3055\u308c\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>temp_limit=70<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u518d\u8d77\u52d5\u5f8c\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u304c\u51fa\u6765\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ vcgencmd get_config int | grep ^temp_limit=\ntemp_limit=70<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u306e\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u308b\u306870\u5ea6\u3092\u8d8a\u3048\u308b\u304f\u3089\u3044\u3067\u56fa\u307e\u308a\u307e\u3057\u305f\uff0e\u3084\u306f\u308a\u5236\u9650\u6e29\u5ea6\u3092\u8d8a\u3048\u308b\u3068\u56fa\u307e\u3063\u3066\u3044\u821e\u3046\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_soc\u306e\u6700\u5927\u5468\u6ce2\u6570\u3092\u4e0b\u3052\u3066\u307f\u308b\">SoC\u306e\u6700\u5927\u5468\u6ce2\u6570\u3092\u4e0b\u3052\u3066\u307f\u308b<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Raspberry Pi 3 model B \u306eSoC\u306f\u6700\u5927\u5468\u6ce2\u65701.2GHz\u3067\u3059\uff0e\u3053\u308c\u3092\u4e0b\u3052\u3066\u307f\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><code>\/boot\/config.txt<\/code> \u306e <code>arm_freq=<\/code> \u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306f800MHz\u306b\u8a2d\u5b9a\u3057\u305f\u3068\u304d\u306e\u4f8b\u3067\u3059\uff0e\u518d\u8d77\u52d5\u3067\u53cd\u6620\u3055\u308c\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>arm_freq=800<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u518d\u8d77\u52d5\u5f8c\u306b\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ vcgencmd get_config int | grep ^arm_freq=\narm_freq=800<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u306e\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u308b\u3068\u3084\u306f\u308a\u56fa\u307e\u308a\u307e\u3059\uff0e\u307e\u3042\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u304c\u52b9\u3044\u3066\u3082\u56fa\u307e\u308b\u306e\u3067\u4ed5\u65b9\u304c\u306a\u3044\u611f\u3058\u3067\u3059\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_soc\u306e\u6700\u5c0f\u5468\u6ce2\u6570\u3092\u4e0b\u3052\u3066\u307f\u308b\u3053\u308c\u304c\u52b9\u304f\u306e\u3067\u306f\">SoC\u306e\u6700\u5c0f\u5468\u6ce2\u6570\u3092\u4e0b\u3052\u3066\u307f\u308b(\u3053\u308c\u304c\u52b9\u304f\u306e\u3067\u306f?)<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>\u6b21\u306bSoC\u6700\u5c0f\u5468\u6ce2\u6570\u3092\u4e0b\u3052\u3066\u307f\u307e\u3059\uff0e\u65e2\u5b9a\u5024\u306f600MHz\u3067\uff0c\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3067\u3082\u3053\u3053\u307e\u3067\u4e0b\u304c\u3063\u3066\u3044\u308b\u306e\u3067\u3053\u308c\u3092\u66f4\u306b\u4e0b\u3052\u308b\u3068\u6e29\u5ea6\u304c\u4e0b\u304c\u308a\u305d\u3046\u306a\u6c17\u304c\u3057\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><code>\/boot\/config.txt<\/code> \u306e <code>arm_freq_min=<\/code> \u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306f400MHz\u306b\u8a2d\u5b9a\u3057\u305f\u3068\u304d\u306e\u4f8b\u3067\u3059\uff0e\u518d\u8d77\u52d5\u3067\u53cd\u6620\u3055\u308c\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>arm_freq_min=400<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3057\u304b\u3057\u518d\u8d77\u52d5\u5f8c\u306b\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068600MHz\u3088\u308a\u4e0b\u306b\u306f\u8a2d\u5b9a\u3067\u304d\u306a\u3044\u307f\u305f\u3044\u3067600MHz\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ vcgencmd get_config int | grep ^arm_freq_min=\narm_freq_min=600<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u306e\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u308b\u3068\u3084\u306f\u308a600Mhz\u307e\u3067\u3057\u304b\u4e0b\u304c\u3089\u305a\u56fa\u307e\u308a\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u6b8b\u5ff5\u306a\u304c\u3089Raspberry Pi \u306e\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3067\u306f\u7121\u7406\u305d\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_maxcpus\u3067\u30b3\u30a2\u3092\u5236\u9650\u3057\u3066\u307f\u308b\">maxcpus\u3067\u30b3\u30a2\u3092\u5236\u9650\u3057\u3066\u307f\u308b<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Linux\u306e\u30d6\u30fc\u30c8\u30d1\u30e9\u30e1\u30fc\u30bf\u3067 <code>maxcpus<\/code> \u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u30b3\u30a2\u3092\u5236\u9650\u3067\u304d\u307e\u3059\uff0eRaspberry Pi \u306e\u5834\u5408\u306f <code>\/boot\/cmdline.txt<\/code> \u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u8a2d\u5b9a\u5f8c\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ grep -o -E 'maxcpus=.{0,9} ' \/proc\/cmdline\nmaxcpus=1\n$ grep ^processor \/proc\/cpuinfo | wc -l\n1<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u308c\u3067CPU core1\u6d25\u3067\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3059\uff0e\u3057\u304b\u3057\u6700\u5927\u5468\u6ce2\u6570\u3092600MHz\u304b\u30641core\u3067\u3082\u540c\u69d8\u306b\u30d5\u30ea\u30fc\u30ba\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_cpufreq\u3067\u30af\u30ed\u30c3\u30af\u5236\u5fa1\">cpufreq\u3067\u30af\u30ed\u30c3\u30af\u5236\u5fa1<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>IntelCPU\u306eNotePC\u306a\u3069\u3067\u306fcoufreq\u3092\u4f7f\u3063\u3066\u3053\u306e\u3042\u305f\u308a\u306e\u5236\u5fa1\u3092\u3059\u308b\u306e\u3067\u3059\u304c\uff0c\u3053\u308c\u3067\u3082600mHz\u3088\u308a\u4e0b\u306b\u306f\u4e0b\u3052\u3089\u308c\u306a\u3044\u3088\u3046\u3067\u99c4\u76ee\u3067\u3057\u305f\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_limitcpu\u3067\u6307\u5b9a\u30d7\u30ed\u30bb\u30b9\u306e\u5236\u9650\u3092\u884c\u3046\">LimitCPU\u3067\u6307\u5b9a\u30d7\u30ed\u30bb\u30b9\u306e\u5236\u9650\u3092\u884c\u3046<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>LimitCPU\u306f\u6307\u5b9a\u30d7\u30ed\u30bb\u30b9\u3092\u76e3\u8996\u3057\uff0cCPU\u5229\u7528\u7387\u3084%\u3067\u5236\u9650\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\uff0eLinux, MacOS, *BSD\u306a\u3069\u306eUNIX-Likesystem\u3067\u5229\u7528\u3067\u304d\u307e\u3059\uff0e<br \/>\nRaspberry Pi OS\u3067\u306fcpulimit\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u3057\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0\u3055\u308c\u3066\u304a\u308a\uff0c\u30b3\u30de\u30f3\u30c9\u3082coulimit\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">cpulimit\u306e\u5c0e\u5165<\/div>\n<div class=\"content\">\n<pre>$ sudo apt install cpulimit<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>cpulimit\u30b3\u30de\u30f3\u30c9\u306b\u5236\u9650\u3057\u305f\u3044\u30d7\u30ed\u30bb\u30b9ID\u3084\u30d7\u30ed\u30bb\u30b9\u540d\u3068\u5236\u9650\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u52d5\u4f5c\u3057\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\"><code>cat<\/code> \u304b\u3089\u306f\u3058\u307e\u308b\u30d7\u30ed\u30bb\u30b9\u309250%\u306b\u5236\u9650<\/div>\n<div class=\"content\">\n<pre>$ pgrep ^cat | xargs -n1 -I{} sh -c \"cpulimit -p {} -l 50 -v &amp;\"<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>cpulimit\u306750%\u306b\u5236\u9650\u3057\u3066\u307f\u305ft\u9803\u6e29\u5ea6\u304c\u4e0b\u304c\u308b\u306e\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\uff0e\u6570\u65e5\u52d5\u304b\u3057\u3066\u3082\u56fa\u307e\u3089\u306a\u304f\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0e<br \/>\n\u5b9a\u671f\u7684\u306bSoC\u306e\u6e29\u5ea6\u3092\u78ba\u8a8d\u3057\u3066\u5236\u9650\u3092\u5909\u66f4\u3057\u3066\u3044\u304f\u3068\u826f\u3055\u305d\u3046\u3067\u3046s\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<div class=\"title\">\u53c2\u8003URL<\/div>\n<ul>\n<li><a href=\"https:\/\/matoken.org\/blog\/2018\/11\/04\/try-cpulimit-to-limit-cpu-utilization-of-specific-process\/\">\u7279\u5b9a\u30d7\u30ed\u30bb\u30b9\u306ecpu\u5229\u7528\u7387\u3092\u5236\u9650\u3059\u308bcpulimit\u3092\u8a66\u3059 \u2013 matoken\u2019s meme<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"exampleblock\">\n<div class=\"content\">\n<div class=\"paragraph\">\n<p>LimitCPU\u306fCPUlimit\u306e\u958b\u767a\u304c\u6b62\u307e\u3063\u305f\u5f8c\u306e\u30d5\u30a9\u30fc\u30af\u3067\u3059\u304c\uff0c\u305d\u306e\u5f8cCPUlimit\u304c\u65b0\u3057\u304f\u958b\u767a\u304c\u59cb\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e\u8a73\u7d30\u306f\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li><a href=\"http:\/\/limitcpu.sourceforge.net\/\">LimitCPU<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_cgroup\u3067cpu\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u672a\u78ba\u8a8d\">cgroup\u3067CPU\u30ea\u30bd\u30fc\u30b9\u5236\u9650(\u672a\u78ba\u8a8d)<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>LimitCPU\u304c\u52b9\u3044\u305f\u306e\u3067\u6050\u3089\u304fcgroup\u3067\u306eCPU\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u3067\u3082\u5927\u4e08\u592b\u305d\u3046\u3067\u3059\uff0e(\u672a\u78ba\u8a8d)<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_\u304a\u308f\u308a\u306b\">\u304a\u308f\u308a\u306b<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>\u73fe\u5728\u306f\u6c17\u6e29\u3082\u4e0b\u304c\u308a\u5236\u9650\u306a\u3069\u3057\u306a\u304f\u3066\u3082\u554f\u984c\u3042\u308a\u307e\u305b\u3093\uff0e\u3067\u3082\u304d\u3063\u3068\u6765\u590f\u306b\u307e\u305f\u8d77\u3053\u308b\u3068\u601d\u3046\u306e\u3067\u305d\u3053\u3067\u307e\u305f\u78ba\u8a8d\u3059\u308b\u3064\u3082\u308a\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3057\u304b\u3057\uff0c\u4eca\u56de\u306e\u89e3\u6c7a\u65b9\u6cd5\u306fCPU\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u5236\u9650\u3057\u3066\u6e29\u5ea6\u3092\u4e0b\u3052\u3066\u5c45\u308b\u306e\u3067\u8a08\u7b97\u91cf\u306f\u6e1b\u3063\u3066\u3044\u307e\u3059\uff0e\u7a7a\u8abf\u3092\u5165\u308c\u305f\u308aCPU\u30d5\u30a1\u30f3\u3092\u5c0e\u5165\u3059\u308b\u306e\u304c\u6b63\u653b\u6cd5\u306b\u306a\u308b\u306e\u304b\u306a\u3068\u601d\u3044\u307e\u3059\uff0e<br \/>\nCPU\u30d5\u30a1\u30f3\u306f\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30fc\u304b\u3089\u5404\u7a2e\u767a\u58f2\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u305d\u308c\u3089\u3092\u4f7f\u3046\u304bDIY\u3059\u308b\u611f\u3058\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u305d\u3046\u3044\u3048\u3070\u6700\u8fd1Raspberry Pi OS\u306e\u8a2d\u5b9a\u30b3\u30de\u30f3\u30c9\u306e <code>raspi-config<\/code> \u306e\u4e2d\u306b <code>Set behaviour of GPIO fan<\/code> \u3068\u3044\u3046\u30e1\u30cb\u30e5\u30fc\u304c\u51fa\u6765\u305f\u308a\uff0cRaspberry Pi 4\u306b\u306f\u516c\u5f0f\u306eCPU\u30d5\u30a1\u30f3\u304c\u767a\u58f2\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3053\u308c\u3089\u3092\u4f7f\u3046\u306e\u304c\u826f\u3055\u305d\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li><a href=\"https:\/\/www.raspberrypi.org\/products\/raspberry-pi-4-case-fan\/?resellerType=home\">Buy a Raspberry Pi 4 Case Fan \u2013 Raspberry Pi<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=matokensmeme-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=B08216CTTS&amp;linkId=63801577e1df0cff053f05d8dc046dbb\"><\/iframe><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=matokensmeme-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=B08M5P66RG&amp;linkId=f1d2b34e8077d13d5a12862a706117be\"><\/iframe><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=matokensmeme-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=B07VSNM46F&amp;linkId=aea10b56877f4d6c930cae15eff06d56\"><\/iframe><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=matokensmeme-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=B08MZTK4TC&amp;linkId=e0551b27e837a4c0adb7866c53e75818\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306f\u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8 Advent Calendar 2020 \u306e12\/07\u5206\u306e\u8a18\u4e8b\u3067\u3059\uff0e \u5185\u5bb9\u306f \u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8 \u7b2c96\u56de\u52c9\u5f37\u4f1a \u3067\u767a\u8868\u3057\u305f\u5185\u5bb9\u3092\u52a0\u7b46\u4fee\u6b63\u3057\u305f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[547,6,91,546],"tags":[435,436,124,539,44],"class_list":["post-2881","post","type-post","status-publish","format-standard","hentry","category-buster-raspberry-pi-os","category-linux","category-raspberry-pi","category-raspberry-pi-os","tag-cpulimit","tag-limitcpu","tag-raspberry-pi-3-b","tag-raspberry-pi-os","tag-raspberrypi"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=2881"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2881\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=2881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=2881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=2881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}