Blame SOURCES/mii-diag.8

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