Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: vdr Restarting Tool (cron Job + Perl)



On Mon, 01 Jul 2002 15:48:39 +0200
Carsten Koch <Carsten.Koch@icem.de> wrote:

> I wonder why this is such a big deal and why perl is required.
> On my machine, the following one-liner (from the tcsh prompt)
> works:

I can programm perl but i have no plan about shell programming. 

> if ( `ps -e | fgrep vdr | wc -l` > = 6 ) echo vdr running.
> 
> 
> One could even extend that and use it to determine if vdr is
> busy recording or cutting something:
> 
> if ( `ps -e | fgrep vdr | wc -l` > = 7 ) echo vdr busy.
> 
> 
> So, for your current problem, I guess all you need is a
> 
> if ( `ps -e | fgrep vdr | wc -l` < 6 ) "command that restarts vdr on
> your machine"
> 

thanx i will have a try with that. 
 
> Carsten.
> 
> 
> Bernhard Ritter wrote:
> > 
> > ----- Original Message -----
> > From: "Karsten Müller" <kmu@ratio.de>
> > To: <vdr@linuxtv.org>
> > Sent: Monday, July 01, 2002 10:00 AM
> > Subject: [vdr] Re: vdr Restarting Tool (cron Job + Perl)
> > 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > 
> > On Monday 01 July 2002 09:55, Bernhard Ritter wrote:
> > > ----- Original Message -----
> > > From: "Markus Kalb" <Markus.Kalb@gmx.net>
> > > To: <vdr@linuxtv.org>
> > > Sent: Monday, July 01, 2002 2:25 AM
> > > Subject: [vdr] vdr Restarting Tool (cron Job + Perl)
> > >
> > [...]
> > 
> > > Have you seen the runvdr script in the Distribution. It starts
> > > VDR immidiately after it has crashed. It fails only If VDR
> > > hungs. Is there a chance to figure out if the VDR is running but
> > > not working properly.
> > >
> > > BR
> > 
> > Maybe one could telnet to port 2001 on localhost. If there is no
> > reaction within a certain time limit, it's most likely that vdr is
> > gone.
> > 
> > - --
> > 
> > I am wondering if this tool (might be a perl script) already
> > exists. Does anybody know one ?
> > Otherwise i have to start my brain for a coding session.
> > 
> > best regards
> > 
> > BR
> 
> 


-- 
 /"\         Markus Kalb <markus.kalb@gmx.de>
 \ /	                GnuPG Key ID B93BDF1E
  X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
 / \




Home | Main Index | Thread Index