! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Patch that makes netload check if interface is up
Status:
CLOSED: FIXED
Product:
Xfce4-netload-plugin
Component:
General

Comments

Description Mathy Vanvoorden 2005-09-18 23:43:58 CEST
The attached patch first checks if an interface is up, before netload goes and
look up the IP-address. If it isn't up, the console used to fill up with ioctl
errors. These aren't there anymore now when the interface is down. 

However, they do appear when the interface is up, but doesn't have an IP -
address. I couldn't find how to detect this, other then someone assuming in his
code that when you get an error on SIOCGIFADDR, this is the result of not having
an IP - address. If that is the only possible error, imho there shouldn't be a
perror-call consuming resources. I suspect that may also be related to the
following topic on Gentoo Forums:
http://forums.gentoo.org/viewtopic-t-353304-highlight-error+ictl.html
Isn't it possible that calling perror causes the high CPU usage?

PS: Fixed a spelling error too.
Comment 1 Mathy Vanvoorden 2005-09-18 23:45:17 CEST
Created attachment 316 
Proposed patch
Comment 2 Bernhard Walle 2006-12-17 21:12:39 CET
Fixed with 2249, thanks. Please reopen if the fix doesn't work for you.

Bug #1158

Reported by:
Mathy Vanvoorden
Reported on: 2005-09-18
Last modified on: 2012-01-13

People

Assignee:
Bernhard Walle
CC List:
1 user

Version

Version:
0.4.0 or older

Attachments

Proposed patch (3.24 KB, patch)
2005-09-18 23:45 CEST , Mathy Vanvoorden
no flags

Additional information