Server Statistics

Understanding server statistics and monitoring

Overview

Mcaster1DNAS v2.5.1-rc1 provides comprehensive statistics through XML endpoints that can be consumed by web interfaces, monitoring systems, or custom applications. Statistics are available in real-time and include server-wide metrics and per-mountpoint details.

Accessing Statistics

http://yourserver:8000/admin/stats.xml

Authentication required: Use admin username and password from your configuration.

Example Statistics XML

<?xml version="1.0"?>
<icestats>
  <admin>admin@example.com</admin>
  <host>stream.example.com</host>
  <location>Earth</location>
  <server_id>Mcaster1DNAS 2.5.1-rc1</server_id>
  <server_start>Mon, 15 Feb 2026 10:00:00 -0500</server_start>
  <server_start_iso8601>2026-02-15T10:00:00-0500</server_start_iso8601>
  <client_connections>1337</client_connections>
  <source_client_connections>42</source_client_connections>
  <source_relay_connections>5</source_relay_connections>
  <source_total_connections>47</source_total_connections>
  <stats>0</stats>
  <stats_connections>156</stats_connections>
  <listeners>128</listeners>
  <sources>2</sources>

  <source mount="/stream">
    <listeners>95</listeners>
    <listener_peak>150</listener_peak>
    <listener_connections>890</listener_connections>
    <server_name>My Radio Station</server_name>
    <server_description>The best music 24/7</server_description>
    <server_url>https://example.com</server_url>
    <server_type>audio/mpeg</server_type>
    <stream_start>Mon, 15 Feb 2026 10:30:00 -0500</stream_start>
    <stream_start_iso8601>2026-02-15T10:30:00-0500</stream_start_iso8601>
    <genre>Rock</genre>
    <bitrate>128</bitrate>
    <audio_info>ice-bitrate=128;ice-channels=2;ice-samplerate=44100</audio_info>
    <ice-bitrate>128</ice-bitrate>
    <ice-channels>2</ice-channels>
    <ice-samplerate>44100</ice-samplerate>
    <artist>Example Artist</artist>
    <title>Example Song Title</title>
    <public>1</public>
  </source>
</icestats>

Global Server Statistics

These statistics apply to the entire Mcaster1DNAS server instance.

<admin>

Administrator email address from server configuration.

<host>

Server hostname from configuration.

<location>

Server geographic location from configuration.

<server_id>

Mcaster1DNAS version string (e.g., "Mcaster1DNAS 2.5.1-rc1").

<server_start> / <server_start_iso8601>

Server startup timestamp in human-readable and ISO 8601 formats.

<client_connections>

Cumulative count of all client connections (listeners, admin requests, file serving).

<source_client_connections>

Cumulative count of source client connections (encoders).

<source_relay_connections>

Cumulative count of relay connections (slave servers connecting to this master).

<listeners>

Current number of connected listeners across all mountpoints.

<sources>

Current number of active mountpoints (connected sources).

Mountpoint-Specific Statistics

Each active mountpoint has its own statistics block within the XML.

<mount>

The mountpoint path (e.g., "/stream", "/live.ogg").

<listeners>

Current number of listeners connected to this mountpoint.

<listener_peak>

Peak concurrent listener count since source connection.

<listener_connections>

Cumulative total of listener connections to this mountpoint.

<server_name>

Stream name/title from source client or configuration.

<server_description>

Stream description from source client or configuration.

<server_url>

Website URL associated with the stream.

<server_type>

MIME type of the stream (e.g., "audio/mpeg", "application/ogg").

<genre>

Stream genre/category for directory listings.

<bitrate>

Stream bitrate in kbps (e.g., 128, 192, 320).

<audio_info>

Consolidated audio information string containing bitrate, channels, and samplerate.

<ice-bitrate> / <ice-channels> / <ice-samplerate>

Individual audio parameters: bitrate (kbps), channel count (1=mono, 2=stereo), sample rate (Hz).

<artist>

Current artist/performer from ICY-META metadata (updated by source client).

<title>

Current song/track title from ICY-META metadata (updated by source client).

<public>

YP directory listing flag (1=listed, 0=unlisted).

Using Statistics in Applications

Statistics can be consumed by various applications and tools:

Parse with Programming Languages

# Python example
import requests
import xml.etree.ElementTree as ET

response = requests.get('http://localhost:8000/admin/stats.xml',
                       auth=('admin', 'password'))
root = ET.fromstring(response.content)
listeners = root.find('.//listeners').text
print(f"Current listeners: {listeners}")

Transform with XSLT

Mcaster1DNAS includes XSLT stylesheets in the web/ directory to transform XML into HTML pages. Customize these or create your own for custom interfaces.

Monitor with Scripts

#!/bin/bash
# Simple monitoring script
LISTENERS=$(curl -s -u admin:password http://localhost:8000/admin/stats.xml | \
            grep -oP '<listeners>\K[^<]+' | head -1)
echo "Current listeners: $LISTENERS"

if [ "$LISTENERS" -gt 100 ]; then
  echo "High load alert!" | mail -s "Listener Alert" admin@example.com
fi

Enhanced Statistics in v2.5.1-rc1

Mcaster1DNAS v2.5.1-rc1 includes additional statistics for:

Next Steps: Explore the Admin Interface for web-based monitoring or learn about Relay Configuration.