Get real time information about media served

Help
jayrock
2011-09-19
2013-05-29
  • jayrock
    jayrock
    2011-09-19

    Hi,

    is it possible to receive real time information from MiniDLNA if and what media is served? Alternatively is it possible to see if and how many clients are connected?

    Background: This is for a project that aims at automatic server suspend when the server is not needed.

    Thanks,

    jayrock

     
  • Justin Maggard
    Justin Maggard
    2011-09-21

    There is no detailed information available today.  But, since MiniDLNA is a forking server, maybe you can just see if the main daemon process has any children?

     
  • jayrock
    jayrock
    2011-09-21

    Makes sense, but: I'm streaming a music file right now to WMP, but I don't see any child processes to the MiniDLNA processes

     
  • Justin Maggard
    Justin Maggard
    2011-09-21

    Okay, so it really depends on your architecture, kernel, and C library.  What kind of system is this?  On a normal, modern x86 PC architecture with a halfway-recent distro, you should only have one minidlna process unless it's either scanning media or serving data to a client.

     
  • jayrock
    jayrock
    2011-09-22

    It's a very recent system. Core i3, Intel H55, Fedora 14.

    I actually have three processes running all the time, regardless of media served. Eg, right now, no media served:

    root ~$ ps ax | grep minidlna
     2288 ?        Ss     0:00 /usr/sbin/minidlna -f /etc/minidlna.conf
     2304 ?        S      0:00 /usr/sbin/minidlna -f /etc/minidlna.conf
     2307 ?        SN     0:00 /usr/sbin/minidlna -f /etc/minidlna.conf
    

    There a three dirs though that I monitor.

    But anyway, i'm looking for a more general way to figure out if media is served to a client. The method shouldn't be limited to my specific system or configuraiton.

     
  • gharris999
    gharris999
    2011-11-06

    A more generic (and pretty easy) way to do this might be to monitor network traffic.  That's what I'm doing with my SrvrPowerCtrl plugin, which is a perl plugin for the Logitech Squeezeboxserver.  I specifically added network monitoring so I could keep the server awake while minidlna is serving up videos.  See Stats.pm in http://code.google.com/p/srvrpowerctrl/source/browse/SrvrPowerCtrl_beta.zip