Blame SOURCES/mii-diag.8

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