| View previous topic :: View next topic |
| Author |
Message |
chricken
Joined: 02 Nov 2007 Posts: 6
|
Posted: Sun Oct 04, 2009 9:45 am Post subject: Logging number of Listerners |
|
|
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 |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Oct 04, 2009 1:01 pm Post subject: |
|
|
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 |
|
 |
chricken
Joined: 02 Nov 2007 Posts: 6
|
Posted: Mon Oct 05, 2009 6:51 pm Post subject: |
|
|
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 |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Oct 05, 2009 7:58 pm Post subject: |
|
|
just use curl or wget to retrieve the contents, and call it once every so often.
karl. |
|
| Back to top |
|
 |
chricken
Joined: 02 Nov 2007 Posts: 6
|
Posted: Tue Oct 06, 2009 5:17 pm Post subject: |
|
|
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 |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Oct 06, 2009 8:02 pm Post subject: |
|
|
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 |
|
 |
|