Information on load and resources of the WCS server is available via the port 8081 at this URL
http://test.flashphoner.com:8081/?action=stat
where test.flashphoner.com - is the actual address of the WCS server.
The information includes data on published and played streams, SIP calls and server specifications.
Statistics parameters
Connection | Connections to the WCS server |
---|---|
connections | Overall number of connections |
connections_rtmfp | Number of RTMFP connections (Flash) |
connections_websocket | Number of WebSocket connections |
Port | Ports listened by the WCS server |
ports_media_free | Free media ports |
ports_media_busy | Busy media ports |
ports_media_quarantine | Media ports in quarantine |
ports_wcs_agents_free | Free CDN used ports |
ports_wcs_agents_busy | Busy CDN used ports |
ports_wcs_agents_quarantine | CDN used ports in quarantine |
Stream | Audio and video stream sessions on the WCS server |
streams_rtsp_in | Number of active RTSP sessions sending traffic |
streams_rtsp_out | Number of active RTSP sessions receiving traffic |
streams_websocket_out | Number of active streams played by WebSocket |
streams_rtmp_out | Number of active RTMP streams |
streams_webrtc_in | Number of active streams published via WebRTC |
streams_webrtc_out | Number of active streams played via WebRTC |
streams_rtmfp_in | Number of active streams published via RTMFP |
streams_rtmfp_out | Number of active streams played via RTMFP |
streams_viewers | Number of active clients playing published streams |
Native resources | Information about resource usage |
native_resources | Information about encoding/decoding of the media stream |
Core | System parameters (obtained using Java methods) and parameters of the WCS server |
core_threads | Number of active threads of the WCS server process |
core_java_threads | Current number of live threads |
core_java_committedMemory | Amount of guaranteed available virtual memory, in bytes |
core_java_freePhysicalMemorySize | Amount of free physical memory, in bytes |
core_java_arch | Operating system architecture |
core_java_availableProcessors | Number of processors available for the Java virtual machine |
core_java_freeSwapSpaceSize | Amount of free swap space, in bytes |
core_java_maxFileDescriptorCount | Maximum number of file descriptors |
core_java_open_file_descriptors | Number of file descriptors opened in the Java virtual machine |
core_java_cpu_usage | "Recent CPU usage" for a process in the Java virtual machine |
core_java_totalPhysicalMemorySize | Amount of physical memory, in bytes |
core_java_totalSwapSpaceSize | Amount of swap space, in bytes |
core_java_uptime | Uptime since Java virtual machine started, in milliseconds |
core_heap_memory_used | Heap memory usage |
core_rss_memory | Memory usage |
core_open_file_descriptors | Number of opened file descriptors |
core_cpu_usage | CPU time percentage used by processes |
core_gc | Information about "garbage collecting" |
core_gc_manager | Information about "garbage collecting" in the Manager |
Call | SIP calls on the WCS server |
sip_calls | Number of SIP calls |
sip_calls_established | Number of active SIP calls |
sip_calls_in | Number of incoming SIP calls |
sip_calls_out | Number of outgoing SIP calls |
sip_calls_per_second (cps) | Number of SIP calls per minute |
SIP | |
sip_registered | Number of client in the REGISTERED state |
Recording | Audio and video file recording |
recording_sessions | Number of active recording sessions |
System | system parameters |
system_java_cpu_usage | "Recent CPU usage" for the entire system (obtained using Java methods) |
system_java_load_average | Average system load for the last minute (obtained using Java methods) |
system_uptime | Uptime since starting of the Linux server |
system_memory_total | Available RAM, in kilobytes |
system_memory_free | Amount of physical RAM not used by the system, in kilobytes |
system_cpu_usage | CPU time percentage used by the processes of the core |
Network Stats (Mbit/s) | Network traffic statistics |
global_bandwidth_in | Incoming connection channel bandwidth |
global_bandwidth_out | Outgoing connection channel bandwidth |
Version info | WCS version info |
wcs_version | Current version of the WCS server |
wcs_client_version | Current version of the WCS API |
Errors info | Error information (obtained based on caught Java exceptions) |
java.io.IOException | Number of IO errors |
java.lang.ArrayIndexOutOfBoundsException | Number of array out of bounds errors |
java.lang.IllegalArgumentException | Number of invalid function argument errors |
com.flashphoner.server.license.activation.A.C | Number of errors while activating the license |
java.lang.NullPointerException | Number of null pointer jump errors |
Degraded streams | Degraded streams information |
degraded_streams | Degraded streams quantity |
degraded_streams_percent | Degraded streams percentage of total number of streams on server |
Transcoding stats | Streams transcoding information |
transcoding_video_decoding_resolutions | List of resolutions decoded in "resolution/streams count" form |
transcoding_video_decoding_average_time | Average decoding time in "resolution/time, ms" form |
transcoding_video_decoding_max_time | Maximum decoding time in "resolution/time, ms" form |
transcoding_video_decoding_average_queue_size | Average decoding queue size in "resolution/queue size" form |
transcoding_video_decoding_max_queue_size | Maximum decoding queue size in "resolution/queue size" form |
transcoding_video_encoding_resolutions | List of resolutions encoded in "resolution/streams count" form |
transcoding_video_encoding_average_time | Average encoding time in "resolution/time, ms" form |
transcoding_video_encoding_max_time | Maximum encoding time in "resolution/time, ms" form |
transcoding_video_encoding_average_queue_size | Average encoding queue size in "resolution/queue size" form |
transcoding_video_encoding_max_queue_size | Maximum encoding queue size in "resolution/queue size" form |
Transcoding video full info | Stream transcoding details (JSON format only) |
Every parameter can be requested separately, for example:
http://test.flashphoner.com:8081/?action=stat¶ms=native_resources
Load and resources usage information of the WCS server, combined by groups, can be requested by the group name (connections_stats, streams_stats, port_stats, call_stats, degraded_streams_stats, system_stats, core_stats are available)
http://test.flashphoner.com:8081/?action=stat&groups=call_stats
You can include several group names in the request
http://test.flashphoner.com:8081/?action=stat&groups=call_stats,connections_stats
System parameters can be excluded from full report using the following parameter in flashphoner.properties file:
parse_system_stats=false
Statistics output formats
By default, statistics is shown as plain text
Since build 5.2.416, JSON and Prometheus formats are supported. To get JSON statistics, set the format in request URI
curl -s 'http://localhost:8081/?action=stat&format=json'
To get Prometheus statistics, set the format in request URI
curl -s 'http://localhost:8081/?action=stat&format=prometheus'
Stream transcoding statistics
Since build 5.2.443 brief or detailed stream transcoding statistics can be shown. The brief stream transcoding information is grouped by stream resolutions and is available in all the formats, for example:
-----Transcoding info----- transcoding_video_decoding_resolutions=640x360/1 transcoding_video_decoding_average_time=640x360/2.0 transcoding_video_decoding_max_time=640x360/2 transcoding_video_decoding_average_queue_size=640x360/0.0 transcoding_video_decoding_max_queue_size=640x360/0 transcoding_video_encoding_resolutions=426x240/1;640x360/1;852x480/1 transcoding_video_encoding_average_time=426x240/2.0;640x360/2.0;852x480/6.0 transcoding_video_encoding_max_time=426x240/2;640x360/2;852x480/6 transcoding_video_encoding_average_queue_size=426x240/0.0;640x360/0.0;852x480/0.0 transcoding_video_encoding_max_queue_size=426x240/0;640x360/0;852x480/0
Here the following parameters are shown:
- resolution of decoded and encoded streams and their count
- average and maximum time of decoding and encoding per resolution
- average and maximum decoding and encoding queue size per resolution
The detailed stream transcoding information is available in JSON format only
curl -s 'http://localhost:8081/?action=stat&format=json&groups=transcoding_stats' | jq
and is grouped by streams published
"transcoding_video_full_info": { "test1": { "codec": "H264", "queueSize": 0, "distributors": [ { "codec": "H264", "queueSize": 0, "resolution": "426x240", "averageProcessingTime": 3 }, { "codec": "H264", "queueSize": 0, "resolution": "640x360", "averageProcessingTime": 5 }, { "codec": "H264", "queueSize": 0, "resolution": "852x480", "averageProcessingTime": 10 } ], "resolution": "640x360", "averageProcessingTime": 3 } }
Where:
- codec - stream codec
- queueSize - stream queue size
- resolution - stream resolution
- averageProcessingTime - average decoding or encoding time
- distributors - streams encoding parameters (for output streams)