I'm trying to fetch the interface speed(ifspeed) from kstat, but it shows 0.
kstat -c net -i 0 -n net0
module: link instance: 0
name: net0 class: net
brdcstrcv 0
brdcstxmt 0
collisions 0
crtime 15028423.8933404
ierrors 0
ifspeed 0
ipackets 1373855200
ipackets64 1373855200
link_duplex 0
link_state 1
multircv 0@@
multixmt 0
norcvbuf 0
noxmtbuf 0
obytes 3323621255
obytes64 3323621255
oerrors 0
opackets 3187453
opackets64 3187453
phys_state 1
rbytes 1636977430
rbytes64 91831290646
snaptime 20810048.001272
unknowns 3726
I tried kstat with -s option which also shows the speed as 0.
kstat -s ifspeed
module: link instance: 0
name: net0 class: net
ifspeed 0
module: link instance: 0
name: net1 class: net
ifspeed 0
module: link instance: 0
name: net2 class: net
ifspeed 0
module: link instance: 0
name: net3 class: net
ifspeed 0
module: vnet instance: 0
name: phys class: net
ifspeed 0
module: vnet instance: 1
name: phys class: net
ifspeed 0
module: vnet instance: 2
name: phys class: net
ifspeed 0
module: vnet instance: 3
name: phys class: net
ifspeed 0
Unsure why kstat is not able to fetch the speed, I tried to fetch it through dladm command, which surprisingly shows 0 too.
dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net3 Ethernet up 0 unknown vnet3
net0 Ethernet up 0 unknown vnet0
net1 Ethernet up 0 unknown vnet1
net2 Ethernet up 0 unknown vnet2
Does anyone know why the interface speed is 0 here? What could this possibly indicate? Could there be some problem with the interface configuration ?