I'm vaguely aware that there are crates available in the Rust ecosystem for interrogating and manipulating sockets much more directly as well as high level abstractions for all things netlink (read: AF_NETLINK). Is wielding Rust's socket/netlink libraries unsuitable in some way, or was it merely deemed out of the design scope?
Very cool project, please keep going!
[1] https://github.com/grigio/network-monitor/blob/master/src/se...
I'm using an Eero router out of laziness and even it has some features here that I'd like to see more of in polished "home-user" style network tools; especially since it seems as if more are getting into the "homelab"/"selfhosted" thing.
Just for visualizing network topology on Linux, there's a lot of tools.
And it's a bit sad that in the year of our lord 2025, the best way to get such fundamental information is by using regexes to parse a table[1], generated by a 6000-line C program[2], which is verified by (I hope I'm wrong!) a tiny test suite[3]. OSQuery[4] is also pretty cool, but it builds upon this fragile stack.
That's something I miss from Windows, at least PowerShell has built-in commands that give you structured output.
[1] https://github.com/grigio/network-monitor/blob/9dc470553bfdd...
[2] https://github.com/iproute2/iproute2/blob/main/misc/ss.c
[3] https://github.com/iproute2/iproute2/blob/main/testsuite/tes...
Simply because I need one for non-critical stuff and things like uptime robot are enterprise geared and too expensive for me to entertain.
I wish there was an uptime robot for like 25 cents a monitor a month.
I do want to say, I don't like having to rely on scraping ss output. But that's not a comment on this project - I have done the exact same thing. It just proved to be the most expedient way given the constraints I was under. I suspect there is a lot of devops and CI/CD code out there that relies on the output format of ss. My concern is that parsing text intended for human readability and not machine processing is brittle and prone to failure due to unforeseen circumstances, or a package upgrade that changes the behavior.
I really like the eBPF approach as pointed out to by the other comments. I feel like this is the ideal approach, please correct me if I'm wrong.
A callback based approach as opposed to (constantly) polling the output of some command is ideal.
Food for thought!
-> voila!
Whether or not the specific functions needed to replicate this tool are impacted is beyond my knowledge.
What info does it show more than a:
"netstat -tulpn"
Wrote myself a script years ago that basically loops netstat -tulpn watch like for the same purpose - just wondering if your tool shows me more than that.
/s
* unless you are one of those weirdo's who has a black on white terminal in which case you should be on a watch list (/s in case wasn't immediately obvious).
It reminds me of fashion trends, miniskirts then maxis, up and down past the knee like tides.
Fads, that's the word.
I haven’t tried it yet but I believe Qt will weigh around the same.
The TUI I ported uses <8mb RAM so I kinda lost interest in the GUI endeavor for my tools since I like to have one running in each project workspace.
Bit of a rant I wanted to share here:
I've seen the same happened on zenity (a GUI dialog utility for shell scripts) since they migrated from GTK3 into GTK4.
Now zenity took almost 2 seconds to launch instead of .5 to a second when they still used GTK3.
This might be an issue on both libadwaita and GTK4 itself.
Both pavucontrol (which uses GTK4 but not libadwaita, at least for now) and even a simple dialog in zenity (GTK4+libadwaita) consumed over 100 MiB of memory according to btop measurement, while both thunar and engrampa, which is both GTK3 apps, only consumed half the amount of memory usage (about 50 MiB according to btop).
However, I've noticed that zenity, GNOME apps, and other apps that uses libadwaita took longer to launch compared to apps that only used GTK4 (pavucontrol), which launched as fast as other GTK3 apps does.
https://github.com/grigio/network-monitor/blob/9dc470553bfdd...
// Enhanced styling with column-specific classes and alignment
This sort of marketing-speak isn't what people typically put in their code, LLMs love buzzwords. It's not just this, it's everything, but hopefully you get what I mean.