Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Current Network Interface Speed

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
Hello,

I am trying to determine the current network interface speed (10 or 100 mhz etc.) of a system.

In researching this before posting it seems I should use ifconfig -a to get the the interface name (eri) then ndd /dev/eri \? to determine the speed.

I did this but am not sure how to interpret the ndd output (below).
transceiver_inuse (read only)
link_status (read only)
link_speed (read only)
link_mode (read only)
ipg1 (read and write)
ipg2 (read and write)
use_int_xcvr (read and write)
pace_size (read and write)
adv_autoneg_cap (read and write)
adv_100T4_cap (read and write)
adv_100fdx_cap (read and write)
adv_100hdx_cap (read and write)
adv_10fdx_cap (read and write)
adv_10hdx_cap (read and write)
autoneg_cap (read only)
100T4_cap (read only)
100fdx_cap (read only)
100hdx_cap (read only)
10fdx_cap (read only)
10hdx_cap (read only)
lp_autoneg_cap (read only)
lp_100T4_cap (read only)
lp_100fdx_cap (read only)
lp_100hdx_cap (read only)
lp_10fdx_cap (read only)
lp_10hdx_cap (read only)
instance (read and write)
lance_mode (read and write)
ipg0 (read and write)
intr_blank_time (read and write)
intr_blank_packets (read and write)


What can you advise?



Thanks,

Michael42
 
Michael42,

That output gives you a list of the readable parameters from that particular driver.

Now type ndd -get /dev/eri link_speed for example.

I use this script to get all parameters and their values:

[tt]#!/bin/ksh
if [ $# -lt 1 ]
then
echo "usage: nddgetall device [instance]"
else
if [ -c $1 ]
then
if [ $# -eq 2 ]
then
echo "Setting instance to $2"
ndd -set $1 instance $2
fi
for p in `ndd -get $1 \? | awk 'BEGIN {getline}{print $1}'`
do
echo "$p: \c"
ndd -get $1 $p
done
else
echo $1 is not a character special device.
fi
fi[/tt]

Annihilannic.
 
While I'm on the subject. You meant Mbits/s didn't you, not MHz. ;-)

There is another way, because even when you get the results from ndd they are a little cryptic. If you use the undocumented -k switch to netstat and redirect it to a file, then dig through that file until you find the interface you are interested in, it actually lists the interface speed in bits/s.


Annihilannic.
 
Annihilannic,

>> You meant Mbits/s didn't you, not MHz.
Yes! :)


Thanks for the detailed and useful reply.



Thanks,

Michael42
 
Don't forget to check link_mode as well as the link_speed.
Make sure everything is running at Full Duplex.
 
netstat -k eri0 (this will give you a complete report on this interface)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top