jbenc/plotnetcfg

ShowMyNS

Closed this issue · 2 comments

Hi Jiri,
I did a very similar application some time ago, named "Show My Network State".
Check it out here:
https://github.com/gargarozz/ShowMyNS
I chose a "output parsing" approach with regular expressions, surely it's more an hack than an API-based approach.
Tell me if you have found it useful.
Giuliano

jbenc commented

Thank you for the link, I didn't know about ShowMyNS.
What I think will prove problematic is basing such tool on Java. For debugging problems on a server, you need as few dependencies as possible. Java is not going to be installed on many (most?) of them.
Also, as you correctly noted, parsing output of other tools is fragile. What's worse, it won't give you all the information you need. Especially when taking network namespaces into account. In plotnetcfg, great care was taken to support network namespaces. There's a heuristic algorithm to match interfaces that are linked across namespaces for kernels that don't have netnsid support (i.e. basically every kernel out there ATM; for the newest kernels that do support netnsid, it's taken use of to match the cross-netns links reliably). And that's for all network namespaces, not just the subset that iproute2 is aware of. plotnetcfg also talks directly to ovs, getting information that ovs-vsctl does not display. And of course, it talks to the kernel directly and has no need for iproute2, ethtool, etc. installed.
That said, the interactive graphical output of ShowMyNS is certainly useful. This is something plotnetcfg does not have and does not intend to have. Have you thought about using plotnetcfg as a backend for your application? :-)

No, I'll leave it as an exercise for future contributors :)
Probably, however, I would rethink the application using another approach, for example using web tecnologies and host-deployed agents instead of a desktop java GUI client.
It would also be interesting to have a control on more than one machine, with the ability to "zoom-in" from the topology to the specific host of interest.
Another interesting feature for network administrator could be the ability to see the "snapshots" of previous network states in order to identify the exact moment a problem occurred.