Blame SOURCES/mii-diag.8

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