OWAMP Client Script

1. Introduction

Collecting one-way active measurements — latency, packet loss, and jitter — is the optimal way to monitor network performance. Traditional round-trip tools such as ping and TWAMP measure the time a packet takes to reach a destination and come back, but they don’t show which direction the problem is happening. OWAMP (One-Way Active Measurement Protocol) fills this gap by enabling one-way measurements for each direction of a path.

2. Installing OWAMP dependencies

Example environment used for testing:

  • NetBeez Gigabit Ethernet agent

  • NetBeez agent v15.1.2

  • Raspbian GNU/Linux 11 (bullseye)

Dependencies needed to build/install OWAMP:

sudo apt install -y build-essential automake autoconf libtool pkg-config libssl-dev libpcap-dev git

Install the i2util dependency:

cd /tmp
git clone 
cd i2util/I2util/I2util/

./bootstrap
./configure
make
sudo make install

ldconfig

Build and install owamp (server + client). Omit --enable-owampd in ./configure to install only the client:

cd /tmp
git clone 
cd owamp/owamp/owamp/
./bootstrap
./configure --enable-owampd
make
make install

Note: avoid running an OWAMP server on a NetBeez agent in production unless you implement proper hardening and security.

Running the server (owampd)

Here we report a minimal server configuration at /etc/owamp/owamp-server.conf:

# Minimal OWAMP server configuration
vardir /var/lib/owamp
datadir /var/lib/owamp
user nobody
srcnode 0.0.0.0

Then start the server:

sudo owampd -c /etc/owamp/owamp-server.conf -Z

If planning to host a public or semi-public server, enable authentication and encryption and review recommended hardening practices.

Running the client (owping)

A simple client invocation:

$ owping <server_IP>

Approximately 12.9 seconds until results available

--- owping statistics from [192.168.1.48]:8923 to [192.168.1.45]:50084 ---
SID: c0a8012decbb9c3a5c32bb20f6df0f8a
first: 2025-11-09T18:03:24.923
last: 2025-11-09T18:03:34.751
97 sent, 0 lost (0.000%), 0 duplicates
one-way delay min/median/max = -1.26e+03/-1.25e+03/-1.24e+03 ms, (err=0.423 ms)
one-way jitter = 6.7 ms (P95-P50)
...

3. The script

Below is a compact Bash script that runs owping against an OWAMP server.

#!/usr/bin/env bash


# Run owping command
output=$(owping 192.168.1.45 2>/dev/null)

# Split client and server sections using awk
client_section=$(awk '/^--- owping statistics/{i++} i==1{print}' <<< "$output")
server_section=$(awk '/^--- owping statistics/{i++} i==2{print}' <<< "$output")

# Extract metrics from client section
client_packet_loss=$(grep -Eo '[0-9]+\.[0-9]+%|\([0-9]+\.[0-9]+%\)' <<< "$client_section" | head -n1 | tr -d '()%')
client_median_latency=$(grep -Eo 'one-way delay.*' <<< "$client_section" | awk -F'=' '{print $3}' | awk '{print $1}' | sed 's/nan//')
client_jitter=$(grep -Eo 'one-way jitter = [^ ]+' <<< "$client_section" | awk '{print $4}' | sed 's/nan//')

# Extract metrics from server section
server_packet_loss=$(grep -Eo '[0-9]+\.[0-9]+%|\([0-9]+\.[0-9]+%\)' <<< "$server_section" | head -n1 | tr -d '()%')
server_median_latency=$(grep -Eo 'one-way delay.*' <<< "$server_section" | awk -F'=' '{print $3}' | awk '{print $1}' | sed 's/nan//')
server_jitter=$(grep -Eo 'one-way jitter = [^ ]+' <<< "$server_section" | awk '{print $4}' | sed 's/nan//')

# Output results
echo "client_ploss=${client_packet_loss:-N/A}"
echo "client_latency=${client_median_latency:-N/A}"
echo "client_jitter=${client_jitter:-N/A}"
echo
echo "server_ploss=${server_packet_loss:-N/A}"
echo "server_latency=${server_median_latency:-N/A}"
echo "server_jitter=${server_jitter:-N/A}"

4. Closing remarks

OWAMP fills a critical gap by measuring one-way latency, jitter, and packet loss independently for each direction. Combined with NetBeez, OWAMP enables automated one-way active measurements across distributed locations, helping teams pinpoint whether performance problems are on the client or server side and ensuring better experience for real-time applications.

1 Like