Blame SOURCES/mii-diag.8

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