After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 346021 - libgtop can't get net load at Solaris
libgtop can't get net load at Solaris
Status: RESOLVED FIXED
Product: libgtop
Classification: Core
Component: solaris
2.14.x
Other All
: Normal blocker
: ---
Assigned To: libgtop maintainers
libgtop maintainers
Depends on:
Blocks: 156176 385090
 
 
Reported: 2006-06-27 12:04 UTC by henry
Modified: 2007-10-10 08:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
patch for netload at Solaris (8.95 KB, patch)
2006-06-28 08:40 UTC, henry
reviewed Details | Review
new patch (8.51 KB, patch)
2006-06-28 09:31 UTC, henry
reviewed Details | Review
new patch comment ipv6 out (8.68 KB, patch)
2007-01-25 11:56 UTC, henry
rejected Details | Review
netload.c patch (6.92 KB, patch)
2007-10-08 16:07 UTC, henry
committed Details | Review
ChangeLog diff (474 bytes, patch)
2007-10-08 16:08 UTC, henry
committed Details | Review

Description henry 2006-06-27 12:04:36 UTC
Please describe the problem:
libgtop can't get net load at Solaris, the relative function is null

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?
yes

Other information:
Comment 1 henry 2006-06-28 08:40:11 UTC
Created attachment 68104 [details] [review]
patch for netload at Solaris
Comment 2 Benoît Dejean 2006-06-28 09:12:45 UTC
#include <linux/ ...
Comment 3 henry 2006-06-28 09:30:15 UTC
sorry, a little busy, and forget to delete all of the unuseful ones.
Please see the new patch... :)
Comment 4 henry 2006-06-28 09:31:31 UTC
Created attachment 68109 [details] [review]
new patch
Comment 5 Benoît Dejean 2006-06-28 13:55:43 UTC
could you glibify it please ? 

+	 *  chop off the trailing interface and 
+	 */
+	module = strdup( name );
+	ptr = module + strlen( module ) - 1;
+	while( (ptr > module) && isdigit( (int) *ptr ) ) {
+		*ptr = '\0';
+		ptr--;
+	}


i'm sure you can find in glib strinfs function some stuff to do that easily. No malloc/free please, use glib. g_strchomp(g_strdelimit(module, "0123456789", ' ')) maybe ?

have you tried the ipv6 support ? is OK ?
Comment 6 henry 2006-06-29 05:45:29 UTC
Benoit, 
Thanks for your suggestion, it's very useful. at least I try to understand the glib API. :)
But I am concerning, if we use g_strdelimit(module, "0123456789", ''), maybe we will destroy something in module, g_strdelimit() explain "Any characters in string which are found in delimiters are changed to the new_delimiter character", it means if the module is ip6stat, it will change 6 too, and the original program is just want to delete the number in the end of module.
What's your comments? If I am wrong, please correct me. 

Sorry, I am not test ipv6, becaue I didn't use ipv6 now. 
I keep the get_ipv6() there, because I think maybe later we can use some of it.. :)
Comment 7 Benoît Dejean 2006-06-29 07:52:00 UTC
so you don't even know if the ipv6 code you copied from linux works on solaris ?
Comment 8 henry 2006-06-29 08:00:45 UTC
I didn't test ipv6 code, I keep them there, because I think they are useful in the future,
so if you think I can't confirm the ipv6 code, could we just delete these codes?
Comment 9 henry 2006-06-30 11:07:26 UTC
Benoit, I took a review the get_ipv6() with our colleagues, seems this function can't work on Solaris, I am sorry.
So what your prefer? deleting this function and checkin this patch(this patch can work correctly without call get_ipv6), or wait until I find a way to implement it?
Comment 10 henry 2006-07-03 03:58:45 UTC
I double checked the code, I know why it didn't run at Solaris, because there is a macro HAVE_IFADDRS_H, when we have ifaddrs.h, get_ipv6() code will run, but in fact at Solaris, there is no by now...
Comment 11 Benoît Dejean 2006-07-03 08:11:41 UTC
just drop broken code :) ipv6 can wait.
Comment 12 henry 2006-09-01 04:11:36 UTC
I contacted the ipv6 engineer, now there is no any reply, so could we integrate the other part, and once I make the implementation of get_ipv6() available, I will provide it..
Comment 13 Benoît Dejean 2006-09-01 18:10:48 UTC
(In reply to comment #11)
> just drop broken code :) ipv6 can wait.
> 

Comment 14 Germán Poo-Caamaño 2006-12-01 16:19:23 UTC
which is the status of this issue? May be solved before 2.18?

(Changed to NEW, because it seems to exists according the comments)
Comment 15 Benoît Dejean 2006-12-18 16:55:57 UTC
I'm waiting for a patch split.
Comment 16 henry 2006-12-19 02:35:50 UTC
Sorry for late reply, German and Benoit,

I am busy in a priority 1 project for Solairs for a while, really can't find time on this, I will try to see if anyone else can help me on this...

BTW, what's 2.18 deadline?
Comment 17 henry 2007-01-25 11:56:36 UTC
Created attachment 81169 [details] [review]
new patch comment ipv6 out
Comment 18 henry 2007-01-25 11:58:15 UTC
sorry, maybe the patch split is just the patch need to comment out ipv6 implement? if so, please check the new patch, these days I have time, and can start work on it, but it can be accepted partly?
Comment 19 Germán Poo-Caamaño 2007-10-04 13:44:15 UTC
I'm not sure if this report should be closed without reviewing the patch.

Benoît, is it possible to take a look at the pending patch? and made sompe comment.

Thanks.
Comment 20 Benoît Dejean 2007-10-04 13:57:26 UTC
As i have already said, i want the patch to be cleaned: either provide an IPv6 implementation or don't. But i don't want dead linux code in it.
Comment 21 henry 2007-10-04 16:47:00 UTC
I didn't see any words to describe your comments, I asked your comments before, but no any reply. You may need to give some comments to tell others what you think.
Will provide a new patch without ipv6 and Linux codes....
Comment 22 henry 2007-10-08 16:06:10 UTC
New patch attached, please review. 
I also added the ChangLog diff under sysdep/solaris, I am not sure if this diff is ok, if not, please let me know...
Comment 23 henry 2007-10-08 16:07:30 UTC
Created attachment 96880 [details] [review]
netload.c patch
Comment 24 henry 2007-10-08 16:08:10 UTC
Created attachment 96881 [details] [review]
ChangeLog diff
Comment 25 Benoît Dejean 2007-10-10 08:14:56 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.