In superKaramba, network sensor doesn't work if the interface name doesn't have leading whitespace. Basically line 115 in networksensor.cpp has a small flaw in it which prevents the "in/out" from properly being read. As you can see form the regular expression: QRegExp rx( "\\W+"+device+":(\\d+)(?:\\D+\\d+){7}\\D+(\\d+)", false); it is expecting at least one whitespace character, however for longer device names, there isn't a leading whitespace. changing the line to this seems to fix it: QRegExp rx( "\\W*"+device+":(\\d+)(?:\\D+\\d+){7}\\D+(\\d+)", false); which basically changes it from "1 or more whitespace" to "0 or more whitespace", i think this is more appropriate. Also, I feel that on Linux builds should attempt to use the sys file system to get this information as it is broken up in a manner which is trivial to parse: the directory: /sys/class/net/<device>/ has several files describing just about everything needed about a given interface, and /sys/class/net/<device>/statistics has several files which have all the necessary stats on an individual basis (no need to parse, just read the file). I have reported this bug on bugs.kde.org (https://bugs.kde.org/show_bug.cgi?id=138696) more than 6 months ago, but to be honest, noone seems to care. I am hoping at least a patch would make it into the gentoo ebuilds. Evan Teran Reproducible: Always Steps to Reproduce: 1. create a long network device name for example: wireless0 2. Use any superkaramba widget which uses the network sensor in/out 3. It will always read no traffic Actual Results: doesn't show traffic Expected Results: should show the traffic
The Bug still exists in the 3.5.7 source, the line in question is now: 111 in the same file. Evan Teran
(In reply to comment #1) > The Bug still exists in the 3.5.7 source, the line in question is now: 111 in > the same file. Usually, we don't include patches for things upstream should fix. In this case, though, I propose a deal: You make me a nice little patch for that line and I'll add it. :-)
Deal :) I'm attaching a very simple patch which does exactly as I described. Evan Teran
Created attachment 123005 [details, diff] one character fix, but appears to do the job
Thanks, Evan! I've kept my part of the bargain ;-) and just checked in your patch to CVS for both superkaramba and kdeutils 3.5.7. No version bump as the change is rather small and nobody seems to have noticed the bug since KDE 3.5.5 at least but you.