Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #12548
| From | not.socialnetwork@gmail.com |
|---|---|
| Newsgroups | comp.os.linux.misc, comp.sys.raspberry-pi |
| Subject | Re: HOW2 capture time of power-failure? |
| Followup-To | comp.os.linux.misc, comp.sys.raspberry-pi |
| Date | 2014-10-28 21:26 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <m2p1ms$9n9$1@dont-email.me> (permalink) |
| References | <m2m2uk$8s6$2@dont-email.me> |
Cross-posted to 2 groups.
Followups directed to: comp.os.linux.misc, comp.sys.raspberry-pi
In article <m2m2uk$8s6$2@dont-email.me>, Gordon Henderson <gordon+usenet@drogon.net> wrote:
> In article <m2m1rf$6bh$1@dont-email.me>, <not.socialnetwork@gmail.com> wrote:
> >In article <XnsA3D2BB8ABDCA70xDEADBEEF@213.239.209.88>, Ian Malcolm <See.My.Sig.for.email@totally.invalid> wrote:
>
> >Sure. But it's survived 1'000 power cuts.
> >It must be designed to manage.
> >
> >Joe Beanfish wrote:-
> >]You could start a background process at the same time as the player to
> >]save a timestamp every 5-10 seconds.
> >
> >Exactly. I'm hoping someone will give me the code.
>
> You're probably getting away with it because for your application, all
> you're doing is mostly reading the SD, so there's probably little to
> no data needing to be written at power off time, and at boot time, an
> automatic fsck will happen which (for the most part) will keep you good.
>
> You could simply have:
>
> #!/bin/bash
>
> while true; do
> date >> /var/log/timefile ; sync
> sleep 5
> done
>
> and at boot time put something like:
>
> touch /var/log/timefile
> echo "--- we rebooted ---" >> /var/log/timefile
>
> in e.g. /etc/rc.local
>
> Will that work and not result in SD corruption? Hard to be sure. Give
> it a go and let us know :-)
>
> -Gordon =======
I've got the PlayControlScript on a stikUSB.
So that's where I'll put <timefile> for the next test.
It's difficult moving the data between 4 stages to get it to USEnet!
--
Probably the timer needs to be "BACKgrounded"?
So far I've not understood how the following trace shows what's
happening:-
Reboot, 21,33,43,53, <-- initial ?? followed by 10 secS
Reboot,20,32,42,52.
--
This was my code:--
System.Execute cat /mnt/stik/TTS4rPi/TTS.sh
...
oPlaySkip() # cutWhilePlaying=z
{
if [ -f $1.ogg ]; then
mv $1.ogg z$1.ogg # switch
sync
ogg123 z$1.ogg # offerz
mv z$1.ogg $1.ogx # next
sync
aplay Cut4Wax.wav # offerx
mv $1.ogx $1.ogg # next = restored to g
sync
aplay SafeLand.wav <_cut here=restore FileID for replay
fi
}
#-- MAIN---
oPlaySkip Banting
oPlaySkip MathBlog
oPlaySkip BitC
touch /var/log/timeFile
echo "--we rebooted---" >> /var/log/timeFile
oPlaySkip zj08cnt
while true; do
date >> /var/log/timeFile ; sync
sleep 10
done
oPlaySkip functor
...
I cut-power while the 2nd file was playing,
which previously would have marked it as z*.ogg
==> Here's the 'newest stikFiles:
ls -t /mnt/stik/TTS4rPi/*
/mnt/stik/TTS4rPi/TTS.sh
/mnt/stik/TTS4rPi/MathBlog.ogx <-cut after play
/mnt/stik/TTS4rPi/zBanting.ogg <-cut during play
/mnt/stik/TTS4rPi/zBitC.ogg <-cut during play
/mnt/stik/TTS4rPi/zplan9d.ogg <-cut previously
...
Of course rPi has no RTC, but each *.ogg that's
a TextToSpeech which is written to the stik,
is real-time-marked by the PC - originally.
Apparently I must:
echo "reboot==" > ./TimeFile
at the begining of routine: oPlaySkip
Will the loop:
date >> /var/log/timeFile ; sync ; sleep 10
stop, when oPlaySkip exits?
That would be good, since it's only needed
during oPlaySkip.
---------------------
No! The MULTIprocessor aspect is hidden/not-discussed;
almost fraudulently. It must become the starting point of
the design?
==TIA.
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
HOW2 capture time of power-failure? not.socialnetwork@gmail.com - 2014-10-26 17:38 +0000
Re: HOW2 capture time of power-failure? Ian Malcolm <See.My.Sig.for.email@totally.invalid> - 2014-10-26 18:26 +0000
Re: HOW2 capture time of power-failure? not.socialnetwork@gmail.com - 2014-10-27 18:10 +0000
Re: HOW2 capture time of power-failure? Gordon Henderson <gordon+usenet@drogon.net> - 2014-10-27 18:29 +0000
Re: HOW2 capture time of power-failure? not.socialnetwork@gmail.com - 2014-10-28 21:26 +0000
Re: HOW2 capture time of power-failure? William Unruh <unruh@invalid.ca> - 2014-10-28 04:56 +0000
Re: HOW2 capture time of power-failure? Dom <domafp@blueyonder.co.uk> - 2014-10-28 06:29 +0000
Re: HOW2 capture time of power-failure? William Unruh <unruh@invalid.ca> - 2014-10-28 06:41 +0000
Re: HOW2 capture time of power-failure? not.socialnetwork@gmail.com - 2014-10-29 00:12 +0000
Re: HOW2 capture time of power-failure? William Unruh <unruh@invalid.ca> - 2014-10-26 19:23 +0000
Re: HOW2 capture time of power-failure? spam-no-spam@Freeola.net.invalid (Windmill) - 2014-11-04 13:19 +0000
Re: HOW2 capture time of power-failure? William Unruh <unruh@invalid.ca> - 2014-11-05 21:56 +0000
Re: HOW2 capture time of power-failure? Joe Beanfish <joebeanfish@nospam.duh> - 2014-11-06 14:12 +0000
Re: HOW2 capture time of power-failure? nba@users.sourceforge.net (Niels Baggesen) - 2014-11-06 16:15 +0100
Re: HOW2 capture time of power-failure? William Unruh <unruh@invalid.ca> - 2014-11-06 16:00 +0000
Re: HOW2 capture time of power-failure? spam-no-spam@Freeola.net.invalid (Windmill) - 2014-11-06 20:37 +0000
Re: HOW2 capture time of power-failure? Joe Beanfish <joebeanfish@nospam.duh> - 2014-11-06 14:13 +0000
Re: HOW2 capture time of power-failure? andrew@cucumber.demon.co.uk (Andrew Gabriel) - 2014-10-26 20:28 +0000
Re: HOW2 capture time of power-failure? Joe Beanfish <joebeanfish@nospam.duh> - 2014-10-27 13:17 +0000
Re: HOW2 capture time of power-failure? Jean-David Beyer <jeandavid8@verizon.net> - 2014-10-28 13:43 -0400
Re: HOW2 capture time of power-failure? Ant <ant@zimage.comANT> - 2014-10-29 08:18 -0700
Re: HOW2 capture time of power-failure? Joe Beanfish <joebeanfish@nospam.duh> - 2014-10-29 13:28 +0000
Re: HOW2 capture time of power-failure? not.socialnetwork@gmail.com - 2014-10-30 08:32 +0000
background processes (was HOW2 capture time of power-failure?) Joe Beanfish <joebeanfish@nospam.duh> - 2014-10-30 13:16 +0000
Re: background processes (was HOW2 capture time of power-failure?) not.socialnetwork@gmail.com - 2014-11-03 03:25 +0000
Re: background processes (was HOW2 capture time of power-failure?) "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2014-11-02 23:34 -0500
Re: background processes (was HOW2 capture time of power-failure?) William Unruh <unruh@invalid.ca> - 2014-11-03 08:25 +0000
Re: background processes (was HOW2 capture time of power-failure?) Martin Gregorie <martin@address-in-sig.invalid> - 2014-11-03 12:56 +0000
Re: background processes (was HOW2 capture time of power-failure?) not.socialnetwork@gmail.com - 2014-11-06 19:19 +0000
Re: background processes (was HOW2 capture time of power-failure?) Martin Gregorie <martin@address-in-sig.invalid> - 2014-11-07 02:36 +0000
Re: background processes (was HOW2 capture time of power-failure?) Joe Beanfish <joebeanfish@nospam.duh> - 2014-11-07 14:28 +0000
Re: background processes (was HOW2 capture time of power-failure?) not.socialnetwork@gmail.com - 2014-11-08 03:32 +0000
csiph-web