mgedmin / indicator-netspeed

Stupid network speed indicator for Unity, inspired by the old netspeed GNOME applet
http://askubuntu.com/questions/30334/list-of-application-indicators/89889#89889
104 stars 47 forks source link

netspeed does not show ppp0 traffic #4

Closed denispr closed 10 years ago

denispr commented 10 years ago

I'm connected to the internet through a speedtouch modem, so the used interface is ppp0. Unfortunately, that interface is not displayed in netspeed interfaces list. Only eth0 and wlan0.

TobBrandt commented 10 years ago

Please try the following in a console:

killall indicator-netspeed && indicator-netspeed & disown

Does your interface now appear in the list?

If not, please post the output of

ifconfig
denispr commented 10 years ago

yes, now ppp0 appears on the list. But selecting it in the list does not work, wlan0 still appears as the monitored interface and downloading files shows "0,0 Kb/s" in netspeed.

TobBrandt commented 10 years ago

The reason why ppp0 doesn't initially appear in the list is probably that indicator-netspeed starts before the modem is picked up by the OS. We never refresh the interface list after it's populated once (that's a known issue, I'll create a ticket for it).

However, I would have expected ppp0 to be selectable after the restart. Can you select "all"? Does that show any traffic?

denispr commented 10 years ago

selecting "all" does not work either, "wlan0" still appears as the monitored interface after that operation.

TobBrandt commented 10 years ago

Could you please select ppp0 from the interface list, then run the following in a console and post the output

dconf read /apps/indicators/netspeed/if-name

In case you don't have dconf installed, you need to install package dconf-cli (at least that's how it's called on Debian and Ubuntu).

denispr commented 10 years ago

well, strangely, after I performed dconf read /apps/indicators/netspeed/if-name (which returned "ppp0"), netspeed works, displaying non zero throughput and showing that the monitored interface is ppp0...

TobBrandt commented 10 years ago

Interesting. I will investigate this further and get back to you. Thanks for your input!

TobBrandt commented 10 years ago

I've added some tracing. Would you be so kind and check out to the latest revision, go to the checkout directory, then execute

make
killall indicator-netspeed
./indicator-netspeed --trace

and after a few second you can kill it with Ctrl+C.

The output should show something like

Tracing is on
populating list of interfaces
adding interface eth0
skipping loopback interface
adding interface ppp0
adding interface wlan0

followed by repeatedly

getting net traffic...
selected interface is ppp0

and

processing interface XXX

for each interface.

What does it do for interface ppp0. Does it show any in/out traffic or does it say "skipping"? Does "processing interface ppp0" appear at all?

denispr commented 10 years ago

Good news, after rebooting, it still worked, showing traffic on ppp0.

And after recompiling with the tracing option, the output is:

Tracing is on populating list of interfaces adding interface ppp0 adding interface wlan0 skipping loopback interface adding interface eth0

getting net traffic... selected interface is ppp0

processing interface ppp0 in: 164595, out: 0

processing interface wlan0 skipping

processing interface lo skipping loopback interface

processing interface eth0 skipping

...

Just one thing, I also tried to select "all", just to see what it does, and it made indicator-netspeed crash with segmentation fault.

TobBrandt commented 10 years ago

Just one thing, I also tried to select "all", just to see what it does, and it made indicator-netspeed crash with segmentation fault.

Does that happen every time you click all? I can not reproduce this here.

denispr commented 10 years ago

I tried three times, it happened each time.

TobBrandt commented 10 years ago

Sorry, my fault. Recompiling helps :-)

This problem should be fixed now. I introduced it accidentally in my previous commit. In my defense: the GTK docs aren't very clear on who owns what memory and who's responsibility it is to free it again.

denispr commented 10 years ago

Thanks, I tested the new release, no more crash !