Bug 315259 - Ksysguard don't show the network traffic with the new predicaable interface names from systemd
Summary: Ksysguard don't show the network traffic with the new predicaable interface n...
Status: RESOLVED FIXED
Alias: None
Product: ksysguard
Classification: Unmaintained
Component: ksysguard (show other bugs)
Version: 4.11.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
: 323850 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-16 07:26 UTC by dimmer
Modified: 2013-12-06 21:41 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.2
Sentry Crash Report:


Attachments
Patch that should fix the issue (1.13 KB, patch)
2013-08-27 12:55 UTC, Christoph Feck
Details
Updated patch (1.12 KB, patch)
2013-08-27 13:01 UTC, Christoph Feck
Details
Patch that should fix the issue (1.27 KB, patch)
2013-08-27 13:17 UTC, Christoph Feck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dimmer 2013-02-16 07:26:52 UTC
Ksysguard and plasmoid see new network names, but the activity chart for network is flat.

If we go back to old schame names (eth0, wlan0) everything works.

Reproducible: Always

Steps to Reproduce:
1. Install systemd 197
2. 
3.
Actual Results:  
Flat line

Expected Results:  
Chart for network usage
Comment 1 JenyaYQ 2013-02-16 10:17:57 UTC
The same here...I tried to look up a solutions but did find only an awkward workaround.
Comment 2 Guillaume DE BURE 2013-02-17 22:05:38 UTC
Confirmed here, using archlinux. Also affects the networkmanager plasmoid, so maybe this is more a solid bug ?
Comment 3 JenyaYQ 2013-02-19 12:49:30 UTC
Forgot to mention that I'm on Chakra Linux too, with latest updated...including Systemd 197
Comment 4 JenyaYQ 2013-02-19 12:54:01 UTC
I meant latest updates  - Linux Kernel 3.7.6-1 , KDE 4.10, Systemd 197 .
Comment 5 Ed Villegas 2013-03-05 18:48:39 UTC
*** This bug has been confirmed by popular vote. ***
Comment 6 Ed Villegas 2013-03-05 18:52:49 UTC
This is also happening on updated Manjaro KDE spin (kernel 3.7.10-0-MANJARO and systemd 197)
Comment 7 Richard Llom 2013-05-27 21:49:25 UTC
I also (still) have this problem on latest KDE SC 4.10.3. 

$ systemd --version
systemd 201
+PAM -LIBWRAP -AUDIT -SELINUX -IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ
$ uname -a
Linux chakra 3.9.2-1-CHAKRA #1 SMP PREEMPT Sun May 19 21:38:45 UTC 2013 x86_64 GNU/Linux
Comment 8 Chao Feng 2013-07-02 14:04:48 UTC
Fixed in KDE 4.11 beta. Please reopen if it still happen to you.
Comment 9 Guillaume DE BURE 2013-07-05 20:13:40 UTC
Well, I still don't see any change here in 4.11beta2 (4.10.90) in archlinux. Systemd version is 204.

My card is listed as wlp16s0, and I use wicd for handling network connections.

Reopening, as advised, then... :(
Comment 10 Chao Feng 2013-07-06 00:56:48 UTC
Network manager here works well. Change title.
Comment 11 Brallan Aguilar 2013-08-14 21:28:01 UTC
Recently I installed KDE 4.11 and I don't see network  traffic on Ksysguard :(
Comment 12 Johannes Jordan 2013-08-20 10:42:46 UTC
I had the problem on KDE 4.10.3 and it remained with KDE 4.11.0.
Running Arch Linux, kernel 3.10.6-2-ARCH, interface named enp0s25.
Comment 13 shaddowy2 2013-08-23 19:29:10 UTC
I can confirm the bug for KDE 4.10.3 & KDE 4.11.0. I use networkmanager, not Wicd, but Ksysguard still doesn't show any network traffic for my interfaces. My interface names are "enp0s25" for ethernet and "wlp3s0" for the wireless interface.
I would be glad if you could adapt Ksysguard to the new interface names of systemd.
Comment 14 Jekyll Wu 2013-08-24 05:36:21 UTC
*** Bug 323850 has been marked as a duplicate of this bug. ***
Comment 15 Christoph Feck 2013-08-27 11:02:15 UTC
Can anyone who can reproduce please add the contents of /proc/net/dev and /proc/net/wireless files?
Comment 16 shaddowy2 2013-08-27 11:09:10 UTC
$ cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
enp0s25: 104281854   95934    0    0    0     0          0        99 10339277   86403    0    0    0     0       0          0
wlp3s0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
    lo:   65284     498    0    0    0     0          0         0    65284     498    0    0    0     0       0          0

$ cat /proc/net/wireless 
Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22

I hope that is correct. Any other info needed?
Comment 17 shaddowy2 2013-08-27 11:36:23 UTC
Okay, I forgot to enable my wireless adapter in the previous message.
This time with enable ethernet & wireless adapter:

$ cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
enp0s25: 105407562   98157    0    0    0     0          0       132 10708656   88884    0    0    0     0       0          0
wlp3s0:   25654     157    0    0    0     0          0         0     8368      34    0    0    0     0       0          0
    lo:  107308     788    0    0    0     0          0         0   107308     788    0    0    0     0       0          0

$ cat /proc/net/wireless 
Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
wlp3s0: 0000   63.  -47.  -256        0      0      0      0     29        0
Comment 18 Johannes Jordan 2013-08-27 12:15:45 UTC
# cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
enp0s25: 16361225967 28108108    0  948    0     0          0    266534 29967671784 29692371    0    0    0     0       0          0
wlp3s0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
    lo: 24433307  211370    0    0    0     0          0         0 24433307  211370    0    0    0     0       0          0

Wireless is disabled and I am too lazy to connect to a network.
Comment 19 Christoph Feck 2013-08-27 12:55:29 UTC
Created attachment 81964 [details]
Patch that should fix the issue

Interesting. The format of the file seems to assume there is a six-character limit for device names, because shorter names are padded with spaces. The new names, however, are indeed 7 characters long, breaking the format of the file.

Can someone please test attached patch?
Comment 20 Christoph Feck 2013-08-27 13:01:38 UTC
Created attachment 81965 [details]
Updated patch

Sorry, previous version broke short names. This should work for short (<6), long (=6), and over-long names (>6 characters).
Comment 21 Johannes Jordan 2013-08-27 13:07:57 UTC
In the second file you rely again on some prior knowledge on field length that could go wrong later. You better scan the field with %d as well and just throw away the result.
Comment 22 Johannes Jordan 2013-08-27 13:09:16 UTC
I also suggest to retrieve the value returned by sscanf() and if it is != values to parse, throw an error instead of silently failing.
Comment 23 Christoph Feck 2013-08-27 13:17:37 UTC
Created attachment 81967 [details]
Patch that should fix the issue

Parse/skip status field as suggested.
Comment 24 Christoph Feck 2013-08-27 13:19:20 UTC
Regarding comment #22, I will leave that to ksysguard maintainers, because I do not know the code good enough to propose changes regarding error handling.
Comment 25 Johannes Jordan 2013-08-27 13:49:36 UTC
I applied the patch on current git. It works as expected.
Comment 26 shaddowy2 2013-08-27 15:47:02 UTC
I confirm that your patch fixes the problem,  I compiled kdebase-workspace-4.11.0 with your patch included.
It works for the total network usage, and separate ethernet & wireless connection.
Thank you very much Christoph for coming up with a solution!
Now I hope your fix gets included in the next KDE release ;)
Comment 27 Christoph Feck 2013-08-27 16:13:18 UTC
https://git.reviewboard.kde.org/r/112319/
Comment 28 Christoph Feck 2013-09-09 23:22:41 UTC
Git commit d09e48307f1dc204118a45a81f34102ff75fd997 by Christoph Feck.
Committed on 09/09/2013 at 23:20.
Pushed by cfeck into branch 'KDE/4.11'.

Fix network stats with new systemd interface names
FIXED-IN: 4.11.2
REVIEW: 112319

M  +4    -3    ksysguard/ksysguardd/Linux/netdev.c

http://commits.kde.org/kde-workspace/d09e48307f1dc204118a45a81f34102ff75fd997
Comment 29 Antonio Sánchez 2013-12-06 21:41:37 UTC
Kubuntu 13.10, KDE 4.11.2, wired connection, ksysguard is not displaying any network activity. Same bug?