Testing Bandwidth Performance for a Deployed Site

Topics related to delivering files to Set-top Boxes.

Testing Bandwidth Performance for a Deployed Site

Postby Henry.G » Mon Jul 14, 2014 4:40 pm

Is there a way I can test the bandwidth performance for an A540 deployed on a remote Internet connection? I am playing HLS streaming video in my signage playlists on occasion and want to sometimes test the site to measure its connection to the server and calibrate bandwidth performance. It would great to be able to to this right from the A540, rather than using a laptop on the same LAN segment and running a speed test.
Henry.G
 
Posts: 45
Joined: Mon Apr 25, 2011 12:54 pm

Re: Testing Bandwidth Performance for a Deployed Site

Postby Cilutions Support » Mon Jul 14, 2014 4:51 pm

Yes. The A540 includes support for iperf, a popular test tool used to measure network performance. To run it login to the A540 and run iperf from the command line. A description of how to run iperf can be found here: https:/iperf.fr

The basic procedure involves starting up an iperf server on an Internet accessible machine, then running the iperf client on the A540 from the command line. There is much on the Internet describing iperf and how to use it.

Hope this helps.
Cilutions Support
Site Admin
 
Posts: 139
Joined: Mon Feb 07, 2011 3:03 pm

Re: Testing Bandwidth Performance for a Deployed Site

Postby Cilutions Support » Sat Jul 26, 2014 1:11 pm

iperf can also be run on the A140 to test network performance. Contact support@cilutions.com for access to the iperf client; available to enterprise customers as part of maintenance support.

Scenario for operation:

1) Start up iperf in server mode on your server side machine; typically in your NOC. Example command line: iperf -s -p 7654 (listens on TCP port 7654 for example). Precompiled iperf binaries (free) for server-side use are available here: https://iperf.fr/

2) Start up iperf on the A540 (or A140), your client side device; typically deployed in the field. Example command line: ./iperf -c servername.com -p 7654 (connects to servername.com on TCP port 7654 for example).

3. Wait 10 seconds or so for a bandwidth report on the A540 (or A140) console. A report looks something like this:
Code: Select all
------------------------------------------------------------
Client connecting to servername.com, TCP port 7654
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  4] local 192.168.1.65 port 3471 connected with 99.999.999.999 port 7654
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  14.6 MBytes  12.2 Mbits/sec


That's it for the basics. Look at the iperf info online to learn about its capabilities and other options. It is quite a useful tool.
Cilutions Support
Site Admin
 
Posts: 139
Joined: Mon Feb 07, 2011 3:03 pm

Re: Testing Bandwidth Performance for a Deployed Site

Postby Cilutions Support » Tue Jul 29, 2014 3:51 pm

One can take advantage of the finstall_ftp functionality on the A140/A540 STBs to download a bourne shell script, run the iperf utility, and post the results, say, back to an HTTP server on the network. This offers are more automatic way of running iperf on a STB. And is especially useful for deployments where telnet/ssh access to the STB is not easily available.

Example scenario: An A140 STB configured to periodically retrieve its content from an external FTP Server. Here a user can post the iperf STB binary (available to customers as part of routine maintenance) to the FTP content directory; where it will be retrieved by the STB and downloaded.

The customer can then post a file named finstall_ftp in the same content directory on the same FTP Server. The STB will download it just like any other content file. But after downloading finstall_ftp the STB will launch it (i.e., mark it as executable and execute it). This is a generic feature of the STB offering a customer an automated way to add local processing using bourne shell or microperl scripting (interpreters supported on the A140/A540). With each file downloaded, the STB looks to see if finstall_ftp is present locally and, if it is, it launches finstall_ftp passing the name of the file just loaded as an argument (e.g., /PVR/finstall_ftp /PVR/file_just_loaded.dat).

Here is an example, certified, finstall_ftp file. It runs iperf and posts the result back to an HTTP Server (example address 192.168.1.45):
Code: Select all
#!/bin/sh
#Only run this if we just downloaded finstall_ftp
if [ $1 = "/PVR/finstall_ftp" ]; then
  IPERF_BIN=/PVR
  [ -f /mnt/nv/iperf ] && IPERF_BIN=/mnt/nv

  chmod +x ${IPERF_BIN}/iperf

  libconfig-get NORFLASH.SERIAL_ID > /PVR/iperf_result.txt

  date >> /PVR/iperf_result.txt
  ${IPERF_BIN}/iperf -c 192.168.1.45 >> /PVR/iperf_result.txt

  curl -T /PVR/iperf_result.txt http://192.168.1.45/Uploads/receive.pl
fi
exit 0

IMPORTANT: The finstall_ftp file must be created using Unix/Linux end-of-line formatting. Be careful to avoid DOS/Windows/MAC formatting as these formats will not execute on the Linux STBs.

In this example the HTTP Server at 192.168.1.45 is running IIS7 (but most any Web Server will work). Here is the perl program up on the server which accepts the HTTP POST of the iperf results and places the results in a local file:
Code: Select all
# upload a file
read (STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
$buffer_size = length ($buffer);
# create a file name in the local directory
$fnsave = $$;

open (HERE,">$fnsave");
print HERE $buffer;

# Generate the output page

$now = localtime();

print << "REPLYPAGE"
Content-type: text/html

<BODY BGCOLOR=white text=black>
<H2>Your page has been uploaded and saved
as $fnsave</H2>
Buffer size is $buffer_size bytes<BR>
$now
</BODY>
REPLYPAGE
;
Cilutions Support
Site Admin
 
Posts: 139
Joined: Mon Feb 07, 2011 3:03 pm


Return to STB-Specific Content Distribution

Who is online

Users browsing this forum: No registered users and 1 guest

cron