Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Logging number of Listerners

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
chricken



Joined: 02 Nov 2007
Posts: 6

PostPosted: Sun Oct 04, 2009 9:45 am    Post subject: Logging number of Listerners Reply with quote

Hi,
I am wondering, if there is a possibility to write a log, where the actual number of listeners is written down. It should be something like comma seperated value, containing the date and the amount of listeners.
It would be great, if this info would be written in a file every 5 minutes or so (maybe via cronjob).

Is there a possibility? I mean, there is an information in the icecast-statistics XML called <client_connections>. This knot should be written down to a file.
Unfortunately my skills are not fullfilling my needs.

Btw: I am using Debian Linux

I hope, somebody can help me?

Regards
Chricken
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Oct 04, 2009 1:01 pm    Post subject: Reply with quote

you can always query the /admin/stats page or a custom xsl page in webroot every 5 mins to extract the listeners value and then write that to a file.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
chricken



Joined: 02 Nov 2007
Posts: 6

PostPosted: Mon Oct 05, 2009 6:51 pm    Post subject: Reply with quote

Hello KarlH,

Thanks for your answer. I hoped, that I can do so. But I have no idea how.
I could create an XSL-file to show the number of listeners inside a webbrowser, but how do I write that into a file?

With regards
Chricken
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Oct 05, 2009 7:58 pm    Post subject: Reply with quote

just use curl or wget to retrieve the contents, and call it once every so often.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
chricken



Joined: 02 Nov 2007
Posts: 6

PostPosted: Tue Oct 06, 2009 5:17 pm    Post subject: Reply with quote

I still don't get it, sorry.
I don't see, how cURL or wGET could fulfill my desires. As far as I see, these are download-programs. How can I convince one of these tools to write parts of a webpage into a file? What am I doing wrong?

I need the actual number of players to be written into a file, so that I can create a statistics table later.
If possible I need the date, time and the number of listeners.

Thank you
Chricken
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Oct 06, 2009 8:02 pm    Post subject: Reply with quote

curl -s http://icecast:8000/mycustom.xsl >> log.file

the xsl file can be as simple as you wish, the status2.xsl generates a csv file but use whatever format suites. or you can get xml and parse it from a php script. Either way will get you want you want.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber