1MII-DIAG(8)                 System Manager's Manual                MII-DIAG(8)
2
3
4

NAME

6       mii-diag - Network adapter control and monitoring
7

SYNOPSIS

9       mii-diag [options]<interface>
10

DESCRIPTION

12       This manual page documents briefly the mii-diag network adapter control
13       and monitoring  command.   Addition  documentation  is  available  from
14       http://scyld.com/diag/index.html.
15
16
17       This mii-diag command configures, controls and monitors the transceiver
18       management registers for  network  interfaces,  and  configures  driver
19       operational  parameters.   For  transceiver  control  mii-diag uses the
20       Media Independent Interface (MII) standard (thus the command name).  It
21       also  has  additional Linux-specific controls to communicate parameters
22       such as message enable settings and  buffer  sizes  to  the  underlying
23       device driver.
24
25       The  MII  standard  defines  registers  that control and report network
26       transceiver capabilities, link settings and errors.  Examples are  link
27       speed,  duplex, capabilities advertised to the link partner, status LED
28       indications and link error counters.
29
30

OPTIONS

32       The mii-diag command supports both single  character  and  long  option
33       names.   Short  options  use a single dash (´-´) in front of the option
34       character.  For options without parameters,  multiple  options  may  be
35       concatenated  after  a  single  dash.  Long options are prefixed by two
36       dashes (´--´), and may be abbreviated with a  unique  prefix.   A  long
37       option may take a parameter of the form --arg=param or --arg param.
38
39
40       A summary of options is as follows.
41
42
43       -A, --advertise <speed|setting>
44               -F, --fixed-speed <speed|setting>
45
46              Speed  is one of: 100baseT4, 100baseTx, 100baseTx-FD, 100baseTx-
47              HD, 10baseT, 10baseT-FD, 10baseT-HD.  For more  precise  control
48              an explict numeric register setting is also allowed.
49
50
51
52       -a, --all-interfaces
53              Show  the  status  of all interfaces.  This option is not recom‐
54              mended with any other option, especially ones that  change  set‐
55              tings.
56
57
58       -s,--status
59              Return exit status 2 if there is no link beat.
60
61
62       -D     Increase  the  debugging  level.  This may be used to understand
63              the actions the command is taking.
64
65
66       -g, --read-parameters
67              Show driver-specific parameters.
68
69
70       -G, --set-parameters value[,value...]
71              Set driver-specific parameters.  Set a adapter-specific  parame‐
72              ters.   Parameters  are  comma  separated, with missing elements
73              retaining the existing value.
74
75
76       -v     Increase the verbosity level.  Additional "-v" options  increase
77              the level further.
78
79
80       -V     Show the program version information.
81
82
83       -w, --watch
84              Continuously monitor the transceiver and report changes.
85
86
87       -?     Emit usage information.
88
89

DESCRIPTION

91       Calling  the  command  with  just the interface name (which defaults to
92       capabilities, configuration and current status.
93
94
95       The '--monitor' option allows scripting link beat changes.
96
97       This option is similar to --watch, but with  lower  overhead  and  sim‐
98       plifed  output.  It polls the interface only once a second and the out‐
99       put format is a single line per link change with three fixed words
100         <unknown|down||negotiating|up> <STATUS> <PARTNER-CAP>
101
102       Example output:  mii-diag --monitor eth0
103          down         0x7809 0x0000
104          negotiating  0x7829 0x45e1
105          up           0x782d 0x45e1
106          down         0x7809 0x0000
107
108
109       This may be used as
110         mii-diag --monitor eth0 |
111           while read linkstatus bmsr linkpar; do
112            case $linkstatus in
113               up)   ifup eth0 ;;
114               down) ifdown eth0 ;;
115            esac
116           done
117
118
119       It may be useful to shorten the DHCP client daemon timeout if  it  does
120       not  receive an address by adding the following setting to /etc/syscon‐
121       fig/network: DHCPCDARGS="-t 3"
122
123

SEE ALSO

125       ether-wake(8),net-diag(8),mii-tool(8).
126       Addition        documentation         is         available         from
127       http://scyld.com/diag/index.html.
128
129

KNOWN BUGS

131       The  --all-interfaces  option  is  quirky.  There are very few settings
132       that are usefully applied to all interfaces.
133
134

AUTHOR

136       The manual pages, diagnostic commands, and many of the underlying Linux
137       network  drivers were written by Donald Becker for the Scyld Beowulf(™)
138       cluster system.
139
140
141
142
143Scyld Beowulf                  September 9, 2003                   MII-DIAG(8)
Impressum