| 1 |
<!DOCTYPE html> |
| 2 |
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> |
| 3 |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> |
| 4 |
<head> |
| 5 |
<meta charset="utf-8"> |
| 6 |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 8 |
|
| 9 |
|
| 10 |
<link rel="shortcut icon" href="../img/favicon.ico"> |
| 11 |
<title>Server Statistics - Icecast Docs</title> |
| 12 |
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'> |
| 13 |
|
| 14 |
<link rel="stylesheet" href="../css/theme.css" type="text/css" /> |
| 15 |
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" /> |
| 16 |
<link rel="stylesheet" href="../css/highlight.css"> |
| 17 |
|
| 18 |
<script> |
| 19 |
// Current page data |
| 20 |
var mkdocs_page_name = "Server Statistics"; |
| 21 |
var mkdocs_page_input_path = "server_stats.md"; |
| 22 |
var mkdocs_page_url = "/server_stats/"; |
| 23 |
</script> |
| 24 |
|
| 25 |
<script src="../js/jquery-2.1.1.min.js"></script> |
| 26 |
<script src="../js/modernizr-2.8.3.min.js"></script> |
| 27 |
<script type="text/javascript" src="../js/highlight.pack.js"></script> |
| 28 |
|
| 29 |
</head> |
| 30 |
|
| 31 |
<body class="wy-body-for-nav" role="document"> |
| 32 |
|
| 33 |
<div class="wy-grid-for-nav"> |
| 34 |
|
| 35 |
|
| 36 |
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav"> |
| 37 |
<div class="wy-side-nav-search"> |
| 38 |
<a href=".." class="icon icon-home"> Icecast Docs</a> |
| 39 |
|
| 40 |
</div> |
| 41 |
|
| 42 |
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| 43 |
<ul class="current"> |
| 44 |
|
| 45 |
|
| 46 |
<li class="toctree-l1"> |
| 47 |
|
| 48 |
<a class="" href="..">Introduction</a> |
| 49 |
</li> |
| 50 |
|
| 51 |
<li class="toctree-l1"> |
| 52 |
|
| 53 |
<a class="" href="../basic_setup/">Basic Setup</a> |
| 54 |
</li> |
| 55 |
|
| 56 |
<li class="toctree-l1"> |
| 57 |
|
| 58 |
<a class="" href="../config_file/">Configuration File</a> |
| 59 |
</li> |
| 60 |
|
| 61 |
<li class="toctree-l1 current"> |
| 62 |
|
| 63 |
<a class="current" href="./">Server Statistics</a> |
| 64 |
<ul class="subnav"> |
| 65 |
|
| 66 |
<li class="toctree-l2"><a href="#html-interface">HTML Interface</a></li> |
| 67 |
|
| 68 |
|
| 69 |
<li class="toctree-l2"><a href="#json-stats">JSON Stats</a></li> |
| 70 |
|
| 71 |
|
| 72 |
<li class="toctree-l2"><a href="#available-xml-data">Available XML data</a></li> |
| 73 |
|
| 74 |
<ul> |
| 75 |
|
| 76 |
<li><a class="toctree-l3" href="#general-statistics">General Statistics</a></li> |
| 77 |
|
| 78 |
<li><a class="toctree-l3" href="#source-specific-statistics">Source-specific Statistics</a></li> |
| 79 |
|
| 80 |
</ul> |
| 81 |
|
| 82 |
|
| 83 |
</ul> |
| 84 |
</li> |
| 85 |
|
| 86 |
<li class="toctree-l1"> |
| 87 |
|
| 88 |
<a class="" href="../auth/">Authentication</a> |
| 89 |
</li> |
| 90 |
|
| 91 |
<li class="toctree-l1"> |
| 92 |
|
| 93 |
<a class="" href="../relaying/">Relaying</a> |
| 94 |
</li> |
| 95 |
|
| 96 |
<li class="toctree-l1"> |
| 97 |
|
| 98 |
<a class="" href="../yp/">Listing in a YellowPage Directory</a> |
| 99 |
</li> |
| 100 |
|
| 101 |
<li class="toctree-l1"> |
| 102 |
|
| 103 |
<a class="" href="../admin_interface/">Admin Interface</a> |
| 104 |
</li> |
| 105 |
|
| 106 |
<li class="toctree-l1"> |
| 107 |
|
| 108 |
<a class="" href="../win32/">Windows Specific</a> |
| 109 |
</li> |
| 110 |
|
| 111 |
</ul> |
| 112 |
</div> |
| 113 |
|
| 114 |
</nav> |
| 115 |
|
| 116 |
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| 117 |
|
| 118 |
|
| 119 |
<nav class="wy-nav-top" role="navigation" aria-label="top navigation"> |
| 120 |
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| 121 |
<a href="..">Icecast Docs</a> |
| 122 |
</nav> |
| 123 |
|
| 124 |
|
| 125 |
<div class="wy-nav-content"> |
| 126 |
<div class="rst-content"> |
| 127 |
<div role="navigation" aria-label="breadcrumbs navigation"> |
| 128 |
<ul class="wy-breadcrumbs"> |
| 129 |
<li><a href="..">Docs</a> »</li> |
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
<li>Server Statistics</li> |
| 134 |
<li class="wy-breadcrumbs-aside"> |
| 135 |
|
| 136 |
</li> |
| 137 |
</ul> |
| 138 |
<hr/> |
| 139 |
</div> |
| 140 |
<div role="main"> |
| 141 |
<div class="section"> |
| 142 |
|
| 143 |
<p>Icecast provides extensive run time statistics. Both in the form of active connection numbers and cumulative |
| 144 |
counters (since server startup or respectively source connection startup).</p> |
| 145 |
<h1 id="html-interface">HTML Interface</h1> |
| 146 |
<p>Icecast comes with a HTML web interface, it exposes a basic set of server statistics that should |
| 147 |
fulfil basic user needs. Icecast uses the very powerful libxslt engine to transform its internal |
| 148 |
raw statistical data into custom tailored interfaces.<br /> |
| 149 |
Many people have written custom XSLT code that produces e.g. plain text “now playing”, XSPF, VCLT, |
| 150 |
munin interface data, etc. If so desired, the files in webroot can be customized to contain more or less |
| 151 |
information (see section on raw XML data below).</p> |
| 152 |
<div class="admonition attention"> |
| 153 |
<p class="admonition-title">Attention</p> |
| 154 |
<p><strong>We strongly discourage attempts to scrape data from the web interface</strong> as we do not consider this an |
| 155 |
API and will change it, even completely, between versions! The preferred ways are custom XSLT, JSON and raw XML.</p> |
| 156 |
</div> |
| 157 |
<h1 id="json-stats">JSON Stats</h1> |
| 158 |
<p>Since version 2.4.0 Icecast includes a basic JSON endpoint (<code>/status-json.xsl</code>) based on a xml2json template by Doeke Zanstra |
| 159 |
(see <code>xml2json.xslt</code>). It exposes the same set of server statistics that are available through the web interface and |
| 160 |
should fulfil basic user needs. The intention is to not break backwards compatibility of this interface in the future, |
| 161 |
still we recommend to design robust software that can deal with possible changes like addition or removal of variables. |
| 162 |
Also note that not all variables are available all the time and availability may change at runtime due to stream type, etc.</p> |
| 163 |
<h1 id="available-xml-data">Available XML data</h1> |
| 164 |
<p>This section contains information about the raw XML server statistics data available inside Icecast. An example |
| 165 |
stats XML tree will be shown and each element will be described. The following example stats tree will be used: </p> |
| 166 |
<pre><code class="xml"><icestats> |
| 167 |
<admin>icemaster@localhost</admin> |
| 168 |
<client_connections>649</client_connections> |
| 169 |
<clients>2</clients> |
| 170 |
<connections>907</connections> |
| 171 |
<file_connections>379</file_connections> |
| 172 |
<host>localhost</host> |
| 173 |
<listener_connections>90</listener_connections> |
| 174 |
<listeners>0</listeners> |
| 175 |
<location>Earth</location> |
| 176 |
<server_id>Icecast 2.5</server_id> |
| 177 |
<source_client_connections>164</source_client_connections> |
| 178 |
<source_relay_connections>0</source_relay_connections> |
| 179 |
<source_total_connections>164</source_total_connections> |
| 180 |
<sources>2</sources> |
| 181 |
<stats>0</stats> |
| 182 |
<stats_connections>0</stats_connections> |
| 183 |
<source mount="/audio.ogg"> |
| 184 |
<title>All that she wants</title> |
| 185 |
<artist>Ace of Base</artist> |
| 186 |
<audio_bitrate>499821</audio_bitrate> |
| 187 |
<audio_channels>2</audio_channels> |
| 188 |
<audio_info>samplerate=44100;quality=10%2e0;channels=2</audio_info> |
| 189 |
<audio_samplerate>44100</audio_samplerate> |
| 190 |
<channels>2</channels> |
| 191 |
<genre>various</genre> |
| 192 |
<ice-bitrate>499</ice-bitrate> |
| 193 |
<listener_peak>0</listener_peak> |
| 194 |
<listeners>0</listeners> |
| 195 |
<listenurl>http://localhost:8000/audio</listenurl> |
| 196 |
<max_listeners>unlimited</max_listeners> |
| 197 |
<public>1</public> |
| 198 |
<quality>10.0</quality> |
| 199 |
<samplerate>44100</samplerate> |
| 200 |
<server_description>Teststream</server_description> |
| 201 |
<server_name>Great audio stream</server_name> |
| 202 |
<server_type>application/ogg</server_type> |
| 203 |
<server_url>http://example.org/</server_url> |
| 204 |
<slow_listeners>0</slow_listeners> |
| 205 |
<source_ip>192.0.2.21</source_ip> |
| 206 |
<subtype>Vorbis</subtype> |
| 207 |
<total_bytes_read>3372153</total_bytes_read> |
| 208 |
<total_bytes_sent>0</total_bytes_sent> |
| 209 |
<user_agent>LadioCast/0.10.5 libshout/2.3.1</user_agent> |
| 210 |
</source> |
| 211 |
<source mount="/video.ogg"> |
| 212 |
<audio_bitrate>276000</audio_bitrate> |
| 213 |
<audio_channels>6</audio_channels> |
| 214 |
<audio_samplerate>48000</audio_samplerate> |
| 215 |
<frame_rate>25.00</frame_rate> |
| 216 |
<frame_size>720 x 576</frame_size> |
| 217 |
<genre>various</genre> |
| 218 |
<ice-bitrate>276</ice-bitrate> |
| 219 |
<listener_peak>0</listener_peak> |
| 220 |
<listeners>0</listeners> |
| 221 |
<listenurl>http://localhost:8000/video</listenurl> |
| 222 |
<max_listeners>unlimited</max_listeners> |
| 223 |
<public>0</public> |
| 224 |
<server_description>Unspecified description</server_description> |
| 225 |
<server_name>Unspecified name</server_name> |
| 226 |
<server_type>video/ogg</server_type> |
| 227 |
<slow_listeners>0</slow_listeners> |
| 228 |
<source_ip>192.0.2.21</source_ip> |
| 229 |
<subtype>Vorbis/Theora</subtype> |
| 230 |
<title>ERAGON</title> |
| 231 |
<total_bytes_read>37136</total_bytes_read> |
| 232 |
<total_bytes_sent>0</total_bytes_sent> |
| 233 |
<user_agent>Lavf/55.20.0</user_agent> |
| 234 |
<video_bitrate>200000</video_bitrate> |
| 235 |
<video_quality>0</video_quality> |
| 236 |
</source> |
| 237 |
</icestats> |
| 238 |
</code></pre> |
| 239 |
|
| 240 |
<h2 id="general-statistics">General Statistics</h2> |
| 241 |
<!-- FIXME --> |
| 242 |
|
| 243 |
<dl> |
| 244 |
<dt>admin</dt> |
| 245 |
<dd>As set in the server config, this should contain contact details for getting in touch with the server administrator. |
| 246 |
Usually this will be an email address, but as this can be an arbitrary string it could also be a phone number.</dd> |
| 247 |
<dt>client_connections</dt> |
| 248 |
<dd>Client connections are basically anything that is not a source connection. These include listeners (not concurrent, |
| 249 |
but cumulative), any admin function accesses, and any static content (file serving) accesses. |
| 250 |
<em>This is an accumulating counter.</em></dd> |
| 251 |
<dt>clients</dt> |
| 252 |
<dd>Number of currently active client connections.</dd> |
| 253 |
<dt>connections</dt> |
| 254 |
<dd>The total of all inbound TCP connections since start-up. |
| 255 |
<em>This is an accumulating counter.</em></dd> |
| 256 |
<dt>file_connections</dt> |
| 257 |
<dd><em>This is an accumulating counter.</em></dd> |
| 258 |
<dt>host</dt> |
| 259 |
<dd>As set in the server config, this should be the full DNS resolveable name or FQDN for the host on which this |
| 260 |
Icecast instance is running.</dd> |
| 261 |
<dt>listener_connections</dt> |
| 262 |
<dd>Number of listener connections to mount points. |
| 263 |
<em>This is an accumulating counter.</em></dd> |
| 264 |
<dt>listeners</dt> |
| 265 |
<dd>Number of currently active listener connections.</dd> |
| 266 |
<dt>location</dt> |
| 267 |
<dd>As set in the server config, this is a free form field that should describe e.g. the physical location of this server.</dd> |
| 268 |
<dt>server_id</dt> |
| 269 |
<dd>Defaults to the version string of the currently running Icecast server. While not recommended it can be overriden in |
| 270 |
the server config.</dd> |
| 271 |
<dt>server_start_iso8601</dt> |
| 272 |
<dd>Timestamp of server startup in ISO 8601 date format.</dd> |
| 273 |
<dt>server_start</dt> |
| 274 |
<dd>Timestamp of server startup in RFC 2822 date format. This field is deprecated and may be removed in a future version, |
| 275 |
please use <code>server_start_iso8601</code> instead.</dd> |
| 276 |
<dt>source_client_connections</dt> |
| 277 |
<dd>Source client connections are the number of times (cumulative since start-up, not just currently connected) a source |
| 278 |
client has connected to Icecast. |
| 279 |
<em>This is an accumulating counter.</em></dd> |
| 280 |
<dt>source_relay_connections</dt> |
| 281 |
<dd>Number of outbound relay connections to (master) icecast servers. |
| 282 |
<em>This is an accumulating counter.</em></dd> |
| 283 |
<dt>source_total_connections</dt> |
| 284 |
<dd>Both clients and relays. |
| 285 |
<em>This is an accumulating counter.</em></dd> |
| 286 |
<dt>sources</dt> |
| 287 |
<dd>The total of currently connected sources.</dd> |
| 288 |
<dt>stats</dt> |
| 289 |
<dd>The total of currently connected STATS clients.</dd> |
| 290 |
<dt>stats_connections</dt> |
| 291 |
<dd>Number of times a stats client has connected to Icecast. |
| 292 |
<em>This is an accumulating counter.</em></dd> |
| 293 |
</dl> |
| 294 |
<h2 id="source-specific-statistics">Source-specific Statistics</h2> |
| 295 |
<p>Please note that the statistics are valid within the scope of the current source connection. |
| 296 |
A reconnect or disconnection will reset those.</p> |
| 297 |
<dl> |
| 298 |
<dt>artist</dt> |
| 299 |
<dd>Artist of the current song |
| 300 |
<em>Metadata set by source client</em></dd> |
| 301 |
<dt>title</dt> |
| 302 |
<dd>Title of the current song |
| 303 |
<em>Metadata set by source client</em></dd> |
| 304 |
<dt>audio_bitrate</dt> |
| 305 |
<dd>Audio bitrate in bits/s |
| 306 |
<em>Can be set by source client</em></dd> |
| 307 |
<dt>audio_channels</dt> |
| 308 |
<dd>Number of audio channels.</dd> |
| 309 |
<dt>audio-info</dt> |
| 310 |
<dd>Information about the bitrate/samplerate/quality of the stream. |
| 311 |
Also used for directory listings. |
| 312 |
<em>Metadata set by source client</em> |
| 313 |
Example: |
| 314 |
<code>samplerate=44100;quality=10%2e0;channels=2</code> (LadioCast) |
| 315 |
<code>ice-bitrate=128;ice-channels=2;ice-samplerate=44100</code> (Butt)</dd> |
| 316 |
<dt>ice-bitrate</dt> |
| 317 |
<dd>Information about the audio bitrate (in kbit/s) of the stream. |
| 318 |
<em>Can be set by source client</em></dd> |
| 319 |
<dt>samplerate</dt> |
| 320 |
<dd>Information about the samplerate of the stream. |
| 321 |
<em>Can be set by source client</em></dd> |
| 322 |
<dt>quality</dt> |
| 323 |
<dd>Information about the audio quality of the stream. |
| 324 |
<em>Metadata set by source client</em></dd> |
| 325 |
<dt>frame_rate</dt> |
| 326 |
<dd>Information about the framerate of the stream. |
| 327 |
<em>Only present for video streams</em></dd> |
| 328 |
<dt>frame_size</dt> |
| 329 |
<dd>Information about the frame size of the stream. |
| 330 |
<em>Only present for video streams</em></dd> |
| 331 |
<dt>video_bitrate</dt> |
| 332 |
<dd>Information about the video bitrate of the stream. |
| 333 |
<em>Only present for video streams</em></dd> |
| 334 |
<dt>video_quality</dt> |
| 335 |
<dd>Information about the video quality of the stream. |
| 336 |
<em>Only present for video streams</em></dd> |
| 337 |
<dt>server_name</dt> |
| 338 |
<dd>Stream name |
| 339 |
<em>Metadata set by source client</em></dd> |
| 340 |
<dt>server_description</dt> |
| 341 |
<dd>Stream description |
| 342 |
<em>Metadata set by source client</em></dd> |
| 343 |
<dt>server_type</dt> |
| 344 |
<dd>MIME-type for the stream currently active on this mountpoint.</dd> |
| 345 |
<dt>subtype</dt> |
| 346 |
<dd>MIME-subtype, can be e.g. codecs like Opus, Vorbis, Theora. |
| 347 |
Separated with <code>/</code>.</dd> |
| 348 |
<dt>listener_peak</dt> |
| 349 |
<dd>Peak concurrent number of listener connections for this mountpoint.</dd> |
| 350 |
<dt>listeners</dt> |
| 351 |
<dd>The number of currently connected listeners.</dd> |
| 352 |
<dt>listenurl</dt> |
| 353 |
<dd>URL to this mountpoint. (This is not aware of aliases)</dd> |
| 354 |
<dt>max_listeners</dt> |
| 355 |
<dd>Maximum number of listeners permitted to concurrently connect to this mountpoint.</dd> |
| 356 |
<dt>public</dt> |
| 357 |
<dd>Flag that indicates whether this mount is to be listed on a directory. |
| 358 |
<em>Set by source client, can be overriden by server config</em></dd> |
| 359 |
<dt>slow_listeners</dt> |
| 360 |
<dd>Number of slow listeners</dd> |
| 361 |
<dt>source_ip</dt> |
| 362 |
<dd>IP address of the currently connected source client. |
| 363 |
In case of relays the content of <code><server></code>.</dd> |
| 364 |
<dt>stream_start_iso8601</dt> |
| 365 |
<dd>Timestamp of when the currently active source client connected to this mount point in ISO 8601 date format.</dd> |
| 366 |
<dt>stream_start</dt> |
| 367 |
<dd>Timestamp of when the currently active source client connected to this mount point in RFC 2822 date format. |
| 368 |
This field is deprecated and may be removed in a future version, please use <code>stream_start_iso8601</code> instead.</dd> |
| 369 |
<dt>total_bytes_read</dt> |
| 370 |
<dd>Total number of bytes received from the source client.</dd> |
| 371 |
<dt>total_bytes_sent</dt> |
| 372 |
<dd>Total number of bytes sent to all listener connections since last source connect.</dd> |
| 373 |
<dt>user_agent</dt> |
| 374 |
<dd>HTTP user agent string as sent by the source client.</dd> |
| 375 |
</dl> |
| 376 |
<p>Additional data can be accessed through the admin interface, as every page of the admin |
| 377 |
interface has an XML equivalent.</p> |
| 378 |
|
| 379 |
</div> |
| 380 |
</div> |
| 381 |
<footer> |
| 382 |
|
| 383 |
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| 384 |
|
| 385 |
<a href="../auth/" class="btn btn-neutral float-right" title="Authentication">Next <span class="icon icon-circle-arrow-right"></span></a> |
| 386 |
|
| 387 |
|
| 388 |
<a href="../config_file/" class="btn btn-neutral" title="Configuration File"><span class="icon icon-circle-arrow-left"></span> Previous</a> |
| 389 |
|
| 390 |
</div> |
| 391 |
|
| 392 |
|
| 393 |
<hr/> |
| 394 |
|
| 395 |
<div role="contentinfo"> |
| 396 |
<!-- Copyright etc --> |
| 397 |
|
| 398 |
</div> |
| 399 |
|
| 400 |
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. |
| 401 |
</footer> |
| 402 |
|
| 403 |
</div> |
| 404 |
</div> |
| 405 |
|
| 406 |
</section> |
| 407 |
|
| 408 |
</div> |
| 409 |
|
| 410 |
<div class="rst-versions" role="note" style="cursor: pointer"> |
| 411 |
<span class="rst-current-version" data-toggle="rst-current-version"> |
| 412 |
|
| 413 |
|
| 414 |
<span><a href="../config_file/" style="color: #fcfcfc;">« Previous</a></span> |
| 415 |
|
| 416 |
|
| 417 |
<span style="margin-left: 15px"><a href="../auth/" style="color: #fcfcfc">Next »</a></span> |
| 418 |
|
| 419 |
</span> |
| 420 |
</div> |
| 421 |
<script>var base_url = '..';</script> |
| 422 |
<script src="../js/theme.js"></script> |
| 423 |
|
| 424 |
</body> |
| 425 |
</html> |