DEV Community

Cover image for From tcpdump to a 3D world: visualize server traffic in real time
Savne Digital Solutions
Savne Digital Solutions

Posted on

From tcpdump to a 3D world: visualize server traffic in real time

Demo

When you manage several Linux servers, you usually end up jumping between dashboards, charts, terminals, and monitoring tools.

But there is a question that is not always easy to answer visually:

Which server is talking to which, and what is happening in the infrastructure right now?

WorldServers tries to answer that question by turning your servers and part of their network activity into an interactive 3D world.

Each server appears as a node, and traffic can be seen moving between them in real time.


General architecture

Architecture

Diagram created with Savnet.


WorldServers is an open source desktop application written in Rust for monitoring remote Linux servers.

It currently lets you visualize:

  • CPU
  • Memory (RAM)
  • Disk usage
  • Inbound traffic
  • Outbound traffic
  • Traffic between registered servers
  • Connection status

The application connects to each server over SSH and gathers information using standard Linux tools. No proprietary agent needs to be installed on each machine.

Rotate world


How does it work?

The overall flow is quite simple:

  1. You register a Linux server.
  2. WorldServers opens an SSH connection.
  3. It reads system metrics.
  4. It runs tcpdump to observe network traffic.
  5. It renders servers, metrics, and traffic inside the 3D world.

For metrics it uses standard tools like top, free, and df. For traffic capture it uses tcpdump, and iproute2 to detect the main network interface. The idea is to leverage tools that already exist on virtually any Linux server.

Register server


Server requirements

Each server you want to monitor needs:

  • Linux.
  • SSH access.
  • tcpdump.
  • iproute2.
  • top.
  • free.
  • df.

On Debian or Ubuntu you can install everything needed with:

sudo apt-get update
sudo apt-get install -y tcpdump iproute2 sudo
Enter fullscreen mode Exit fullscreen mode

Then you can verify where tcpdump is installed:

command -v tcpdump
Enter fullscreen mode Exit fullscreen mode

For example /usr/bin/tcpdump or /usr/sbin/tcpdump.

The path may vary depending on the distribution.

Register Server 1


Create a monitoring user

You don't need to use root to connect WorldServers.

A safer alternative is to create a dedicated user with sudo adduser monitor. Then you can allow only tcpdump to be executed via sudo without a password. Open the configuration with:

sudo visudo
Enter fullscreen mode Exit fullscreen mode

And add a rule similar to:

monitor ALL=(root) NOPASSWD: /usr/sbin/tcpdump
Enter fullscreen mode Exit fullscreen mode

Use the exact path you got earlier with:

command -v tcpdump
Enter fullscreen mode Exit fullscreen mode

This way, WorldServers can run sudo -n tcpdump without keeping an SSH session as root.

Carefully review any NOPASSWD rule before using it in production and limit it strictly to the commands you need.


Install WorldServers

You can download the latest version from WorldServers Releases

You can also review the source code or build the application yourself from github.com/OscarSanchezSavne/world-servers


Connection validation

When you register a server, WorldServers tests the connection before starting to monitor it.

Among other things, it validates:

  • SSH connection.
  • SSH handshake.
  • Authentication.
  • Availability of tcpdump.
  • Required permissions to run the capture.

The result appears directly in the connection log.

Test connection

This lets you quickly spot configuration issues before adding the server to the world.


The 3D world

Monitor 2

Once the servers are registered, you can open the visualization.

Each internal server is represented by a set of hexagonal cells.

Each node shows its main metrics: CPU, RAM, Disk.

The color of the bars lets you quickly identify usage levels.

The camera allows you to:

  • move around;
  • zoom in and out with double click and escape;
  • rotate the world;
  • focus elements.

The rotation is not just decorative. The world is actually built as a real 3D scene using Bevy.


Security

There are several important considerations:

  • Don't use root unless necessary.
  • Use SSH keys whenever possible.
  • You can use firewall, VPN, or network rules to restrict which machines can connect to the server.
  • If you need to run tcpdump through sudo, limit the permission to the required binary only.

What could it be used for?

WorldServers can be interesting if you want to:

  • Visually observe a small or medium-sized infrastructure.
  • Quickly identify traffic between machines.
  • Correlate network activity with resource usage.
  • Experiment with other ways of visualizing infrastructure.
  • Have a spatial representation of your servers.

It is not meant to replace a full observability platform. The idea is to offer another perspective on the same infrastructure.


Open source project

WorldServers is open source and the code is available on GitHub: github.com/OscarSanchezSavne/world-servers

If you want to try it: Download the latest version


Links

Top comments (0)