Page 1 of 1

How to show active connections without web gui ?

Posted: Wed Jul 06, 2011 11:40 pm
by tws1138
Hello all,

newbie me just bought Twonky Server and registered to the forum because I already have a question :D
I can see on the "Server Status" page of the Twonky Server web gui the currently streamed objects and the "active local connections" below the bottom line.

I was wondering if I can gather this information from any log or configuration file or by any twonky command?

The reason behind is that I like to save power and turn off my Linux twonky server if there are no more active connections for a while. I thought it would be the best to get the information right from the server and not from some Linux system command. I can bring my server back online with a "Wake on LAN" tool if I need it again.

Is this the best way to monitor the twonky streaming activities or is there a better way to collect such status information?

Thank you for your support :!:

Re: How to show active connections without web gui ?

Posted: Thu Jul 07, 2011 9:12 am
by Georg
You could try to write a script which evaluates the answers on

http://<ip>:<port>/rpc/stream_active
http://<ip>:<port>/rpc/stream_info

The fist should give you the number of active streams, which should be sufficient for your needs.

Cheers,

Georg

Re: How to show active connections without web gui ?

Posted: Fri Jul 08, 2011 3:25 pm
by tws1138
Awesome!!!

I catch the data of your given rpc outputs with "wget" to a file and check constantly if the <SA> value changes. When it remains "0" for 15 minutes I can halt the system.

Thank you very much. This was a very warm welcome to the forum.

Cheers,
tws

Re: How to show active connections without web gui ?

Posted: Sun Jul 10, 2011 2:20 pm
by Georg
Twonky has great features and a lot of possibilities to twist things. Unfortunately the docu for these specialties is the big weakness... The forum helps somewhat.

Welcome!

Georg