the laptop where time stops

Michael Galea michaelgalea-4VtgCsEi+FIybS5Ee8rs3A at public.gmane.org
Wed Mar 30 21:42:09 UTC 2011


On 30/03/11 07:17 AM, Giles Orr wrote:
> This is a strange problem.
>
> I have a laptop that runs an "at" job to play music with mpg321 every
> morning and wake me up.  The last three days, it's played about a
> minute and a half of the first song (it's set to play three randomly
> selected) and it just ... stops.  When I get up and press a key on the
> keyboard - which also wakes up the screen - the music playback
> resumes.  There's nothing in /var/log/messages.  This morning I
> deliberately waited 2 minutes by another clock in the room, then
> pressed the key - and verified that the time on the laptop was two
> minutes slower than it should have been.  Apparently time stops during
> the break in music playback.
>
> I can replace the laptop if I have to (it's very old), but it wouldn't
> be my first choice.  Among other things, it's exhibited no other
> strange behaviours.  Any thoughts on how to debug this or what might
> be going on?
>
I do something like this with music in my kitchen, the speakers of which 
are connected to a loooong cat5 cable which I re-purposed to connect to 
the sound card on my firewall.

The firewall generates playscripts which kick in at different times of 
the day to play my wife's music or mine.  Hint: Mine always plays during 
dish washing time.

The system is fully CGI enabled through perl scripts on the firewall and 
provide album based, day of week specific ordered and randomized 
playlists.  I also support queuing up of songs (my daughter uses that). 
I put the system in place back in 2002 and kind of forgot about it, but 
use it every night.

Anyway, here is the active part that pokes it head out.  It background 
by cron started by cron at 6:00 PM

> #
> # Script for /var/cache/songlist/Michael.mp3script
> #
> # - DO NOT EDIT, This file is machine generated...
> # Generated Wed Mar 30 00:01:01 EDT 2011
> #
> function _exit()    # function to run upon exit of shell
> {
>     /usr/bin/pkill mpg321 1> /dev/null 2>/dev/null
> }
> trap _exit EXIT
>
> function interleave() {
>     [ -e "/var/cache/songlist/interleave" ] || return
>     song=`head -n 1 /var/cache/songlist/interleave`
>     if [ -z "$song" ]; then
>           rm /var/cache/songlist/interleave
>           return
>     fi
>
>     # Grab everything after the first entry
>     tail -n +2 /var/cache/songlist/interleave > /var/cache/songlist/interleave.new
>     mv /var/cache/songlist/interleave.new /var/cache/songlist/interleave
>     [ -e "$song" ] || return
>
>     /usr/bin/mpg321 "$song" 1>/dev/null 2>/dev/null
>
>     interleave
> }
>
> while [ 1 ]
> do
>     /usr/bin/mpg321  "/opt/backups/opt/albums/Roxy_Music/Bryan_Ferry_&_Roxy_Music_-_Love_Is_The_Drug.mp3" 1>/dev/null 2>/dev/null
>     interleave
>     /usr/bin/mpg321  "/opt/backups/opt/albums/Downloads/Offspring_-_Come_Out_And_Play.mp3" 1>/dev/null 2>/dev/null
>     interleave
>     /usr/bin/mpg321  "/opt/backups/opt/albums/Downloads/Soft_Cell_-_Tainted_Love.mp3" 1>/dev/null 2>/dev/null
 > ...
 > several thousand songs later
 > ...
 >     sleep 1
 > done
 > exit 1

I am using mpg321 0.2.12-1 from Debian testing.

-- 
Michael Galea

Now Reading:
Anansi Boys By Neil Gaiman
Steppenwolf By Hermann Hesse
Four Laws That Drive the Universe By Peter Atkins
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list