Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.raspberry-pi > #25837

Re: Battery Powered Project

From The Natural Philosopher <tnp@invalid.invalid>
Newsgroups comp.sys.raspberry-pi
Subject Re: Battery Powered Project
Date 2021-01-13 13:56 +0000
Organization A little, after lunch
Message-ID <rtmu74$ule$1@dont-email.me> (permalink)
References <rtk3qv$1112$1@gioia.aioe.org> <rtkjd5$p68$1@dont-email.me>

Show all headers | View raw


On 12/01/2021 16:40, Pancho wrote:
> On 12/01/2021 12:14, Simple Simon wrote:
>> I am working on a battery powered car and want the Pi to shut down 
>> automatically if the battery starts to go flat to try to prevent SD 
>> card corruption. I am a beginner to bash scripts! I will run this via 
>> crontab...
>>
>> #!/bin/bash
>> powerstatus=$(vcgencmd get_throttled)
>> if [ $powerstatus="throttled=0x1" ]
>> then
>> echo Under Voltage Detected - Shutting Down
>> sudo halt
>> else
>> echo Voltage Normal
>> fi
>>
>> Obviously it is not working!! Could someone correct and explain for me 
>> please.
> 
> Not being much help, but...
> 
> I'm aware of Under Voltage problems from entries in journalctl. It seems 
> to me that listening for events logged to journalctl would be a pretty 
> common thing to do. So common that there should be some standard way of 
> doing it. Some kind of standard Observer pattern on jounalctl. Does 
> anyone know of one?

Well that's just another problem with systemd. When coming up with 
something similar in Apache, I could tell apache to log to a process 
that tripped certain (security relevant) events.

There ought to be a way to tell systemd to do similar so you can have a 
watchdog attached...but who knows how to do it?



-- 
“Puritanism: The haunting fear that someone, somewhere, may be happy.”

H.L. Mencken, A Mencken Chrestomathy

Back to comp.sys.raspberry-pi | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Battery Powered Project Simple Simon <please.dontspa@me.com> - 2021-01-12 12:14 +0000
  Re: Battery Powered Project Chris Green <cl@isbd.net> - 2021-01-12 12:40 +0000
    Re: Battery Powered Project Simple Simon <please.dontspa@me.com> - 2021-01-12 12:50 +0000
      Re: Battery Powered Project "A. Dumas" <alexandre@dumas.fr.invalid> - 2021-01-12 15:15 +0100
      Re: Battery Powered Project Theo <theom+news@chiark.greenend.org.uk> - 2021-01-12 21:43 +0000
        Re: Battery Powered Project Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2021-01-13 09:40 +0000
        Re: Battery Powered Project Jim H <invalid@invalid.invalid> - 2021-01-13 18:02 +0000
        Re: Battery Powered Project Joe <joe@jretrading.com> - 2021-01-13 22:04 +0000
          Re: Battery Powered Project Theo <theom+news@chiark.greenend.org.uk> - 2021-01-13 23:37 +0000
            Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-14 00:43 +0000
            Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 03:59 +0000
            Re: Battery Powered Project Ahem A Rivet's Shot <steveo@eircom.net> - 2021-01-14 10:18 +0000
              Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 11:04 +0000
                Re: Battery Powered Project Ahem A Rivet's Shot <steveo@eircom.net> - 2021-01-14 11:46 +0000
                Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 12:21 +0000
                Re: Battery Powered Project Ahem A Rivet's Shot <steveo@eircom.net> - 2021-01-14 12:38 +0000
                Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-14 14:17 +0000
                Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 14:28 +0000
                Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-16 20:09 +0000
                Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-17 07:19 +0000
                Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-17 15:57 +0000
                Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-18 07:05 +0000
                Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-18 14:14 +0000
                Re: Battery Powered Project John Aldridge <jpsa@cantab.net> - 2021-01-17 17:52 +0000
              Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-14 12:56 +0000
              Re: Battery Powered Project Theo <theom+news@chiark.greenend.org.uk> - 2021-01-14 13:46 +0000
                Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 14:26 +0000
          Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 03:46 +0000
            Re: Battery Powered Project Folderol <general@musically.me.uk> - 2021-01-14 09:23 +0000
              Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 11:04 +0000
                Re: Battery Powered Project Folderol <general@musically.me.uk> - 2021-01-14 17:48 +0000
            Re: Battery Powered Project Jim H <invalid@invalid.invalid> - 2021-01-18 17:07 +0000
              Re: Battery Powered Project Joe <joe@jretrading.com> - 2021-01-18 20:33 +0000
                Re: Battery Powered Project Jim H <invalid@invalid.invalid> - 2021-01-21 20:36 +0000
  Battery Powered Project nospam.Vincent.Coen@f1.n250.z2.binkp.net (Vincent Coen) - 2021-01-12 14:35 +1300
  Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-12 16:40 +0000
    Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-13 13:56 +0000
      Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-13 15:12 +0000
        Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-16 12:24 +0000
          Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-16 17:53 +0000
            Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-16 20:39 +0000
              Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-16 22:33 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-16 23:30 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-16 23:52 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-17 10:39 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-17 14:32 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-18 13:20 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-18 13:41 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-18 14:02 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-18 15:15 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-19 13:46 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-19 15:24 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-19 15:34 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-19 16:21 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-19 17:18 +0000
                Re: Battery Powered Project Richard Kettlewell <invalid@invalid.invalid> - 2021-01-19 19:31 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-20 10:12 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-19 22:15 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-20 10:03 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 10:49 +0000
                Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-20 11:29 +0000
                Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 12:18 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 13:02 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-20 15:49 +0000
                Re: Battery Powered Project Richard Kettlewell <invalid@invalid.invalid> - 2021-01-20 16:54 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 17:19 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-21 10:24 +0000
                Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 12:18 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 13:18 +0000
                Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-20 14:14 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 14:51 +0000
                Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 14:45 +0000
                Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 14:44 +0000
                Re: Battery Powered Project Richard Kettlewell <invalid@invalid.invalid> - 2021-01-20 15:07 +0000
                Re: Battery Powered Project "A. Dumas" <alexandre@dumas.fr.invalid> - 2021-01-20 16:38 +0100
                Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-20 15:45 +0000
                Re: Battery Powered Project druck <news@druck.org.uk> - 2021-01-21 10:07 +0000
                Re: Battery Powered Project "A. Dumas" <alexandre@dumas.fr.invalid> - 2021-01-21 12:30 +0100
                Re: Battery Powered Project druck <news@druck.org.uk> - 2021-01-21 13:09 +0000
                Re: Battery Powered Project Anssi Saari <as@sci.fi> - 2021-01-22 10:08 +0200
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-22 10:29 +0000
                Re: Battery Powered Project Chris Green <cl@isbd.net> - 2021-01-22 10:25 +0000
                Re: Battery Powered Project Kees Nuyt <k.nuyt@nospam.demon.nl> - 2021-01-19 17:03 +0100
                Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-17 01:09 +0000
            Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-17 11:48 +0000
              Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-17 12:11 +0000
              Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-17 14:43 +0000
            Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-17 11:52 +0000
              Re: Battery Powered Project Andy Burns <usenet@andyburns.uk> - 2021-01-17 13:53 +0000

csiph-web