On Monday, February 24, 2003, at 04:24 PM, engineermike wrote:
> Hi folks,
> I need to find out a way to log the number of listeners we have on
> our QT6 stream. The more information the better. We are using the
> Broadcaster to encode and DSS for the server. Any help would be
> greatly
> appreciated.
The simplest way to do this is to use a Web Browser, and connect to
your streaming server's DSS Web Admin via a URL like this:
http://qtss.ip.addr:1220
This is a nice graphical front-end, and it provides you both status,
number of connected users, etc.
However, there is another low-level way to do this, if you don't need
to access the full functionality of the Streaming Web Admin.
The way to do this is to use the Streaming Admin protocol. It can work
from a remote machine, but normally is only accessible via local host
(ie. 127.0.0.1). This is the same protocol that the Streaming Web
Admin actually uses to communicate and retrieve/update fields from the
actual RTSP Streaming Server. Here's how to use it:
Example:
1. Suppose you have DSS running locally on your machine
2. Now, open a web browser, and connect to the Streaming Server's
admin protocol using this url:
Note - you'll need to authenticate as the streaming admin
username and password for your DSS machine
http://127.0.0.1:554/modules/admin/server/*
This will return all (the asterisk) real-time server properties, and
sub-property names:
> Container="/admin/server/"
> qtssServerAPIVersion="262144"
> qtssSvrDefaultDNSName="10.0.1.4"
> qtssSvrDefaultIPAddr="167772420"
> qtssSvrServerName="QTSS"
> qtssRTSPSvrServerVersion="4.1.3"
> qtssRTSPSvrServerBuildDate="Feb 6 2003, 14:59:22"
> qtssSvrRTSPServerHeader="Server: QTSS/4.1.3 (Build/412.45;
> Platform/MacOSX)"
> qtssSvrState="1"
> qtssSvrIsOutOfDescriptors="false"
> qtssRTSPCurrentSessionCount="1"
> qtssRTSPHTTPCurrentSessionCount="0"
> qtssRTPSvrNumUDPSockets="4"
> qtssRTPSvrCurConn="0"
> qtssRTPSvrTotalConn="0"
> qtssRTPSvrCurBandwidth="0"
> qtssRTPSvrTotalBytes="0"
> qtssRTPSvrAvgBandwidth="0"
> qtssRTPSvrCurPackets="0"
[etc...]
If you wanted ONLY the number of current RTSP connections, then you
could get it using this specific URL:
http://127.0.0.1:554/modules/admin/server/qtssRTSPCurrentSessionCount
> Container="/admin/server/"
> qtssRTSPCurrentSessionCount="1"
> error:(0)
Now, realize that this will by default ONLY work if you are connecting
to your streaming server via a web browser running on the same local
machine using IP addresses (like 127.0.0.1) to access the streaming
admin protocol. In addition to this, you must authenticate as the
streaming administrator user to read these values. This is for
security purposes.
If you wish to access this streaming admin protocol remotely, then you
must edit the 'streamingserver.xml' file and change some of these
settings (and then re-save the 'streamingserver.xml' file, and then
stop/restart the Streaming Server processes, or else send a sighup to
the child process).
Path: /Library/QuickTimeStreaming/Config/streamingserver.xml
(on Darwin Unix platforms it is
/etc/streaming/streamingserver.xml)
==================================================
[excerpt]
<MODULE NAME="QTSSAdminModule" >
<PREF NAME="RequestTimeIntervalMilli" TYPE="UInt32"
>50</PREF>
<PREF NAME="LocalAccessOnly" TYPE="Bool16" >true</PREF>
<PREF NAME="Authenticate" TYPE="Bool16" >true</PREF>
<PREF NAME="enable_remote_admin" TYPE="Bool16"
>true</PREF>
<PREF NAME="IPAccessList" >127.0.0.*</PREF>
<PREF NAME="AdministratorGroup" >admin</PREF>
</MODULE>
[excerpt]
For example, you could modify "LocalAccessOnly" to be false, which
would let you then access the streaming admin protocol remotely from
another machine/web browser besides local host. You would still have
to authenticate, of course. I do NOT recommend that you disable
"Authenticate" though.
You can get more documentation from looking at the included
"streamingserver.xml-sample" file:
[excerpt]
<!-- Only requests from 127.0.0.1 are allowed if
LocalAccessOnly is true -->
<!-- If this is set to false, then IP addresses as defined by
the IPAccessList may make requests -->
<PREF NAME="LocalAccessOnly" TYPE="Bool16">true</PREF>
<!-- Require Admin requests to authenticate with the server -->
<PREF NAME="Authenticate" TYPE="Bool16">true</PREF>
<!-- turn on or off admin request processing -->
<PREF NAME="enable_remote_admin" TYPE="Bool16">true</PREF>
<!-- A list of IP addresses that are allowed to make admin
requests. -->
<!-- LocalAccessOnly must be set to false before network
addresses will be accepted. -->
<!-- A wildcard of * is allowed for designating ranges. *.*.*.*
means all addresses. -->
<PREF NAME="IPAccessList">127.0.0.*</PREF>
Also, download the QTSS API Documentation for QTSS, and start reading
on page 126:
http://developer.apple.com/techpubs/quicktime/qtdevdocs/PDF/QTSS.pdf
There it discusses the QTSS Admin Protocol...
--
Billy Brown
_______________________________________________
streaming-server-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/streaming-server-users
Do not post admin requests to the list. They will be ignored.