[Icecast] extracting statistics

José Luis Artuch artuch at speedy.com.ar
Sun Dec 8 15:15:16 UTC 2019

Hi Robert !

El dom, 08-12-2019 a las 12:42 +1300, Robert Jeffares escribió:
> Hi all,
> I have an icecast server in a facility which can handle several
> hundred 
> simultaneous connections and I would like to produce some data like:
> How many people are listening now?
> Where might they be? [general area is OK]
> How long have they been listening?
> How many different listeners have we had? [ lets not count returning 
> listeners as new ]
> What is the average time spent listening?
> I have been ferreting around and figured out how to create a
> status2.xsl 
> file and where to put it but I can't see how to get the ip's of the 
> listeners or any of the other data.
> I know it has to be in there, I just don't know how to get there.
> any help appreciated
> regards
> Robert

A few years ago I found a class in PHP with which I obtained ID, IP and
elapsed time of the devices connected to the Icecast2 server, so I made
a PHP script that every thirty seconds does the following:
1.- Call the PHP class
2.- With the data obtained from the server, make an array
3.- With *geoplugin*, obtain data about the location of each IP
connected (city, region, countryName, etc.)
4.- With *browscap.ini*, obtain data about operating systems and web
browsers (the Icecast2 server also provides this data)
5.- With all this data make a list, ordering devices according to the
elapsed time
6.- Has an audible alarm to alert about connection (ascending),
connection + disconnection (flat) and disconnection (descending)

It could be improved a lot, but maybe this can help you.

You can see it working here:

For the script to capture your data you **should** connect here:

... But since it is behind a proxy to achieve HTTPS in Debian 10 !! ...
ggrrr :), for the script to capture your data, you must connect
directly here:

You can do tests.

José Luis

> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast

More information about the Icecast mailing list