Logdaten aus dem VDR Terminal schreiben ?

  • Hallo
    Wie bekomme ich das hin das die Ausgaben die auf TTY8 zu sehen sind auch in einem seperatem Logfile gespeichert werden ?


    Oder wie kann ich mit Putty auf TTY8 umschalten um die Ausgaben zu sehen '?


    Das Logfile wäre mein Favorit.


    Werner

    MB ASUS A7N8X-E Deluxe, AMD Athlon(tm) XP 2600+, 512 MB RAM, MiniVDR 1.3 ,Kernel 2.6.13-2, SAMSUNG SP2514N (Kapazität: 250 GiB), SAMSUNG SV1203N (Kapazität: 120 GiB), TT 1.3 DVBs, Skystar2, ATX Desktop Gehäuse, GLCD 128 x 64, LIRC-FB, Opical & COAX-Digi Out über Asus SP-dif an DVB. VDR Version 1.3.28

  • Hallo Werner,


    mit PuTTY kannst Du Dir die Ausgaben auf tty8 nicht ansehen.
    Du startest VDR wahrscheinlich mit so etwas wie:

    Code
    vdr {paramtergedöns} > /dev/tty8


    Bau doch einfach mal ein T-Stück ;) ein:

    Code
    vdr {paramtergedöns} |tee /var/log/vdr.log > /dev/tty8


    Grüße
    Peter

    #1: Fujitsu Siemens Multitainer (leise), Celeron 733MHz, 256 MB, 80 + 120 GB HDD, Siemens DVB-S 1.3, µC-Wakeup, , AVBoard, c't-VDR5 mit image, mlcd, muggle, pilot, streamdev-server, vdradmin, vdrconvert, noad
    #2: Streaming-Client Dell optiplex GXi, Pentium-133, DXR3, c't-VDR3

    Einmal editiert, zuletzt von peterm ()

  • Hi,


    aber warum willst Du das eigentlich tun? Alles interessante schreibt VDR sowieso in's syslog, bei Suse /var/log/messages. Hier kannst Du per "grep vdr" eigentlich alles finden, was Du für Fehleranalyse und ähnliche Dinge benötigst.


    Grüße
    Peter

    #1: Fujitsu Siemens Multitainer (leise), Celeron 733MHz, 256 MB, 80 + 120 GB HDD, Siemens DVB-S 1.3, µC-Wakeup, , AVBoard, c't-VDR5 mit image, mlcd, muggle, pilot, streamdev-server, vdradmin, vdrconvert, noad
    #2: Streaming-Client Dell optiplex GXi, Pentium-133, DXR3, c't-VDR3

  • Hi ..
    ist ja schön und gut aber leider geht das so nicht.
    Einige Plugins schreiben ihre Daten Direkt in TTY8
    Und das würde ich gerne schreiben.
    Habe meinen VDR mit dem SetupScript vom Entwickler erstellt und da sieht die RunVDR so aus.


    #!/bin/sh
    #
    # sample runvdr script


    DESC="Digital Videorecorder"
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    CONF=/usr/local/src/VDRtmp/vdr.conf


    . $CONF


    VERSION=`grep -s 'define VDRVERSION' $MYPATH/VDR/config.h | cut -f 2 -d '"'`
    test "$VERSION" || exit 0


    VDRPRG=$MYPATH/VDR/vdr
    test -x $VDRPRG || exit 0


    getconfig()
    {
    config=`grep =\" $CONF | sed -e 's/=.*//' -e '/^#/d'`


    for i in $config ; do
    eval x=\$$i
    if (echo $i | egrep -q _) ; then
    VDROPT=$VDROPT" --`echo "${i##*\_}" | tr A-Z a-z`='$x'"
    fi
    export $i="$x"
    done
    }


    getplugins()
    {
    unset PLUGINS ordered_plugins[@] plugins[@]


    plugins=( `find $VDR_LIB -name "libvdr-*.so.$VERSION" -printf '%f ' 2>&- | sed "s/libvdr-\([^\.]\+\)\.so\.$VERSION/\1/g"` )
    ordered=( `grep -vs ^# $VDR_CONFIG/order.conf` )
    plugins=( "${plugins[@]}" )


    for i in ${ordered[@]} ; do
    for (( line=0 ; line<${#plugins[@]} ; line++ )) ; do
    if [ "$i" = "${plugins[$line]}" ] ; then
    ordered_plugins=( "${ordered_plugins[@]}" "${plugins[$line]}" )
    unset plugins[$line]
    plugins=( "${plugins[@]}" )
    break
    fi
    done
    done


    for i in ${ordered_plugins[@]} ${plugins[@]} ; do
    n=`grep -s "^$i " $VDR_CONFIG/plugins.conf`
    if [ "$n" ] ; then
    PLUGINS=$PLUGINS" -P'$n'"
    else
    PLUGINS=$PLUGINS" -P$i"
    fi
    done
    }


    getcommands()
    {
    cd $VDR_CONFIG


    find ${VDR_LIB%s*} -name "libvdr-*.so.$VERSION" -printf '%f\n' 2>&- \
    | sed "s/^libvdr-\(..*\)\.so\.$VERSION$/\1/" | sort \
    | awk '{ printf "%-40s%-0s\n" ," |--- "$1,": export LABEL=\""$1"\" ; eval $SET_PLUGINS" }' >commands[2].conf


    echo `ls commands[*\].conf 2>/dev/null` | xargs cat >commands.conf
    }


    modules()
    {
    case $1 in
    m*) echo "Starting DVB:" ;;
    *) echo "Shutting down DVB:" ;;
    esac
    OLD=$IFS
    IFS=$'\t'$'\n'
    for i in $MODULES ; do
    IFS=$OLD
    $1 $i >/dev/null 2>&1
    status=$?
    case $status in
    0) echo "[done] $i" ;;
    1) echo "[failed] $i" ;;
    esac
    IFS=$'\t'$'\n'
    done
    IFS=$OLD
    }


    driver()
    {
    IVMOD=`lsmod | grep -w '^ivtv' | wc -l`
    if [ -x $MYPATH/ivtv/utils/runivtv -a $IVMOD -eq 0 ] ; then
    sh $MYPATH/ivtv/utils/runivtv
    fi


    LSMOD=`lsmod | grep -w '^dvb' | wc -l`
    if [ $LSMOD -eq 0 ] ; then
    if cd $MYPATH/DVB/build-2.$(uname -r | sed -e 's/^2\.\(.\).*/\1/') 2>/dev/null ; then
    # = 1.1.1
    ./insmod.sh load
    else
    # = 1.0.1
    #cd $MYPATH/DVB/driver ; make insmod
    modules modprobe
    fi
    if [ "$SSTIME" -ne 0 ] ; then
    echo "Load still image:"
    test_stillimage $STILLIMAGE
    fi
    fi
    }


    loadlirc()
    {
    LIRCD=`ps -e | grep -w 'lircd' | wc -l`
    if [ $LIRCD -eq 0 ] ; then
    lircd &
    fi


    IREXEC=`ps -e | grep -w 'irexec' | wc -l`
    if [ $IREXEC -eq 0 ] ; then
    irexec -d $VDR_CONFIG/setup/etc/lircrc.sample
    fi
    }


    setplugins()
    {
    export SET_PLUGINS="
    REAL=\`find ${VDR_LIB%s*} -name \"libvdr-\$LABEL\.so.$VERSION\" -printf '%f\n' 2>&-\` ;
    if (echo "$RULES" | egrep -q \"\[\$LABEL\]\") ;
    then
    echo \"Error plugin \$LABEL is secure !\" ;
    elif [ -h $VDR_LIB/\$REAL ] ;
    then
    if (rm -f $VDR_LIB/\$REAL) ;
    then
    echo \"\$LABEL = off\" ;
    fi ;
    else
    if (ln -s ${VDR_LIB%s*}/\$REAL $VDR_LIB/\$REAL) ;
    then
    echo \"\$LABEL = on\" ;
    fi ;
    fi"
    }


    getconfig
    driver
    #loadlirc
    setplugins
    getcommands


    while (true) ; do


    CHAN=$(tail -n 300 $SYSLOG | grep 'switching to channel' | tail -n 1 | awk -F channel '{ print $2 }' | tr -d ' ')
    if [ -n "${CHAN##*[^0-9,-]*}" -a -e $VDR_CONFIG/setup.conf ] ; then
    if [ "$(grep ^CurrendChannel $VDR_CONFIG/setup.conf | awk -F = '{ print $2 }' | tr -d ' ')" != "$CHAN" ] ; then
    echo "Edit last channel: `grep -v ^: $VDR_CONFIG/channels.conf | head -n $CHAN | tail -n 1 | cut -f 1 -d :` ..."
    sed -i "s/^CurrentChannel = .*$/CurrentChannel = $CHAN/" $VDR_CONFIG/setup.conf
    sleep 1
    fi
    fi


    getplugins
    echo "Starting $DESC: $VERSION"
    su $VDRUSR -c "$VDRPRG $VDROPT $USRDEV $PLUGINS"
    if [ $? -eq 0 -o $? -eq 2 ] ; then
    exit
    fi
    date
    echo "Restarting $DESC:"
    killall -q -TERM $VDRPRG >/dev/null 2>&1
    sleep 3
    date
    if cd $MYPATH/DVB/build-2.$(uname -r | sed -e 's/^2\.\(.\).*/\1/') 2>/dev/null ; then
    # = 1.1.1
    ./insmod.sh reload
    else
    # = 1.0.1
    #cd $MYPATH/DVB/driver ; make rmmod ; make insmod
    modules rmmod
    modules modprobe
    fi
    done


    Dazu gibst dann noch Diverse Conf Dateien in denen ich auch nichts so ändern kann das es geht. Muss also irgendwo in der obengezeigten RunVDR liegen.


    Nur da blick ich noch nicht so Durch.


    Werner

    MB ASUS A7N8X-E Deluxe, AMD Athlon(tm) XP 2600+, 512 MB RAM, MiniVDR 1.3 ,Kernel 2.6.13-2, SAMSUNG SP2514N (Kapazität: 250 GiB), SAMSUNG SV1203N (Kapazität: 120 GiB), TT 1.3 DVBs, Skystar2, ATX Desktop Gehäuse, GLCD 128 x 64, LIRC-FB, Opical & COAX-Digi Out über Asus SP-dif an DVB. VDR Version 1.3.28

    Einmal editiert, zuletzt von Smartkiller ()

  • Hallo Werner,


    also in Deiner runvdr steht nix von tty8. Wie wird denn dieses Skript gestartet? Es gibt wahrscheinlich irgendein Skript in /etc/init.d, das das übernimmt, oder? Wahrscheinlich ist da ein "chvt" drin?


    Du kannst doch die Zeile

    Code
    su $VDRUSR -c "$VDRPRG $VDROPT $USRDEV $PLUGINS"

    folgendermaßen abändern:

    Code
    su $VDRUSR -c "$VDRPRG $VDROPT $USRDEV $PLUGINS < /dev/tty8 | tee /var/log/vdr.log > /dev/tty8"


    Dann müsste es eigentlich gehen, oder?


    Grüße
    Peter

    #1: Fujitsu Siemens Multitainer (leise), Celeron 733MHz, 256 MB, 80 + 120 GB HDD, Siemens DVB-S 1.3, µC-Wakeup, , AVBoard, c't-VDR5 mit image, mlcd, muggle, pilot, streamdev-server, vdradmin, vdrconvert, noad
    #2: Streaming-Client Dell optiplex GXi, Pentium-133, DXR3, c't-VDR3

  • werde das mal versuchen....


    das RunVdr wird bei mir in der inittab gestartet.
    mit


    vdr:35:once:/usr/local/src/VDR/runvdr > /dev/null


    und das hier steht in der config für das obenstehende runvdr.


    # Environment for VDR
    #
    # Format:
    #
    # VDR_OPTION=""
    # ^^^^^^
    # see vdr --help
    #
    # VDR_EPG="......" (tr A-Z a-z)
    # ^^^
    # --epg='......'


    # user
    VDRUSR="root"


    # path to VDR/DVB
    MYPATH="/usr/local/src"


    # directory where vdr stores its config files. vdr defaults to /video
    VDR_CONFIG="/usr/local/src/VDRtmp"


    # path to scripts
    SCRDIR="$VDR_CONFIG/scripts"


    # write the EPG data into the given FILE (default is /video/epg.data)
    # use '-E-' to disable this if FILE is a directory, the default EPG file will be created in that directory
    VDR_EPG="$VDR_CONFIG/epg.data"


    # call CMD to shutdown the computer
    VDR_SHUTDOWN="$SCRDIR/vdrshutdown.sh"


    # activate the watchdog timer with a timeout of SEC
    # seconds (default: 0); '0' disables the watchdog
    VDR_WATCHDOG="60"


    # controlling tty
    VDR_TERMINAL="/dev/tty8"


    # which port to listen vor SVDRP commands, see vdr --help. default (default: 2001)
    VDR_PORT=


    # search for plugins in DIR (default is ./PLUGINS/lib)
    VDR_LIB="$MYPATH/VDR/PLUGINS/libs"


    # amount of log messages, see vdr --help. default empty
    VDR_LOG=3


    # noad options (0.4.1 or higher):
    #
    # -s --statisticfile=<file> filename where some statistic datas are stored
    # -v --verbose increments loglevel by one, can be given multiple
    # -b --background noad runs as a background-process
    # -p --priority priority-level of noad when running in background [20...-20] default 20
    # -c --comments add comments to the marks
    # -o --overlap detect overlaps
    # -a --ac3 use ac3-detection
    # -j --jumplogo detect jumping logos
    # -O --OSD noad sends an OSD-Message to localhost:2001 for start and end
    # -S --savelogo save the detected logo
    # -B --backupmarks move the marks.vdr to marks0.vdr
    # -n --nelonen special behavior for finish stations
    # -V --version print version-info and exits
    #
    # call CMD before and after a recording, e.g:
    #VDR_RECORD="/usr/local/bin/noad --statisticfile=/video/noadstat --jumplogo --OSD --savelogo"


    # use DIR as video directory (default: /video)
    VDR_VIDEO="/video"


    # send Dolby Digital audio to stdin of command CMD
    VDR_AUDIO=


    # use only the given DVB device (NUM = 0, 1, 2...)
    # there may be several -D options (default: all DVB devices will be used)
    VDR_DEV=


    # misc ... e.g: "--mute --daemon"
    USRDEV=


    # rules, this plugins not (on/off) via commands menu, format: "[plugin1][plugin2]....."
    RULES="[remote]"


    # display the image <n> seconds, no splash set it to "0"
    SSTIME="3"


    # videodev than the first (still image)
    DEVICE="/dev/dvb/adapter0/video0"


    # path to still image
    STILLIMAGE="$VDR_CONFIG/boot/logo-fb"


    # for read the last channel
    SYSLOG="/var/log/vdrlog"


    # unloading / loads the following modules
    MODULES="
    videodev
    dvb-core dvb_shutdown_timeout=0
    alps_tdmb7
    alps_bsrv2
    grundig_29504-401
    grundig_29504-491
    stv0299
    ves1820
    input
    evdev
    dvb-ttpci vidmode=1
    "


    # Skystar2 rev 2.3
    #MODULES="
    #dvb-core
    #skystar2
    #mt312
    #"


    # Skystar2 rev 2.6B
    #MODULES="
    #dvb-core
    #skystar2
    #stv0299
    #"


    Werner

    MB ASUS A7N8X-E Deluxe, AMD Athlon(tm) XP 2600+, 512 MB RAM, MiniVDR 1.3 ,Kernel 2.6.13-2, SAMSUNG SP2514N (Kapazität: 250 GiB), SAMSUNG SV1203N (Kapazität: 120 GiB), TT 1.3 DVBs, Skystar2, ATX Desktop Gehäuse, GLCD 128 x 64, LIRC-FB, Opical & COAX-Digi Out über Asus SP-dif an DVB. VDR Version 1.3.28

    Einmal editiert, zuletzt von Smartkiller ()

Jetzt mitmachen!

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