[icecast] Parsing the icecast stats log

Gregory J.Grubbs greg at hoochiepep.com
Wed Oct 30 20:19:46 UTC 2002


Hello All,

I wrote a PHP function to parse the icecast stats log and return as much information in a structured array as possible (well, as much as I care about, anyway).  Because the stats log is not easily machine-parseable, I thought this might be useful to somebody.  The log is parsed using Perl-compatible regexps, so it should easily port.

I have only my own setup to test this on, so I'm sure it will break on different setups.  My setup is icecast 1.3.12 on Linux, using the ices from CVS on September 18, 2002.  

The function get_icecast_stats() is included in the attached file icecastlog.inc, and sample output is included icecast_stats.txt (simply a print_r of the returned result).  You will only need to set the value of $iceroot to allow the function to find the stats log.

My icecast server is not public, so don't worry about unmodified URLs in the sample output!

-Gregory J. Grubbs

<p>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icecastlog.inc
Type: application/octet-stream
Size: 3438 bytes
Desc: icecastlog.inc
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20021030/b2f082e1/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: icecast_stats.txt
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20021030/b2f082e1/attachment.txt>


More information about the Icecast mailing list