Blame SOURCES/mii-diag.8

e7a6f3
.\"                                      Hey, EMACS: -*- nroff -*-
e7a6f3
.\" $Revision: 1.1 $ $Date: 2003/09/06 17:20:17 $
e7a6f3
.\" First parameter, NAME, should be all caps
e7a6f3
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
e7a6f3
.\" other parameters are allowed: see man(7), man(1)
e7a6f3
.TH MII-DIAG 8 "September 9, 2003" "Scyld Beowulf\[tm]"
e7a6f3
.\" Please adjust this date whenever revising the manpage.
e7a6f3
.\"
e7a6f3
.\" Some roff macros, for reference:
e7a6f3
.\" .nh        disable hyphenation
e7a6f3
.\" .hy        enable hyphenation
e7a6f3
.\" .ad l      left justify
e7a6f3
.\" .ad b      justify to both left and right margins
e7a6f3
.\" .nf        disable filling
e7a6f3
.\" .fi        enable filling
e7a6f3
.\" .br        insert line break
e7a6f3
.\" .sp <n>    insert n+1 empty lines
e7a6f3
.\" for manpage-specific macros, see man(7)
e7a6f3
.SH NAME
e7a6f3
mii-diag \- Network adapter control and monitoring
e7a6f3
.SH SYNOPSIS
e7a6f3
.B mii-diag
e7a6f3
.RI [ options ] <interface>
e7a6f3
.SH DESCRIPTION
e7a6f3
This manual page documents briefly the
e7a6f3
.B mii-diag
e7a6f3
network adapter control and monitoring command.
e7a6f3
Addition documentation is available from http://scyld.com/diag/index.html.
e7a6f3
e7a6f3
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
e7a6f3
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics, 
e7a6f3
.\" respectively.
e7a6f3
.PP
e7a6f3
This \fBmii-diag\fP command configures, controls and monitors the
e7a6f3
transceiver management registers for network interfaces, and configures
e7a6f3
driver operational parameters.  For transceiver control \fBmii-diag\fP
e7a6f3
uses the Media Independent Interface (MII) standard (thus the command name).
e7a6f3
It also has additional Linux-specific controls to communicate parameters
e7a6f3
such as message enable settings and buffer sizes to the underlying device
e7a6f3
driver.
e7a6f3
.PP
e7a6f3
The MII standard defines registers that control and report network
e7a6f3
transceiver capabilities, link settings and errors.  Examples are link
e7a6f3
speed, duplex, capabilities advertised to the link partner, status LED
e7a6f3
indications and link error counters.
e7a6f3
e7a6f3
.SH OPTIONS
e7a6f3
The \fBmii-diag\fP command supports both single character and long
e7a6f3
option names.  Short options use a single dash (´-´) in front of the option
e7a6f3
character.  For options without parameters, multiple options may be
e7a6f3
concatenated after a single dash.  Long options are prefixed by two
e7a6f3
dashes (´--´), and may be abbreviated with a unique prefix.
e7a6f3
A long option may take a parameter of the form --arg=param or --arg param.
e7a6f3
e7a6f3
.PP
e7a6f3
A summary of options is as follows.
e7a6f3
e7a6f3
.TP
e7a6f3
.B \-A, --advertise <speed|setting>
e7a6f3
.BR
e7a6f3
.B \-F, --fixed-speed <speed|setting>
e7a6f3
e7a6f3
Speed is one of: 100baseT4, 100baseTx, 100baseTx-FD, 100baseTx-HD, 10baseT,
e7a6f3
10baseT-FD, 10baseT-HD.  For more precise control an explicit numeric
e7a6f3
register setting is also allowed.
e7a6f3
e7a6f3
e7a6f3
.TP
e7a6f3
.B \-a, \--all-interfaces
e7a6f3
Show the status of all interfaces.  This option is not recommended with
e7a6f3
any other option, especially ones that change settings.
e7a6f3
e7a6f3
.TP
e7a6f3
.B \-s,\--status
e7a6f3
Return exit status 2 if there is no link beat.
e7a6f3
e7a6f3
.TP
e7a6f3
.B \-D
e7a6f3
Increase the debugging level.  This may be used to understand the
e7a6f3
actions the command is taking.
e7a6f3
e7a6f3
.TP
e7a6f3
.B \-g, \--read-parameters
e7a6f3
Show driver-specific parameters.
e7a6f3
e7a6f3
.TP
e7a6f3
.B \-G, \--set-parameters value[,value...]
e7a6f3
Set driver-specific parameters.
e7a6f3
Set a adapter-specific parameters.
e7a6f3
Parameters are comma separated, with missing elements retaining the
e7a6f3
existing value.
e7a6f3
e7a6f3
.TP
e7a6f3
.B \-v
e7a6f3
Increase the verbosity level.  Additional "-v" options increase the
e7a6f3
level further.
e7a6f3
e7a6f3
.TP
e7a6f3
.B \-V
e7a6f3
Show the program version information.
e7a6f3
e7a6f3
.TP
e7a6f3
.B \-w, \--watch
e7a6f3
Continuously monitor the transceiver and report changes.
e7a6f3
e7a6f3
.TP
e7a6f3
.B \-?
e7a6f3
Emit usage information.
e7a6f3
e7a6f3
.SH DESCRIPTION
e7a6f3
e7a6f3
.PP
e7a6f3
Calling the command with just the interface name
e7a6f3
produces extensive output describing the transceiver
e7a6f3
capabilities, configuration and current status.
e7a6f3
e7a6f3
.PP
e7a6f3
The '--monitor' option allows scripting link beat changes.
e7a6f3
.PP
e7a6f3
This option is similar to --watch, but with lower overhead and simplified
e7a6f3
output.  It polls the interface only once a second and the output format
e7a6f3
is a single line per link change with three fixed words
e7a6f3
  <unknown|down||negotiating|up> <STATUS> <PARTNER-CAP>
e7a6f3
.PP
e7a6f3
Example output:  mii-diag --monitor eth0
e7a6f3
   down         0x7809 0x0000
e7a6f3
   negotiating  0x7829 0x45e1
e7a6f3
   up           0x782d 0x45e1
e7a6f3
   down         0x7809 0x0000
e7a6f3
e7a6f3
.PP
e7a6f3
This may be used as
e7a6f3
  mii-diag --monitor eth0 |
e7a6f3
    while read linkstatus bmsr linkpar; do
e7a6f3
     case $linkstatus in
e7a6f3
        up)   ifup eth0 ;;
e7a6f3
        down) ifdown eth0 ;;
e7a6f3
     esac
e7a6f3
    done
e7a6f3
e7a6f3
.PP
e7a6f3
It may be useful to shorten the DHCP client daemon timeout if it does
e7a6f3
not receive an address by adding the following setting to
e7a6f3
/etc/sysconfig/network:
e7a6f3
DHCPCDARGS="-t 3"
e7a6f3
e7a6f3
.SH SEE ALSO
e7a6f3
.BR ether-wake (8), net-diag (8), mii-tool (8).
e7a6f3
.br
e7a6f3
Addition documentation is available from http://scyld.com/diag/index.html.
e7a6f3
e7a6f3
.SH KNOWN BUGS
e7a6f3
The --all-interfaces option is quirky.  There are very few settings that
e7a6f3
are usefully applied to all interfaces.
e7a6f3
e7a6f3
.SH AUTHOR
e7a6f3
The manual pages, diagnostic commands, and many of the underlying Linux
e7a6f3
network drivers were written by Donald Becker for the Scyld
e7a6f3
Beowulf(\*(Tm) cluster system.
e7a6f3