Blame SOURCES/mii-diag.8

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