Profile picture

Mohy Elden

Software Engineer

Building Packet Meter: Cross-platform Network Usage Monitor

January 5, 2026(7d ago)

In my country, internet quota limits are very strict, so I needed a system to track all my network bandwidth. All the apps I found, like GlassWire (great app, btw) only track usage on the device they’re installed on. So I decided to build Packet Meter.

The idea was to create services that run on all my network devices, send their network usage to a central server, and display everything in a dashboard with email reports sent to me.

Building the Services

Windows

I started with the Windows service and built it using C# because it provides easy, high-level APIs for ETW sessions.

Windows has a built-in, high-performance logging system called ETW (Event Tracing for Windows).
It allows us to subscribe to real-time kernel events, including:

  • TCP Send
  • TCP Receive
  • UDP Send
  • UDP Receive

Each event includes the Process ID, so we can reliably attribute traffic to the correct process.

I also used System.Net.NetworkInformation to get total usage per interface. I preferred this method for total usage because other approaches can introduce small errors.

Android

For Android, I built an app using React Native and Expo that monitors network traffic using Android’s NetworkStatsManager API. The app tracks per-app and total network usage, and reports the data to a central server using background tasks.

Currently, the data is stored daily rather than hourly because this API does not provide real-time usage. I’m still exploring ways to get real-time usage similar to apps like GlassWire.

Linux

On Linux, we can get total usage statistics by reading the kernel-exposed RX and TX byte counters from
/sys/class/net/<interface>/statistics/{rx_bytes, tx_bytes}.
However, I’m still exploring ways to get per-process usage similar to the other services.

Final Result

After connecting all the services together, this is how the dashboard looks:

I was also planning to add more features, such as device-level firewall controls, quota limits, a cloud service so you don’t have to self-host and more, but I’ll see if people are interested and where it goes from there. Since Packet Meter connects to all devices on the network, I can use this to achieve even more things.

Important links: