3

Currently I'm running uShare to stream videos from my home-server via DLNA to the TV. On the server there is also running a bash-script which checks if a user is connected via ssh or Samba. If this is not the case, then the server goes to hibernation-mode.

Is there any possibility to check via bash-script if the server currently streams a video to my TV? If so, I would like to see a little code example which I could include in my script which check the ssh or Samba connection.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Chrispie
  • 3,613
  • 2
  • 13
  • 16
  • I would dump the outgoing traffic from your server and sift through it for packets indicating DLNA activity. I'm not really aware of the DLNA protocol, though, so I can't help with actual code. – Joseph R. Oct 03 '13 at 11:00
  • This is an interesting idea. I'm also not very aware with it. My hope was that it can be solved by the use of grep on the process-list or something like that. Because then it would be easy to add this to the script I mentioned above. – Chrispie Oct 03 '13 at 13:13
  • @Chrispie well, dump `ps xa` when its not streaming v. when it is, and see if they differ... Maybe `lsof` as well, that's another way you might find it (if it has a network socket open). – derobert Oct 03 '13 at 22:58

0 Answers0