Stats numbers

neogeo

Member
According to the stats below: total connections=76 and streams_viewers=52+53=105, are these numbers correct?

Code:
-----Connection Stats-----
connections=76
connections_rtmfp=1
connections_websocket=75
-----Port Stats-----
ports_sip=0
ports_media=163
ports_rtsp=1
-----Stream Stats-----
streams_webrtc_in=2
streams_webrtc_out=52
streams_rtmfp_in=0
streams_rtmfp_out=0
streams_rtmp_in=0
streams_rtmp_out=1
streams_viewers=875960ccAudio/52,875960cc/53
streams_rtsp_in=0
streams_rtsp_out=0
streams_websocket_out=0
streams_rtmp_client_out=0

Also the bandwidth counters are stuck to 0:
Code:
-----Network Stats (Mbit/s)-----
global_bandwidth_in=0.000
global_bandwidth_out=0.000

WCS version: 2158
 

Max

Administrator
Staff member
Hello
In latest versions we have disabled bandwidth detection by default because it was generated ton of error logs on some systems.
So it is ok because it is currently disabled.
Code:
global_bandwidth_in=0.000
global_bandwidth_out=0.000
Regarding
treams_viewers=52+53=105, are these numbers correct?
If you really do not have such number of connections, it looks incorrect.
How to reproduce this?
 

neogeo

Member
Check this out:
Code:
-----Connection Stats-----
connections=6
connections_rtmfp=0
connections_websocket=6
-----Port Stats-----
ports_sip=0
ports_media=0
ports_rtsp=0
-----Stream Stats-----
streams_webrtc_in=0
streams_webrtc_out=0
streams_rtmfp_in=0
streams_rtmfp_out=0
streams_rtmp_in=0
streams_rtmp_out=0
streams_viewers=
streams_rtsp_in=0
streams_rtsp_out=0
streams_websocket_out=0
streams_rtmp_client_out=0
Nobody streams an yet there are 6 websocket connections. When I check with netstat there are indeed about that many connections:
Code:
netstat -an | grep 443 |wc -l
7
The question now is, is it normal when nobody is streaming to have clients staying connected on the websocket?
 

Max

Administrator
Staff member
Yes. This is correct.
When you do
Code:
var session = Flashphoner.createSession({...});
Websocket connection is established.
When you do
Code:
session.createStream({...}).publish();
WebRTC stream is established.
So you can have, i.e. 100 websocket connections and 0 streams.
 

neogeo

Member
That case is clear.

But the connections counter below does not make sense:
Code:
-----Connection Stats-----
connections=55
connections_rtmfp=0
connections_websocket=55
-----Port Stats-----
ports_sip=0
ports_media=141
ports_rtsp=1
-----Stream Stats-----
streams_webrtc_in=2
streams_webrtc_out=47
streams_rtmfp_in=0
streams_rtmfp_out=0
streams_rtmp_in=0
streams_rtmp_out=0
streams_viewers=875960cc/46,875960ccAudio/46
streams_rtsp_in=0
streams_rtsp_out=0
streams_websocket_out=0
streams_rtmp_client_out=0
connections should be at least 46+46, right?
 

Max

Administrator
Staff member
According these stats, you have
55 websocket connections in total
2 incoming webrtc streams (875960cc, 875960ccAudio)
47 outbound webrtc streams
Stream 875960cc has 46 subscribers
Stream 875960ccAudio has 46 subscribers too

So all seems correct.

connections should be at least 46+46, right?
No. You have 55 connections.
2 publishing streams and 46 subscribers
8 (= 55 - 46 -1) connections are inactive (without streams).

To get more information about active streams and connections, you can use REST API
Code:
https://host:8888/rest-api/stream/find_all
https://host:8888/rest-api/connection/find_all
 
Top