]>
Commit | Line | Data |
---|---|---|
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 | |
20 | mii-diag \- Network adapter control and monitoring | |
21 | .SH SYNOPSIS | |
22 | .B mii-diag | |
23 | .RI [ options ] <interface> | |
24 | .SH DESCRIPTION | |
25 | This manual page documents briefly the | |
26 | .B mii-diag | |
27 | network adapter control and monitoring command. | |
28 | Addition 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 | |
34 | This \fBmii-diag\fP command configures, controls and monitors the | |
35 | transceiver management registers for network interfaces, and configures | |
36 | driver operational parameters. For transceiver control \fBmii-diag\fP | |
37 | uses the Media Independent Interface (MII) standard (thus the command name). | |
38 | It also has additional Linux-specific controls to communicate parameters | |
39 | such as message enable settings and buffer sizes to the underlying device | |
40 | driver. | |
41 | .PP | |
42 | The MII standard defines registers that control and report network | |
43 | transceiver capabilities, link settings and errors. Examples are link | |
44 | speed, duplex, capabilities advertised to the link partner, status LED | |
45 | indications and link error counters. | |
46 | ||
47 | .SH OPTIONS | |
48 | The \fBmii-diag\fP command supports both single character and long | |
49 | option names. Short options use a single dash (´-´) in front of the option | |
50 | character. For options without parameters, multiple options may be | |
51 | concatenated after a single dash. Long options are prefixed by two | |
52 | dashes (´--´), and may be abbreviated with a unique prefix. | |
53 | A long option may take a parameter of the form --arg=param or --arg param. | |
54 | ||
55 | .PP | |
56 | A 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 | ||
63 | Speed is one of: 100baseT4, 100baseTx, 100baseTx-FD, 100baseTx-HD, 10baseT, | |
64 | 10baseT-FD, 10baseT-HD. For more precise control an explict numeric | |
65 | register setting is also allowed. | |
66 | ||
67 | ||
68 | .TP | |
69 | .B \-a, \--all-interfaces | |
70 | Show the status of all interfaces. This option is not recommended with | |
71 | any other option, especially ones that change settings. | |
72 | ||
73 | .TP | |
74 | .B \-s,\--status | |
75 | Return exit status 2 if there is no link beat. | |
76 | ||
77 | .TP | |
78 | .B \-D | |
79 | Increase the debugging level. This may be used to understand the | |
80 | actions the command is taking. | |
81 | ||
82 | .TP | |
83 | .B \-g, \--read-parameters | |
84 | Show driver-specific parameters. | |
85 | ||
86 | .TP | |
87 | .B \-G, \--set-parameters value[,value...] | |
88 | Set driver-specific parameters. | |
89 | Set a adapter-specific parameters. | |
90 | Parameters are comma separated, with missing elements retaining the | |
91 | existing value. | |
92 | ||
93 | .TP | |
94 | .B \-v | |
95 | Increase the verbosity level. Additional "-v" options increase the | |
96 | level further. | |
97 | ||
98 | .TP | |
99 | .B \-V | |
100 | Show the program version information. | |
101 | ||
102 | .TP | |
103 | .B \-w, \--watch | |
104 | Continuously monitor the transceiver and report changes. | |
105 | ||
106 | .TP | |
107 | .B \-? | |
108 | Emit usage information. | |
109 | ||
110 | .SH DESCRIPTION | |
111 | ||
112 | .PP | |
113 | Calling the command with just the interface name (which defaults to | |
114 | 'eth0' if missing) produces extensive output describing the transceiver | |
115 | capabilities, configuration and current status. | |
116 | ||
117 | .PP | |
118 | The '--monitor' option allows scripting link beat changes. | |
119 | .PP | |
120 | This option is similar to --watch, but with lower overhead and simplifed | |
121 | output. It polls the interface only once a second and the output format | |
122 | is a single line per link change with three fixed words | |
123 | <unknown|down||negotiating|up> <STATUS> <PARTNER-CAP> | |
124 | .PP | |
125 | Example output: mii-diag --monitor eth0 | |
126 | down 0x7809 0x0000 | |
127 | negotiating 0x7829 0x45e1 | |
128 | up 0x782d 0x45e1 | |
129 | down 0x7809 0x0000 | |
130 | ||
131 | .PP | |
132 | This 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 | |
142 | It may be useful to shorten the DHCP client daemon timeout if it does | |
143 | not receive an address by adding the following setting to | |
144 | /etc/sysconfig/network: | |
145 | DHCPCDARGS="-t 3" | |
146 | ||
147 | .SH SEE ALSO | |
148 | .BR ether-wake (8), net-diag (8), mii-tool (8). | |
149 | .br | |
150 | Addition documentation is available from http://scyld.com/diag/index.html. | |
151 | ||
152 | .SH KNOWN BUGS | |
153 | The --all-interfaces option is quirky. There are very few settings that | |
154 | are usefully applied to all interfaces. | |
155 | ||
156 | .SH AUTHOR | |
157 | The manual pages, diagnostic commands, and many of the underlying Linux | |
158 | network drivers were written by Donald Becker for the Scyld | |
159 | Beowulf(\*(Tm) cluster system. | |
160 |