Thursday, December 1, 2011

QNX operating system

I worked in the QNX platform when I am dealing with IED simulators. So I thought to write some information about QNX operating system and state resourceful links.

In IED environment priority scheduling is really critical. Breaker tripping and relevant communication should gain highest priority when fault is detected by relay hardware. to fulfill this fast operation IED uses RTOS (real time operating system).Its ultra-reliable nature means QNX software is the preferred choice for life-critical systems such as Power grid,air traffic control systems, surgical equipment, and nuclear power plants. The QNX Neutrino RTOS is the latest incarnation of the QNX real time operating system, which has been powering mission-critical application. The QNX® Momentics® Tool Suite is a comprehensive, Eclipse-based integrated development environmen. Companoes rely on  QNX® Neutrino® RTOS and the QNX® Momentics® development suite to build products that enhance their brand characteristics – innovative, high-quality, dependable.


Socket programming in QNX

When I wanted to compile NetPIPE latency measuring tool on QNX platform. It gave me warnings saying listen(), bind() methods are undefined. I figured out that socket libraries are not linked in NetPIPE make file.
The QNX TCP/IP socket interface is a set of library functions and header files. All memory models of the socket interface library are provided. They're called socketx.lib, where x denotes the memory model. For a description of memory models, see the documentation for the cc utility.
These libraries are installed in the /usr/lib directory.The header files are installed under the /usr/include directory.

Then I added below line to NetPIPE make file to link socket libraries and it compiled perfectly:

cc -l socket

Using IPERF

Iperf is a tool to measure the TCP bandwidth and the quality of a network link.

The quality of a link can be tested as follows:
- Latency (response time or RTT): can be measured with the Ping command.One way Latency can be measured by NetPIPE
- Jitter (latency variation): can be measured with an Iperf UDP test.
- Datagram loss: can be measured with an Iperf UDP test.

Iperf can be installed  on any UNIX/Linux or Microsoft Windows system. One host must be set as client, the other one as server. Clent send predefined size of packets from client to server. Sever receive packets sent by client and measure time taken to collect packets. By dividing total packet received over time taken, iperf decide throughput measurement.  

By default, the Iperf client connects to the Iperf server on the TCP port 5001 and the bandwidth displayed by Iperf is the bandwidth from the client to the server.
If you want to use UDP tests, use the -u argument.
The -d and -r Iperf client arguments measure the bi-directional bandwidths.

For TCP measurement I used,

Server side:
iperf -s

Client side:
iperf -c -F -m -M