{"id":33070,"date":"2018-03-14T14:12:30","date_gmt":"2018-03-14T14:12:30","guid":{"rendered":"http:\/\/antonini.psc.br\/?p=33070"},"modified":"2021-04-02T04:55:58","modified_gmt":"2021-04-02T04:55:58","slug":"swap-no-raspberry-pi","status":"publish","type":"post","link":"https:\/\/antonini.ddns.net\/?p=33070","title":{"rendered":"Swap no Raspberry Pi"},"content":{"rendered":"<p style=\"text-align: justify;\">O Raspberry Pi usa o script dphys-swapfile para gerenciar o swap. A imagem padr\u00e3o inclui o script ativado por padr\u00e3o. O arquivo de configura\u00e7\u00e3o localiza-se em <strong>\/etc\/dphys-swapfile<\/strong>. O \u00fanico par\u00e2metro do arquivo \u00e9&nbsp;<strong>CONF_SWAPSIZE=100<\/strong>, que cria ou configura 100MB de swap em <strong>\/var\/swap<\/strong>. Como descrito acima, colocar o swapfile em <strong>\/var<\/strong> n\u00e3o \u00e9 uma boa ideia proque o diret\u00f3rio fica no cart\u00e3o SD. Voce pode mudar a localiza\u00e7\u00e3o do arquivo com o comando <strong>CONF_SWAPFILE=\/&lt;localiza\u00e7\u00e3o que voc\u00ea quer&gt;<\/strong>, como por exemplo,&nbsp;<strong>\/etc\/dphys-swapfile<\/strong><\/p>\n<p>Para mudar o tamanho do swap:<br \/>\n<b>\/etc\/init.d\/dphys-swapfile stop<\/b><\/p>\n<p><b>nano \/etc\/dphys-swapfile<\/b><\/p>\n<p><b>CONF_SWAPSIZE=100<\/b> mudar para <b>CONF_SWAPSIZE=1024<\/b>, ou outro valor.<\/p>\n<p><b>\/etc\/init.d\/dphys-swapfile start<\/b><\/p>\n<p><b>dphys-swapfile swapon<\/b><\/p>\n<p>Para mudar o swap de lugar:<br \/>\n<b>\/etc\/init.d\/dphys-swapfile stop<\/b><\/p>\n<p><strong>CONF_SWAPFILE=\/&lt;localiza\u00e7\u00e3o que voc\u00ea quer&gt;<\/strong><\/p>\n<p><b>\/etc\/init.d\/dphys-swapfile start<\/b><\/p>\n<p>Refer\u00eancias:<\/p>\n<ul>\n<li><a title=\"Link permanente para Privado: Arquivos como Swap\" href=\"?p=29289\" rel=\"bookmark\">Arquivos como Swap<\/a><\/li>\n<li><a href=\"http:\/\/www.peatonet.com\/pt\/aprende-seguridad-con-raspberry-pi-entrega-v-aumentar-la-memoria-swap-de-raspbian\/\" target=\"_blank\" rel=\"noopener noreferrer\">Peatonet<\/a><\/li>\n<li><a href=\"http:\/\/raspberrypimaker.com\/adding-swap-to-the-raspberrypi\/\" target=\"_blank\" rel=\"noopener noreferrer\">Raspberrypimake<\/a><\/li>\n<\/ul>\n<p style=\"text-align: center;\">[<a href=\"javascript:history.go(-1)\">Voltar<\/a>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>O Raspberry Pi usa o script dphys-swapfile para gerenciar o swap. A imagem padr\u00e3o inclui o script ativado por padr\u00e3o. O arquivo de configura\u00e7\u00e3o localiza-se em \/etc\/dphys-swapfile. O \u00fanico par\u00e2metro do arquivo \u00e9&nbsp;CONF_SWAPSIZE=100, que cria ou configura 100MB de swap em \/var\/swap. Como descrito acima, colocar o swapfile em \/var n\u00e3o \u00e9 uma boa ideia [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-33070","post","type-post","status-publish","format-standard","hentry","category-informatica"],"_links":{"self":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/33070","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33070"}],"version-history":[{"count":8,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/33070\/revisions"}],"predecessor-version":[{"id":36506,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/33070\/revisions\/36506"}],"wp:attachment":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}