Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMSServerTotalCounters.AllCounters (C#)
The AllCounters property retrieves an array that contains all of the counters supported by the object.
Syntax
object[,] = IWMSServerTotalCounters.AllCounters
Property Value
An object array containing the counters.
Remarks
This property is read-only. The array is two-dimensional. The first element in each row contains the name of the counter property, and the second element in each row contains the value. The AllCounters property is used to speed up counter retrieval during remote administration, by making one call instead of multiple calls to retrieve multiple counter properties.
The properties returned by the array are shown in the following table.
| Property | Description |
| Advertisements | Retrieves the cumulative number of advertisements that have been streamed from playlists since the last reset. |
| ConnectedPlayers | Retrieves the total number of players connected to the server since the last reset. |
| LateReads | Retrieves the total number of read operations that took over 400 milliseconds. |
| LateSends | Retrieves the total number of late send operations since the last reset. |
| OutgoingDistributionBytesSent | Retrieves the total number of bytes sent to distribution connections since the last reset. |
| OutgoingDistributionConnections | Retrieves the total number of distribution connections established since the last reset. |
| PlayerBytesSent | Retrieves the total number of bytes sent to players since the last reset. |
| StreamDenials | Retrieves the total number of denied stream transmissions since the last reset. |
| StreamErrors | Retrieves the total number of dropped-packet errors since the last reset. |
| StreamingPlayers | Retrieves the total number of players that have streamed content from the server since the last reset. |
| StreamingHTTPPlayers | Retrieves the total number of players that have streamed content by using the HTTP protocol from the server since the last reset. |
| StreamingRTSPPlayers | Retrieves the total number of players that have streamed content by using the RTSP protocol from the server since the last reset. |
| StreamingUDPPlayers | Retrieves the total number of players that have streamed content by using the User Datagram Protocol (UDP) from the server since the last reset. |
| StreamTerminations | Retrieves the total number of stream transmissions that have been terminated since the last reset. |
| UDPResendRequests | Retrieves the number of User Datagram Protocol (UDP) resend requests received since the last reset. |
| UDPResendsSent | Retrieves the number of UDP resend requests processed since the last reset. |
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSServerTotalCounters TotalCounters;
object[,] aAllCounters;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve a list of total statistics for the server.
TotalCounters = Server.TotalCounters;
// Retrieve an array of all the counters in this object.
aAllCounters = (object[,])TotalCounters.AllCounters;
// Process each array element.
for (int j = aAllCounters.GetLowerBound(0); j <=
aAllCounters.GetUpperBound(0); j++)
{
for (int k = aAllCounters.GetLowerBound(1); k <=
aAllCounters.GetUpperBound(1); k++)
{
object varValue;
varValue = aAllCounters[j, k];
if (varValue.GetType().ToString() == "System.String")
{
// TODO: Handle counter names.
}
if (varValue.GetType().ToString() == "System.Int32")
{
// TODO: Handle counter values.
}
}
}
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.
- Note Some counters are not available in the Windows Server 2003 family.
See Also
| Previous | Next |