Accessory tools¶
This section describes accessory tools that can be used to manage the WCS server.
Port routing checking¶
The WCS server may be behind NAT and as such it will require a port range opened for the external network, for instance, UDP 31000-32000. This means a UDP packet sent from the external network to the port in that range should reach the server where WCS is placed.
Hence, we have a simple test. Send a UDP packet from outside using netcat
(nc
) and receive it on the server using tcpdump
. If the packet reached, the port is open.
nc¶
For Centos
or for Debian/Ubuntu:
This command sends a simple UDP packet in the given direction.
tcpdump¶
This command makes the server listen for a particular port and immediately outputs information about packet arrival to the console:
jstack tool¶
This is Java utility that provides important information about a Java process and execution threads.
When you run jstack from the console, a brief information about jstack is shown:
If the information is not shown or the jstack utility is not found, use the installation instruction to latest version of JDK. After installing jdk you should create a symbolical link to jstack to quickly run it, if the link is not creted during installation:
Example:
Where 8888
is the ID of the Java process.
Since build 5.2.801, WCS is running from flashphoner
user for security reasons. Therefore,
jstack should be launched from the same user if using JDK 8:
Testing channel bandwidth using iperf¶
A stream published picture quality depends on channel bandwidth between publisher and server, the same for subscriber. Channel bandwidth can be checked using iperf utility. This program is implemented for all major OS: Windows, MacOS, Ubuntu/Debian, CentOS. iperf in server mode can be installed and running with WCS, that allows to check whole channel bandwith from publisher to viewer.
iperf can be installed on CentOS 7 as follows:
Run iperf in server mode
where 5201
is iperf port for testing client connections
On client side iperf can be launched as follows:
- To test upload channel bandwith via UDP:
Where test2.flashphoner.com
- WCS server-
5201
- iperf port to connect
The result of the command above should look like this:
-
To test download channel bandwidth via UDP
Where
test2.flashphoner.com
- WCS server5201
- iperf port to connect
The result of the command above should look like this:
By default, iperf tests the channel for 10 seconds. This interval should be increased, for example, to 120 second
The upload channel bandwidth test via UDP result shows the maximum video publishing bitrate without packet losses. In the sample above bitrate should be limited with 1000 kbps, on server side for example
Note that iperf major versions on server and on testing client should be the same. Today version 3 is actual, but ther is also version 2 in repositories.