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 548095 - libgtop-net can't get info if the device name is not equivalent with the module
libgtop-net can't get info if the device name is not equivalent with the module
Status: RESOLVED OBSOLETE
Product: libgtop
Classification: Core
Component: solaris
unspecified
Other All
: Normal major
: ---
Assigned To: libgtop maintainers
libgtop maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-17 05:48 UTC by Andras Barna (sartek)
Modified: 2018-01-10 19:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andras Barna (sartek) 2008-08-17 05:48:48 UTC
Please describe the problem:
from kstat:
 
module: rtls                            instance: 1     
name:   mac                             class:    net
	adv_cap_1000fdx                 0
	adv_cap_1000hdx                 0
	adv_cap_100fdx                  1
	adv_cap_100hdx                  1
	adv_cap_100T4                   0
	adv_cap_10fdx                   1
	adv_cap_10hdx                   1
	adv_cap_asmpause                0
	adv_cap_autoneg                 1
	adv_cap_pause                   0
	adv_rem_fault                   0
	align_errors                    0
	brdcstrcv                       0
	brdcstxmt                       48
	cap_1000fdx                     0
	cap_1000hdx                     0
	cap_100fdx                      1
	cap_100hdx                      1
	cap_100T4                       0
	cap_10fdx                       1
	cap_10hdx                       1
	cap_asmpause                    0
	cap_autoneg                     1
	cap_pause                       0
	cap_rem_fault                   0
	carrier_errors                  4
	collisions                      0
	crtime                          59.511914861
	defer_xmts                      326
	ex_collisions                   0
	fcs_errors                      0
	first_collisions                0
	ierrors                         0
	ifspeed                         100000000
	ipackets                        243184
	ipackets64                      243184
	jabber_errors                   0
	link_asmpause                   0
	link_autoneg                    1
	link_duplex                     2
	link_pause                      0
	link_state                      1
	link_up                         1
	lp_cap_1000fdx                  0
	lp_cap_1000hdx                  0
	lp_cap_100fdx                   1
	lp_cap_100hdx                   1
	lp_cap_100T4                    0
	lp_cap_10fdx                    1
	lp_cap_10hdx                    1
	lp_cap_asmpause                 0
	lp_cap_autoneg                  1
	lp_cap_pause                    0
	lp_rem_fault                    0
	macrcv_errors                   0
	macxmt_errors                   0
	multi_collisions                0
	multircv                        0
	multixmt                        2
	norcvbuf                        0
	noxmtbuf                        0
	obytes                          90792191
	obytes64                        90792191
	oerrors                         0
	oflo                            0
	opackets                        169967
	opackets64                      169967
	promisc                         0
	rbytes                          297775582
	rbytes64                        297775582
	runt_errors                     0
	snaptime                        8557.62192947
	sqe_errors                      0
	toolong_errors                  0
	tx_late_collisions              0
	uflo                            0
	unknowns                        0
	xcvr_addr                       0
	xcvr_id                         0
	xcvr_inuse                      0
 
module: rtls                            instance: 1     
name:   rtls1                           class:    net
	brdcstrcv                       0
	brdcstxmt                       48
	collisions                      0
	crtime                          59.553486437
	ierrors                         0
	ifspeed                         100000000
	ipackets                        243184
	ipackets64                      243184
	link_duplex                     2
	link_state                      1
	multircv                        0
	multixmt                        2
	norcvbuf                        0
	noxmtbuf                        0
	obytes                          90792191
	obytes64                        90792191
	oerrors                         0
	opackets                        169967
	opackets64                      169967
	rbytes                          297775582
	rbytes64                        297775582
	snaptime                        8557.624356708
	unknowns                        0
 
they are the same interface, also the "real" is 'mac'
dont know for sure why is 'mac', i think because i removed 'rtls0'...

from libgtop-2.20.1/sysdeps/solaris/netlist.c:
 
 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next)
        {
                if (strcmp(ksp->ks_class, "net") != 0)
                        continue;
 
               /* do some check to see if the first character is the same between
                  name and module, if not, we don't return it, because 
                  glibtop_get_netload() only want the same ones....
                */
               if (check){
                       /* if the first character is not same, they should not
                          the one we will use in glibtop_get_netload() */
                       if (ksp->ks_name[0] != ksp->ks_module[0])
                               continue;
                       /* because in glibtop_get_netload(), name
                          is at least 1 character longer than module */
                       if (strlen( ksp->ks_module ) >= strlen( ksp->ks_name))
                               continue;
                       /* if it's not digital, continue directly */
                       if( !isdigit( (int) ksp->ks_name[strlen( ksp->ks_module )] ))
                               continue;
               }
               g_ptr_array_add(devices, g_strdup(ksp->ks_name));
               buf->number++;   }
 
so, this must be changed, why?
if you play with dladm and rename the device it will fail (no data), also in opensolaris will be integrate a "friendly device name" thingy, which means that for example "rtls1" will be "net1" or "eth1"

the output of ./netlist and ./netload from examples:
_./netlist
net device 'ip6stat'
net device 'lo0'
net device 'rtls1'
_./netload rtls1
Method = 1
Command = '/usr/bin/libgtop_server2'
Host = '' - 0

Network Load (0x000000000000000d):

	Interface Flags:	0x0000000000010046
	Address:		0x0201a8c0 - 192.168.1.2
	Subnet:			0x00ffffff - 255.255.255.0

	MTU:			0
	Collisions:		0

	Packets In:		0
	Packets Out:		0
	Packets Total:		0

	Bytes In:		0
	Bytes Out:		0
	Bytes Total:		0

	Errors In:		0
	Errors Out:		0
	Errors Total:		0

	Address6:		::
	Prefix6:		::
	Scope6:			000

	Harware Address:	00:00:00:00:00:00:00:00

_
the netload output from the livecd:
$ ./netload rtls0
Method = 1
Command = '/usr/bin/libgtop_server2'
Host = '' - 0

Network Load (0x0000000000002ffd):

        Interface Flags:        0x0000000000010046
        Address:                0x0201a8c0 - 192.168.1.2
        Subnet:                 0x000000ff - 255.0.0.0

        MTU:                    0
        Collisions:             0

        Packets In:             114
        Packets Out:            179
        Packets Total:          293

        Bytes In:               19310
        Bytes Out:              19427
        Bytes Total:            38737

        Errors In:              0
        Errors Out:             0
        Errors Total:           0

        Address6:               ::
        Prefix6:                ::
        Scope6:                 000

        Harware Address:        00:00:00:00:00:00:00:00

jack@opensolaris:~$ 

also notice that the Hardware address is not available


Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 henry 2008-08-20 14:55:45 UTC
Finish remove the check codes in open solaris, and that patch is not upstream, it's only in the opensolaris, you may close this bug here.
Comment 2 henry 2008-08-20 14:58:59 UTC
Just removed the check codes, but this patch is not upstream, so just fixed it in opensloaris, you may close the bug here.
Comment 3 Andras Barna (sartek) 2008-08-20 15:13:23 UTC
why is not upstream?
it applies to SXCE too, and solaris 10 has dladm too no?
how can it hurt?
Comment 4 henry 2008-08-20 15:19:07 UTC
hmm, I can't remember, it's a little long time.
In fact, I remember it's accepted upstream, but in the lasted version source tarball, I can't find them there.
My changes will be in SXCE. libgtop doesn't exist in S10. Thanks..
Comment 5 Andras Barna (sartek) 2008-08-20 15:35:08 UTC
i see,
would be a better idea to create a new folder in sysdeps? sysdeps/opensolaris ?
(sorry i'm upstreamed-patches fan)
Comment 6 henry 2008-08-20 16:20:19 UTC
No, I think it's not necessary, I will work to make the patch simple, and try my best to make most of the patch upstream, but at the moment, have no time on it, have to work out several other projects, which are target this month.
Comment 7 GNOME Infrastructure Team 2018-01-10 19:46:20 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libgtop/issues/9.