I recently learned that Sun Solaris network cards (ce devices) have problems with ndd -get commands. I did some searching and found out about the netstat -k command to show me the link speed. What is the best way to change the link speed (both one time and permanently)?
Thank you for the script. The ndd -get command on the CE device had difficulties. I got an "invalid argument" error.
I did: ndd -get /dev/ce link_speed
I tried:
ndd -get /dev/ce0 link_ststaus
failed: No such file or directory
ndd -get /dev/ce link_status
Invalid argument
There is no /dev/ce0. The device is definitely ce0 though.
There are numerous articles about ndd not working with ce devices. here is one that I found:
Q We're installing a number of Solaris 8 boxes on our LAN, and we want to verify that the speed and duplex on the switch match that of the Sun network interfaces during auto-negotiation. If we have to, we'll explicitly set both sides and turn off auto-negotiation. These machines have ce0 interfaces, but ndd doesn't seem to be useful here. I tried:
The link_speed shows up as 0. That doesn't seem to be meaningful, since it only seems to have a value of 0 or 1, and there are more than two speeds available. Is there another variable I should be looking at with ndd, or does link_speed have more than a 0/1 setting?
A The ndd command doesn't work with ce interfaces. Use the -k switch to netstat to obtain the information you're looking for:
I haven't got a system to hand, but before doing
ndd -get /dev/ce link_status
you have to do
ndd -set /dev/ce instance 0
(I hope I've got the syntax right!)
You can also use a ? instead of an option, to list all og the available options, eg.
ndd -get /dev/ce ?
In the good old Solaris way, some cards allow you to set things via the system file, but others don't.
So I think that the ndd route is the only consistent one.