{"id":28972,"date":"2020-05-30T23:41:25","date_gmt":"2020-05-30T23:41:25","guid":{"rendered":"http:\/\/pcbjunkie.net\/?page_id=28972"},"modified":"2020-05-30T23:41:25","modified_gmt":"2020-05-30T23:41:25","slug":"pj-power-monitoring-and-shutdown","status":"publish","type":"page","link":"https:\/\/pcbjunkie.net\/index.php\/pj-power-monitoring-and-shutdown\/","title":{"rendered":"PJ &#8211; Power Monitoring and Shutdown."},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Overview<\/h4>\n\n\n\n<p>Power monitoring and the shutdown capability consists of a power \/ shutdown monitoring executable, and a init.d script. On startup the utility will monitor voltages on the JAMMA connector side (from the PSU) and shutdown the system cleanly when a brownout condition is detected and lasts for some time. Execute the utility manually for configuration parameters.<\/p>\n\n\n\n<p>When extracted both can be found in the <em>utilities\/pwrmod<\/em> directory of the tar file.<\/p>\n\n\n\n<p><strong>Installing the power monitoring and shutdown component<\/strong>:<\/p>\n\n\n\n<p>Only the init.d script must be installed:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo cp \/home\/pi\/utilities\/pwrmon\/init.d\/pwrmon \/etc\/init.d<\/pre>\n\n\n\n<p>Using update-rc.d, create init symlinks so that power monitoring can be started on start-up.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo update-rc.d pwrmon defaults<br>sudo update-rc.d pwrmon enable<\/pre>\n\n\n\n<p>Power monitoring can also be started and stopped manually in the usual init way:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/etc\/init.d\/pwrmon start<\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/etc\/init.d\/pwrmon stop<\/pre>\n\n\n\n<p><strong>Troubleshooting the power monitoring utility:<\/strong><\/p>\n\n\n\n<p>Make sure it is started on boot-up. Run the following to confirm:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ps -ef | grep pwrmon<\/pre>\n\n\n\n<p>You should see something that resembles the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root \u00a0 368 \u00a0 1 \u00a00 09:46 ? \u00a0 \u00a000:00:00 \/home\/pi\/utilities\/pwrmon\/pwrmon 0.5<\/pre>\n\n\n\n<p>If not found, check the logs \/var\/log\/debug and logs in \/var\/log\/pwrmon for more information. <\/p>\n\n\n\n<p>Check to make sure the script is set to execute on startup:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">chkconfig pwrmon<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Power monitoring and the shutdown capability consists of a power \/ shutdown monitoring executable, and a init.d script. On startup the utility will monitor voltages on the JAMMA connector side (from the PSU) and shutdown the system cleanly when a brownout condition is detected and lasts for some time. Execute the utility manually for &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/pcbjunkie.net\/index.php\/pj-power-monitoring-and-shutdown\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;PJ &#8211; Power Monitoring and Shutdown.&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-28972","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/pages\/28972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/comments?post=28972"}],"version-history":[{"count":1,"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/pages\/28972\/revisions"}],"predecessor-version":[{"id":28973,"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/pages\/28972\/revisions\/28973"}],"wp:attachment":[{"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/media?parent=28972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}