Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
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.
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?
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
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.
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.
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