net_monitor lives again
Working on Mandriva network tools, I looked on one of the most essential ones the network monitor (net_monitor). It was introduced a couple of releases before, and was mostly doing its job. However, it has a number of flaws and lack of features that motivated us to look closer at it.
The net_monitor currently used in all Mandriva versions is written in perl, is using internal drakx-net api (and is, therefore, only usable on Mandriva), and also have some issues such as memory leaks and non-usual interface. After a few thoughts and discussions we came to conclusion that it would be more adequate to project and rewrite it from scratch, turning it more modular, expansible and focused on common use cases.
Initially, I thought on using perl to write it, so it would still be part of drakx-net suite. However, after thinking on the code and the way it should work I felt that my brain was going to melt down
(perl is a nice language, but it is certainly not that compatible with me). So I ended up with python, which is my language of choice (together with C). Also, I’ve received many comments saying that the net_monitor is no more relevant, as every desktop environment provides its own network monitoring tool, and it should be dropped from drakx-net. By combining those issues, we came to decision that it would be more proper to separate net_monitor into a different package – this way, it won’t depend on any drakx-net internal functionalities, and user could uninstall it if required and use his own network monitoring tool if he wants to. And, at the same time, users would still have a cute little network monitoring application on their machines.
So, as a picture says more than a thousand words, I guess I’ll just add some pictures here than additional KBs of text
(EDIT: please note that the look and features of net_monitor have changed significantly in Mandriva since this post):
Surely, this is just an early and preliminary version, with many missing features and such. If you want to give it a try, just install net_monitor package, and it will create /usr/bin/net_monitor executable for you. It won’t conflict with existent net_monitor from drakx-net which is installed in /usr/sbin, so both of them may coexist on your system. If you look at /usr/share/doc/net_monitor/TODO, you’ll see some of the ideas that I intend to add to it, but the idea is to keep it simple and not transform it into an emacs of network monitoring
. And, of course, feel free to add your comments and suggestions (and bug reports) here!
P.S.: Just to prevent comments like ‘you should focus on fixing bugs instead of wasting time writing new things’. Net_monitor is present in Mandriva for years now, and if you look at bugzilla list it has a number of bugs and issues. So I am not creating a new app – I am bringing back from the land of the dead an old one
.
P.P.S.: Answering in advance to another question – yes, it would work on any Linux distro which has python and pygtk. You’ll just have to add some tricks into your network startup scripts to enable vnstat integration, but it will work just fine even without that.

















Great work. It would also be nice to have the dns server and gateway in the info (maybe even as a clickable link for easy access to your router)
oh and SSID and link level too for wireless
Excellent idea, I added it to TODO. All this information is available from /proc (/proc/net/wireless, /proc/net/routes) and from /etc/resolv.conf.
Some remarks :
you should show the interface icon before the interface name in the tab. This allow to identify the interface. Sorry, but a normal user don’t know the difference between eth0 and wlan0. On top of that some wireless interface are named ethx.
some interface should be blacklisted ( wmaster*, vboxnet ?, vmnet ?, … )
you should be able to preselect an interface ( net_monitor –if=eth0 ). This allow to start net_monitor for a predefined interface
a button should be add directly in net_monitor eventually to enable accounting ( except if this will require specific mandriva features ).
for a wireless interface, i’m also interested in seeing the wireless strength
in the interface statistics pane, the fact to use non aligned label look ugly and make it difficult to flow the right line. Maybe a view with a table with cells and border would be more appropriate. Or else, please aligned the text and take into account RTL ( left aligned for french/english/…, right aligned for hebrew/arabic/… )
IMHO to display the different views of the accounting window, you’d better use a tab interface or a comboxbox at the top, instead of radio buttons at the bottom.
Great, many thanks for the suggestions! I’ll try to add them to the next version.
Thanks!
net_monitor is the reason 2009.0 (both new and updated) on a Core2 DUO ABIT 64-bit system locks up so hard you have to power cycle. It was very hard to find, and most unfortunate that Mandriva installs it to the systray by default. The switch to the newer KDE not that long ago re-installed it to all the desktops, and caused hours of grief yet again because I had forgotten having to hunt it down and turn it off. The new features will not do this system any good.
Hi, it’s great to see this old bugger getting some developer love! One of the most annoying things of the current one is the slow show-up time – time from clicking the taskbar icon to actually getting the graphs, I hope this will improve too. I’ll give it a try when I have some time.
I think you are making a confusion between net_monitor and net_applet. Net_monitor does not puts anything to tray, net_applet is the one that stays there.
Excellent piece of work ! I love it !
I am falling in love of this tool
.
Excellent work.
Some remarks :
- For each measure in traffic statistics or interface settings areas , is it KBytes, Bytes, MBytes, GBytes
? We don’t really know.
- The shell guess us to enable network acocunting for the interface, whereas for me the option is activated. Is thre a bug ?
The network accounting seems to require the network interface to be restarted after initial configuration to start working. And it also seems to stop working correctly after suspend/resume. It seems to be something to do in integration between vnstat and initscripts. I’ll look into it.