Whamcloud - gitweb
53ea4eec6d1837e87444e311b516eb4a2ad1d976
[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 .SH DESCRIPTION
11 .B lctl
12 is used to directly control Lustre via an ioctl interface, allowing
13 various configuration, maintenance, and debugging features to be accessed.
14  
15 .B lctl
16 can be invoked in interactive mode by issuing lctl command. After that, commands are issued as below. The most common commands in lctl are
17 .B dl
18 ,
19 .B dk
20 ,
21 .B device 
22 ,
23 .B network 
24 .I <up/down>
25 ,
26 .B list_nids
27 ,
28 .B ping
29 .I nid
30 ,
31 .B help
32 ,
33 .B quit.
34
35 To get a complete listing of available commands, type
36 .B help
37 at the lctl prompt.  To get basic help on the meaning and syntax of a
38 command, type 
39 .B help 
40 .I command
41 .  Command completion is activated with the TAB key, and command history is available via the up- and down-arrow keys. 
42
43 For non-interactive use, one uses the second invocation, which runs command after connecting to the device. 
44
45 .SS Network Configuration
46 .TP
47 .BI network " <up/down>|<tcp/elan/myrinet>"
48 Start or stop LNET, or select a network type for other
49 .I lctl
50 LNET commands
51 .TP
52 .BI list_nids
53 Print all Network Identifiers on the local node. LNET must be running.
54 .TP
55 .BI which_nid " <nidlist>"
56 From a list of nids for a remote node, show which interface communication
57 will take place on.
58 .TP
59 .BI ping " <nid> "
60 Check LNET connectivity via an LNET ping. This will use the fabric
61 appropriate to the specified NID.
62 .TP
63 .BI interface_list 
64 Print the network interface information for a given 
65 .B network
66 type.
67 .TP
68 .BI peer_list 
69 Print the known peers for a given 
70 .B network
71 type.
72 .TP
73 .BI conn_list 
74 Print all the connected remote NIDs for a given
75 .B network
76 type.
77 .TP
78 .BI active_tx 
79 This command should print active transmits, and it is only used for elan network type.
80 .TP 
81 .BI route_list 
82 Print the complete routing table.
83 .PP
84 .SS Device Selection
85 .TP 
86 .BI device " <devname> " 
87 This will select the specified OBD device.  All other commands depend on the device being set. 
88 .TP 
89 .BI device_list 
90 Show all the local Lustre OBDs. AKA 
91 .B dl
92 .PP
93 .SS Device Operations
94 .TP 
95 .BI list_param " [-F|-R] <param_path ...>"
96 List the Lustre or LNet parameter name
97 .br
98 .B -F
99 Add '/', '@' or '=' for dirs, symlinks and writeable files, respectively.
100 .br
101 .B -R
102 Recursively list all parameters under the specified path. If
103 .I param_path 
104 is unspecified, all the parameters will be shown.
105 .br
106 .B Examples:
107 .br
108 .B
109 # lctl list_param ost.*
110 .br
111   ost.OSS
112 .br
113   ost.num_refs
114 .br
115 .B
116 # lctl list_param -F ost.* debug
117 .br
118   ost.OSS/
119 .br
120   ost.num_refs
121 .br
122   debug=
123 .br
124 .B      
125 # lctl list_param -R mdt
126 .br
127   mdt
128 .br
129   mdt.lustre-MDT0000
130 .br
131   mdt.lustre-MDT0000.capa
132 .br
133   mdt.lustre-MDT0000.capa_count
134 .br
135   mdt.lustre-MDT0000.capa_key_timeout
136 .br
137   mdt.lustre-MDT0000.capa_timeout
138 .br
139   mdt.lustre-MDT0000.commit_on_sharing
140 .br
141   mdt.lustre-MDT0000.evict_client
142 .br
143   ...
144 .TP
145 .BI get_param " [-n|-N|-F] <param_path ...>"
146 Get the value of Lustre or LNET parameter from the specified path.
147 .br
148 .B -n
149 Print only the value and not parameter name.
150 .br
151 .B -N
152 Print only matched parameter names and not the values. (Especially useful when using patterns.)
153 .br
154 .B -F
155 When -N specified, add '/', '@' or '=' for directories, symlinks and writeable files, respectively.
156 .br
157 .B Examples:
158 .br
159 .B
160 # lctl get_param ost.*
161 .br
162   ost.OSS
163 .br
164   ost.num_refs
165 .br
166 .B
167 # lctl get_param -n debug timeout
168 .br
169   super warning dlmtrace error emerg ha rpctrace vfstrace config console
170 .br
171   20
172 .br
173 .B
174 # lctl get_param -N ost.* debug
175 .br
176   ost.OSS
177 .br
178   ost.num_refs
179 .br
180   debug
181 .br
182 lctl "get_param -NF" is equivalent to "list_param -F".
183 .TP
184 .BI set_param " [-n] <param_path=value ...>"
185 Set the value of Lustre or LNET parameter from the specified path.
186 .br
187 .B -n
188 Disable printing of the key name when printing values.
189 .br
190 .B Examples:
191 .br
192 .B
193 # lctl set_param fail_loc=0 timeout=20
194 .br
195   fail_loc=0
196 .br
197   timeout=20
198 .br
199 .B
200 # lctl set_param -n fail_loc=0 timeout=20
201 .br
202   0
203 .br
204   20
205 .TP
206 .BI conf_param " [-d] <device|fsname>.<parameter>=<value>"
207 Set a permanent configuration parameter for any device via the MGS.  This
208 command must be run on the MGS node.
209 .br
210 .B -d <device|fsname>.<parameter>
211 Delete a parameter setting (use the default value at the next restart).  A null value for <value> also deletes the parameter setting.
212 .br
213 .B Parameters:
214 .br
215 All of the writable parameters under 
216 .B lctl list_param
217 (e.g. 
218 .I lctl list_param -F osc.*.* | grep =
219 ) can be permanently set using
220 .B lctl conf_param
221 , but the format is slightly different.  For conf_param, the device is specified first, then the obdtype. (See examples below.)  Wildcards are not supported.
222 .br
223 Additionally, failover nodes may be added (or removed), and some system-wide parameters may be set as well (sys.at_max, sys.at_min, sys.at_extra, sys.at_early_margin, sys.at_history, sys.timeout, sys.ldlm_timeout.)  <device> is ignored for system wide parameters.
224 .br
225 .B Examples:
226 .br 
227 # lctl conf_param testfs.sys.at_max=1200
228 .br
229 # lctl conf_param testfs.llite.max_read_ahead_mb=16 
230 .br
231 # lctl conf_param testfs-MDT0000.lov.stripesize=2M
232 .br
233 # lctl conf_param lustre-OST0001.osc.active=0 
234 .br
235 # lctl conf_param testfs-OST0000.osc.max_dirty_mb=29.15 
236 .br
237 # lctl conf_param testfs-OST0000.ost.client_cache_seconds=15 
238 .br
239 # lctl conf_param testfs-OST0000.failover.node=1.2.3.4@tcp1
240 .TP 
241 .BI activate 
242 Reactivate an import after deactivating, below.  This setting is only effective until the next restart (see 
243 .B conf_param
244 ).
245 .TP 
246 .BI deactivate 
247 Deactivate an import, in particular meaning do not assign new file stripes
248 to an OSC.  This command should be used on the OSC in the MDT LOV
249 corresponding to a failed OST device, to prevent further attempts at
250 communication with the failed OST.
251 .TP 
252 .BI abort_recovery 
253 Abort the recovery process on a restarting MDT or OST device
254 .PP
255 .SS Virtual Block Device Operation
256 Lustre is able to emulate a virtual block device upon regular file. It is necessary to be used when you are trying to setup a swap space via file.
257 .TP
258 .BI blockdev_attach " <file name> <device node>"
259 Attach the lustre regular file to a block device. If the device node is not existent, lctl will create it \- it is recommended to create it by lctl since the emulator uses a dynamical major number.
260 .TP
261 .BI blockdev_detach " <device node>"
262 Detach the virtual block device.
263 .TP
264 .BI blockdev_info " <device node>"
265 Acquire which lustre file was attached to the device node.
266 .PP
267 .SS Changelogs
268 .TP
269 .BI changelog_register
270 Register a new changelog user for a particular device.  Changelog entries
271 will not be purged beyond any registered users' set point. (See lfs changelog_clear.)
272 .TP
273 .BI changelog_deregister " <id>"
274 Unregister an existing changelog user.  If the user's "clear" record number
275 is the minimum for the device, changelog records will be purged until the
276 next minimum.  
277 .PP
278 .SS Debug
279 .TP 
280 .BI debug_daemon 
281 Start and stop the debug daemon, and control the output filename and size.
282 .TP 
283 .BI debug_kernel " [file] [raw]" 
284 Dump the kernel debug buffer to stdout or file.
285 .TP 
286 .BI debug_file " <input> [output]"
287 Convert kernel-dumped debug log from binary to plain text format.
288 .TP 
289 .BI clear 
290 Clear the kernel debug buffer.
291 .TP 
292 .BI mark " <text>" 
293 Insert marker text in the kernel debug buffer.
294 .TP 
295 .BI filter " <subsystem id/debug mask>" 
296 Filter kernel debug messages by subsystem or mask.
297 .TP 
298 .BI show " <subsystem id/debug mask>" 
299 Show specific type of messages.
300 .TP 
301 .BI debug_list " <subs/types>" 
302 List all the subsystem and debug types.
303 .TP
304 .BI modules " <path>" 
305 Provide gdb-friendly module information.
306
307 .SH OPTIONS
308 The following options can be used to invoke lctl. 
309 .TP
310 .B --device 
311 The device to be used for the operation. This can be specified by name or
312 number. See 
313 .B device_list
314 .TP
315 .B --ignore_errors | ignore_errors 
316 Ignore errors during script processing
317
318 .SH EXAMPLES
319 # lctl
320 .br
321 lctl > dl
322   0 UP mgc MGC192.168.0.20@tcp bfbb24e3-7deb-2ffa-eab0-44dffe00f692 5
323   1 UP ost OSS OSS_uuid 3
324   2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
325 .br
326 lctl > dk /tmp/log
327 Debug log: 87 lines, 87 kept, 0 dropped.
328 .br
329 lctl > quit
330
331 .SH BUGS
332 Please report all bugs to Sun Microsystems, Inc. http://bugzilla.lustre.org/
333 .SH AVAILABILITY
334 .B lctl
335 is part of the 
336 .BR Lustre (7) 
337 filesystem package and is available from Sun Microsystems, Inc.
338 .br
339 http://www.sun.com/software/products/lustre/index.xml
340 .SH SEE ALSO
341 .BR Lustre (7),
342 .BR mkfs.lustre (8),
343 .BR mount.lustre (8),
344 .BR lctl (8),
345 .BR lfs (1)