jpopelka / rpms / net-tools

Forked from rpms/net-tools 4 years ago
Clone

Blame SOURCES/mii-diag.8

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