Installing SmokePing on Linux: How to Diagnose Network Jitter and Latency 24/7

Network tutorial - IT technology blog
Network tutorial - IT technology blog

2 AM Sleepless Nights and Soulless “Pings”

If you’ve ever spent a sleepless night on server duty, you know the frustration of customers complaining about “slow network” while your ping or mtr results show everything is perfectly smooth. The results return a steady 10ms or 20ms with zero packet loss.

The problem is that these tools only provide an instantaneous snapshot. They remain silent about fluctuations that occurred 15 minutes or 2 hours ago between the server and the ISP. Networks are constantly changing. Looking at the current ping figure is like trying to predict the day’s weather by looking out the window for 5 seconds.

When Ping and MTR Aren’t Enough

In real-world operations, I’ve encountered many “micro-outages”—brief bursts of packet loss lasting just a few seconds before vanishing. Or Jitter (latency instability) jumping from 10ms to 200ms, causing VoIP or Database Replication to fail repeatedly. Even 2-3% packet loss makes an SSH connection start “ghosting” or lagging, which is incredibly annoying.

To catch these “ghosts,” you need a tool that runs 24/7 and stores historical data. Most importantly, it must visualize this data into charts. This is where SmokePing shines.

Why SmokePing’s “Smoke” Charts Matter?

SmokePing doesn’t just measure latency. It sends bursts of pings (usually 20 packets per cycle) to calculate the standard deviation of responses. The chart displays a bold line (the average) and a shaded area around it called “smoke.”

  • Thick smoke means high Jitter, indicating extreme network instability.
  • Thin, sharp smoke proves the connection is excellent.
  • Gaps or red bars represent Packet Loss.

Looking at a 24-hour chart, I can immediately identify which ISP is throttling bandwidth during peak hours. You can even pinpoint exactly which router is overloaded and causing lag.

Deploying SmokePing: From Installation to Visualization

This guide focuses on Ubuntu/Debian due to its popularity. For CentOS/RHEL, the steps are similar, but you will use the dnf command instead.

Step 1: Installing SmokePing and Web Server

SmokePing operates as a background script, outputting data to RRD (Round Robin Database) format. The fastest way is to use Apache as the web server since sample configuration files are provided.

sudo apt update
sudo apt install smokeping apache2 libapache2-mod-fcgid -y

Once installed, enable the necessary modules to display the web interface:

sudo a2enmod cgi gci fcgid
sudo a2enconf smokeping
sudo systemctl restart apache2
sudo systemctl restart smokeping

Now, you can access http://your-server-ip/smokeping/smokeping.cgi. However, the interface won’t have any monitoring targets yet.

Step 2: Configuring Targets – The Heart of the System

The main configuration file is located at /etc/smokeping/config.d/Targets. You should back up the original file before editing for safety.

sudo nano /etc/smokeping/config.d/Targets

Below is an example configuration for monitoring public DNS and the ISP Gateway:

*** Targets ***
probe = FPing
menu = Top
title = ItFromZero Network Monitoring System

+ PublicDNS
menu = Public DNS
title = Public DNS Servers

++ GoogleDNS
host = 8.8.8.8

++ CloudflareDNS
host = 1.1.1.1

+ LocalInfrastructure
menu = Local Infrastructure
++ Gateway
host = 192.168.1.1

When I need to quickly calculate subnets for grouping devices in this file, I often use toolcraft.app/en/tools/developer/ip-subnet-calculator. Just enter the CIDR and you get the IP range and host count. This tool is extremely helpful when managing lists of hundreds of branch IPs.

Step 3: Fine-tuning Probes

By default, SmokePing uses FPing, sending 20 packets every 300 seconds. If you want denser data, you can lower the step value to 60 or 120. However, the default configuration is sufficient for basic needs without straining the CPU.

Practical Tips from the Field

After years of deploying SmokePing for large projects, here are 3 key points to remember:

  1. Permissions: Blank charts are often caused by directory permission errors. Ensure the smokeping user has write access to /var/lib/smokeping.
    sudo chown -R smokeping:www-data /var/lib/smokeping /var/cache/smokeping
  2. Firewall: Remember to open ports 80/443. Also, ensure the server doesn’t block outgoing ICMP packets. If monitoring a partner’s server, ask them to whitelist your IP to avoid being blocked by IDS.
  3. Security: The default interface has no password. Don’t expose your network map to the Internet. Using Apache’s .htpasswd is the simplest way to lock access.
    sudo htpasswd -c /etc/apache2/.htpasswd admin

Conclusion: No More Midnight Calls

SmokePing is the most visual tool for “seeing through” connection quality. Instead of guessing, a 24/7 monitoring system provides solid evidence when dealing with ISPs.

Don’t wait for a network outage to start installing. Set up a small VPS and start monitoring critical nodes today. It will help you sleep much better!

Share: