Leerlauf erkennen, für den VDR / Idle detect for VDR

  • Gibt es eine Möglichkeit (über ein Skript oder andere) zu erkennen, wenn VDR ist für xx Minuten Leerlauf - Eg. Keine andere XBMC Clients verbunden sind oder Streaming?


    Ich möchte meine 'Server' zu schlafen, wenn sie für eine gewisse Zeit im Leerlauf gestellt.


    Danke
    -----


    Is there any way (via script or other) to detect if VDR is idle for xx minutes - Eg. No other XBMC clients are connected or streaming?


    I would like to put my 'server' to sleep if it is idle for a certain amount of time.


    Thanks

  • why not check with ip-ping ?


    script examples found here:
    http://www.ns4300n-info.de/forum/index.php?topic=106.0


    I know that this is not a VDR specific (or streamdev-server) solution - but a beginning to work with...


    joe

  • Good idea.. it hadn't ocurred to me to check if the client PC was alive instead :)


    The only problem I can think of is if VDR is recording something, as I presume if I told Ubuntu to sleep it would do so regardless?


    Hopefully Alwin may have something up his sleeve to tell if any client is connected :D

  • I think one thing is to grep ips from the log file - to know if a client is connected.


    Code
    Feb  2 11:19:42 vdr vdr: [14054] Streamdev: Accepted new client (HTTP) 192.168.0.2:1599
    Feb  2 11:19:42 vdr vdr: [14054] streamdev-server: Detaching current receiver
    Feb  2 11:19:42 vdr vdr: [14054] streamdev: closing streamdev connection to 192.168.0.2:1599
    Feb  2 11:19:42 vdr vdr: [14054] Streamdev: Accepted new client (HTTP) 192.168.0.2:1600
    Feb  2 11:19:43 vdr vdr: [14054] streamdev-server: Detaching current receiver
    Feb  2 11:19:43 vdr vdr: [14054] streamdev: closing streamdev connection to 192.168.0.2:1600


    and check for timers here
    /var/lib/vdr/timers.conf


    or look at that shutdown script
    http://www.vdr-wiki.de/wiki/index.php/Shutdown.sh

  • To check if the VDR currently records something you can also use the
    svdrpsend.pl command


    Code
    svdrpsend.pl NEXT rel


    Seconds until next timer. A negative number indicates that a recording is done.


    Best Regards
    schneisa

  • Shouldn't streamdev report if its busy or not ? - if not there would be something important missing ... which i don't believe.


    Also VDR knows if its busy, so you should configure IdleTimeout in VDR, thenVDR will request to shutdown the machine if idle.


    Additional possibilities to check idle you have by using a shutdown script which is called right before going down. This scripts can block the shutdown or request to ask again in a few minutes. If you want to check for your clients with ipping, this could be done here as well, if you want to keep the server alive if a defined set machines is still around.

    VDR User: 87 - LaScala LC14B - LG/Phillipps 6,4" VGA Display | Asrock H61/U3S3 | G630T | 1x 16GB Mobi Mtron 3035 1x WD 750GB 2,5" |1x L4m DVB-S2 Version 5.4

    Einmal editiert, zuletzt von steffen_b ()

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!