Whamcloud - gitweb
- merge with 1_5,some fixes.
[fs/lustre-release.git] / lustre / doc / lctl.8
1 .TH lctl 1 "2003 Oct 8" Lustre "configuration utilities"
2 .SH NAME
3 lctl \- Low level Lustre filesystem configuration utility
4 .SH SYNOPSIS
5 .br
6 .B lctl
7 .br
8 .B lctl --device <devno> <command [args]>
9 .br
10 .B lctl --threads <numthreads> <verbose> <devno> <command [args]>
11 .br
12 .SH DESCRIPTION
13 .B lctl
14 can be invoked in interactive mode by issuing lctl command. After that, commands are issued as below. The most common commands in lctl are (in matching pairs) 
15 .B device 
16 and 
17 .B attach
18
19 .B detach 
20 and 
21 .B setup
22 ,
23 .B cleanup 
24 and
25 .B connect
26 ,
27 .B disconnect 
28 and
29 .B help
30 , and
31 .B quit.
32
33 To get a complete listing of available commands, type help at the lctl prompt.  To get basic help on the meaning and syntax of a command, type help command.  Command completion is activated with the TAB key, and command history is available via the up- and down-arrow keys. 
34
35 For non-interactive single-threaded use, one uses the second invocation, which runs command after connecting to the device. 
36
37 .SS Network Configuration
38 .TP
39 .BI network " <up/down>|<tcp/elan/myrinet>"
40 Start or stop LNET, or select a network type for other
41 .I
42 lctl
43 commands
44 .TP
45 .BI list_nids
46 Print all Network Identifiers on the local node
47 .TP
48 .BI which_nid " <nidlist>"
49 From a list of nids for a remote node, show which interface communication
50 will take place on.
51 .TP
52 .BI interface_list 
53 Print the interface entries.
54 .TP
55 .BI add_interface " <ip> [netmask]" 
56 Add an interface entry.
57 .TP
58 .BI del_interface " [ip]" 
59 Delete an interface entry.
60 .TP
61 .BI peer_list 
62 Print the peer entries.
63 .TP
64 .BI add_peer " <nid> <host> <port>"
65 Add a peer entry.
66 .TP
67 .BI del_peer " [<nid>] [<host>] [ks] "
68 Remove a peer entry.
69 .TP
70 .BI conn_list 
71 Print all the connected remote nids on a network.
72 .TP
73 .BI active_tx 
74 This command should print active transmits, and it is only used for elan network type.
75 .TP 
76 .BI add_route " <gateway> <target> [target] "
77 Add an entry to the routing table for the given target.
78 .TP 
79 .BI del_route " <target>" 
80 Delete an entry for the target from the routing table.
81 .TP
82 .BI set_route " <gateway> <up/down> [<time>] "
83 Enable/disable routes via the given gateway in the protals routing table. <time> is used to tell when a gateway comes back online.
84 .TP 
85 .BI route_list 
86 Print the complete routing table.
87 .TP
88 .BI fail " <nid>|_all_ [count]" 
89 Fail/restore communications. Omitting the count implies fail indefinitely, count of zero indicates that communication should be restored. A non-zero count indicates the number of LNET messages to be dropped after which the communication is restored. The argument "nid" is used to specify the gateway, which is one peer of the communication.
90 .PP
91 .SS Device Selection
92 .TP 
93 .BI device 
94 This will select the specified OBD device.  All other commands depend on the device being set. 
95 .TP
96 .BI cfg_device " <$name>" 
97 Set current device being configured to <$name>.
98 .TP 
99 .BI device_list 
100 Show all the devices.
101 .TP 
102 .BI lustre_build_version 
103 Print the Lustre build version.
104 .PP
105 .SS Device Configuration
106 .TP 
107 .BI conf_param " <device> <parameter>"
108 Set a configuration parameter 
109 .TP 
110 .BI cleanup " [force/failover]"
111 Cleanup a previously setup device.
112 .TP 
113 .BI detach 
114 Remove driver (and name and UUID) from the current device.
115 .PP
116 .SS Device Operations
117 .TP 
118 .BI getattr " <objid>" 
119 Get attributes for an OST object <objid> .
120 .TP 
121 .BI setattr " <objid> <mode>" 
122 Set mode attribute for OST object <objid>.
123 .TP 
124 .BI create " [num [mode [verbose]]]" 
125 Create the specified number <num> of OST objects with the given <mode>.
126 .TP 
127 .BI destroy " <num>" 
128 Starting at <objid>, destroy <num> number of objects starting from the object with object id <objid>.
129 .TP 
130 .BI test_getattr " <num> [verbose [[t]objid]]" 
131 Do <num> getattrs on OST object <objid> (objectid+1 on each thread).
132 .TP 
133 .BI test_brw " [t]<num> [write [verbose [npages [[t]objid]]]]" 
134 Do <num> bulk read/writes on OST object <objid> (<npages> per I/O).
135 .TP 
136 .BI test_ldlm 
137 Perform lock manager test.
138 .TP 
139 .BI ldlm_regress_start " %s [numthreads [refheld [numres [numext]]]]" 
140 Start lock manager stress test.
141 .TP 
142 .BI ldlm_regress_stop 
143 Stop lock manager stress test.
144 .TP 
145 .BI dump_ldlm 
146 Dump all lock manager state, this is very useful for debugging
147 .TP 
148 .BI activate 
149 Activate an import
150 .TP 
151 .BI deactivate 
152 De-activate an import
153 .TP 
154 .BI recover " <connection UUID>" 
155 .TP 
156 .BI lookup " <directory> <file>"
157 .TP 
158 .BI notransno 
159 Disable sending of committed transnumber updates
160 .TP 
161 .BI readonly 
162 Disable writes to the underlying device
163 .TP 
164 .BI abort_recovery 
165 Abort recovery on MDS device
166 .TP 
167 .BI get_stripe 
168 Show stripe info for an echo client object.
169 .TP 
170 .BI set_stripe " <objid>[ width!count[@offset] [:id:id....] "
171 Set stripe info for an echo client
172 .TP 
173 .BI unset_stripe " <objid>" 
174 Unset stripe info for an echo client object.
175 .TP
176 .BI set_lustre_upcall " </full/path/to/upcall> "
177 Set the lustre upcall(obd_lustre_upcall) via the lustre.upcall sysctl.
178 .TP
179 .BI llog_catlist 
180 List all catalog logs on current device.
181 .TP
182 .BI llog_info " <$logname|#oid#ogr#ogen> "
183 Print log header information. 
184 .TP
185 .BI llog_print " <$logname|#oid#ogr#ogen> [from] [to] "
186 Print log content information. It will print all records from index 1 by default.
187 .TP
188 .BI llog_check " <$logname|#oid#ogr#ogen> [from] [to] "
189 Check log content information. It will check all records from index 1 by default.
190 .TP
191 .BI llog_cancel " <catalog id|catalog name> <log id> <index> "
192 Cancel one record in log.
193 .TP
194 .BI llog_remove " <catalog id|catalog name> <log id> "
195 Remove one log from catalog, erase it from disk.
196 .PP
197 .SS Debug
198 .TP 
199 .BI debug_daemon 
200 Debug daemon control and dump to a file
201 .TP 
202 .BI debug_kernel " [file] [raw]" 
203 Get debug buffer and dump to a fileusage.
204 .TP 
205 .BI debug_file " <input> [output]"
206 Convert kernel-dumped debug log from binary to plain text format.
207 .TP 
208 .BI clear 
209 Clear kernel debug buffer.
210 .TP 
211 .BI mark " <text>" 
212 Insert marker text in kernel debug buffer.
213 .TP 
214 .BI filter " <subsystem id/debug mask>" 
215 Filter message type from the kernel debug buffer.
216 .TP 
217 .BI show " <subsystem id/debug mask>" 
218 Show specific type of messages.
219 .TP 
220 .BI debug_list " <subs/types>" 
221 List all the subsystem and debug types.
222 .TP
223 .BI modules " <path>" 
224 Provide gdb-friendly module information.
225 .TP 
226 .BI panic 
227 Force the kernel to panic.
228 .TP
229 .BI lwt " start/stop [file]" 
230 Light-weight tracing.
231 .TP
232 .BI memhog " <page count> [<gfp flags>]" 
233 Memory pressure testing.
234 .PP
235 .SS Control
236 .TP 
237 .BI help 
238 Show a complete list of commands; help <command name> can be used to get help on specific command.
239 .TP 
240 .BI exit 
241 Close the lctl session.
242 .TP 
243 .BI quit 
244 Close the lctl session.
245
246 .SH OPTIONS
247 The following options can be used to invoke lctl. 
248 .TP
249 .B --device 
250 The device number to be used for the operation. The value of devno is an integer, normally found by calling lctl name2dev on a device name. 
251 .TP
252 .B --threads 
253 How many threads should be forked doing the command specified. The numthreads variable is a strictly positive integer indicating how many threads should be started. The devno option is used as above.
254 .TP
255 .B --ignore_errors | ignore_errors 
256 Ignore errors during script processing
257 .TP
258 .B dump 
259 Save ioctls to a file 
260 .SH EXAMPLES
261 # lctl
262 .br
263 lctl > dl
264   0 UP mgc MGC192.168.0.20@tcp bfbb24e3-7deb-2ffa-eab0-44dffe00f692 5
265   1 UP ost OSS OSS_uuid 3
266   2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
267 .br
268 lctl > dk /tmp/log
269 Debug log: 87 lines, 87 kept, 0 dropped.
270 .br
271 lctl > quit
272 .PP
273 # lctl conf_param testfs-MDT0000 sys.timeout=40
274
275 .SH BUGS
276 Please report all bugs to ClusterFileSystems, support@clusterfs.com
277 .SH AVAILABILITY
278 .B lctl
279 is part of the 
280 .BR Lustre (7) 
281 filesystem package and is available from CFS
282 .br
283 http://clusterfs.com
284 .SH SEE ALSO
285 .BR Lustre (7),
286 .BR mkfs.lustre (8),
287 .BR mount.lustre (8),
288 .BR lctl (8),
289 .BR lfs (1)