]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - net-tools/mii-diag.8
gnome-themes-standard: Update to 3.11.5.
[people/ms/ipfire-3.x.git] / net-tools / mii-diag.8
CommitLineData
236898d6
MT
1.\" Hey, EMACS: -*- nroff -*-
2.\" $Revision: 1.1 $ $Date: 2003/09/06 17:20:17 $
3.\" First parameter, NAME, should be all caps
4.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
5.\" other parameters are allowed: see man(7), man(1)
6.TH MII-DIAG 8 "September 9, 2003" "Scyld Beowulf\*(Tm"
7.\" Please adjust this date whenever revising the manpage.
8.\"
9.\" Some roff macros, for reference:
10.\" .nh disable hyphenation
11.\" .hy enable hyphenation
12.\" .ad l left justify
13.\" .ad b justify to both left and right margins
14.\" .nf disable filling
15.\" .fi enable filling
16.\" .br insert line break
17.\" .sp <n> insert n+1 empty lines
18.\" for manpage-specific macros, see man(7)
19.SH NAME
20mii-diag \- Network adapter control and monitoring
21.SH SYNOPSIS
22.B mii-diag
23.RI [ options ] <interface>
24.SH DESCRIPTION
25This manual page documents briefly the
26.B mii-diag
27network adapter control and monitoring command.
28Addition documentation is available from http://scyld.com/diag/index.html.
29
30.\" TeX users may be more comfortable with the \fB<whatever>\fP and
31.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
32.\" respectively.
33.PP
34This \fBmii-diag\fP command configures, controls and monitors the
35transceiver management registers for network interfaces, and configures
36driver operational parameters. For transceiver control \fBmii-diag\fP
37uses the Media Independent Interface (MII) standard (thus the command name).
38It also has additional Linux-specific controls to communicate parameters
39such as message enable settings and buffer sizes to the underlying device
40driver.
41.PP
42The MII standard defines registers that control and report network
43transceiver capabilities, link settings and errors. Examples are link
44speed, duplex, capabilities advertised to the link partner, status LED
45indications and link error counters.
46
47.SH OPTIONS
48The \fBmii-diag\fP command supports both single character and long
49option names. Short options use a single dash (´-´) in front of the option
50character. For options without parameters, multiple options may be
51concatenated after a single dash. Long options are prefixed by two
52dashes (´--´), and may be abbreviated with a unique prefix.
53A long option may take a parameter of the form --arg=param or --arg param.
54
55.PP
56A summary of options is as follows.
57
58.TP
59.B \-A, --advertise <speed|setting>
60.BR
61.B \-F, --fixed-speed <speed|setting>
62
63Speed is one of: 100baseT4, 100baseTx, 100baseTx-FD, 100baseTx-HD, 10baseT,
6410baseT-FD, 10baseT-HD. For more precise control an explict numeric
65register setting is also allowed.
66
67
68.TP
69.B \-a, \--all-interfaces
70Show the status of all interfaces. This option is not recommended with
71any other option, especially ones that change settings.
72
73.TP
74.B \-s,\--status
75Return exit status 2 if there is no link beat.
76
77.TP
78.B \-D
79Increase the debugging level. This may be used to understand the
80actions the command is taking.
81
82.TP
83.B \-g, \--read-parameters
84Show driver-specific parameters.
85
86.TP
87.B \-G, \--set-parameters value[,value...]
88Set driver-specific parameters.
89Set a adapter-specific parameters.
90Parameters are comma separated, with missing elements retaining the
91existing value.
92
93.TP
94.B \-v
95Increase the verbosity level. Additional "-v" options increase the
96level further.
97
98.TP
99.B \-V
100Show the program version information.
101
102.TP
103.B \-w, \--watch
104Continuously monitor the transceiver and report changes.
105
106.TP
107.B \-?
108Emit usage information.
109
110.SH DESCRIPTION
111
112.PP
113Calling the command with just the interface name (which defaults to
114'eth0' if missing) produces extensive output describing the transceiver
115capabilities, configuration and current status.
116
117.PP
118The '--monitor' option allows scripting link beat changes.
119.PP
120This option is similar to --watch, but with lower overhead and simplifed
121output. It polls the interface only once a second and the output format
122is a single line per link change with three fixed words
123 <unknown|down||negotiating|up> <STATUS> <PARTNER-CAP>
124.PP
125Example output: mii-diag --monitor eth0
126 down 0x7809 0x0000
127 negotiating 0x7829 0x45e1
128 up 0x782d 0x45e1
129 down 0x7809 0x0000
130
131.PP
132This may be used as
133 mii-diag --monitor eth0 |
134 while read linkstatus bmsr linkpar; do
135 case $linkstatus in
136 up) ifup eth0 ;;
137 down) ifdown eth0 ;;
138 esac
139 done
140
141.PP
142It may be useful to shorten the DHCP client daemon timeout if it does
143not receive an address by adding the following setting to
144/etc/sysconfig/network:
145DHCPCDARGS="-t 3"
146
147.SH SEE ALSO
148.BR ether-wake (8), net-diag (8), mii-tool (8).
149.br
150Addition documentation is available from http://scyld.com/diag/index.html.
151
152.SH KNOWN BUGS
153The --all-interfaces option is quirky. There are very few settings that
154are usefully applied to all interfaces.
155
156.SH AUTHOR
157The manual pages, diagnostic commands, and many of the underlying Linux
158network drivers were written by Donald Becker for the Scyld
159Beowulf(\*(Tm) cluster system.
160