2 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
3 .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
5 .\" Manual: [FIXME: manual]
6 .\" Source: [FIXME: source]
9 .TH "ONNODE" "1" "07/10/2008" "[FIXME: source]" "[FIXME: manual]"
10 .\" -----------------------------------------------------------------
11 .\" * (re)Define some macros
12 .\" -----------------------------------------------------------------
13 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 .\" toupper - uppercase a string (locale-aware)
15 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
19 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
21 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 .\" SH-xref - format a cross-reference to an SH section
23 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 .\" SH - level-one heading that works better for non-TTY output
34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 .\" put an extra blank line of space above the head in non-TTY output
43 .nr an-prevailing-indent \\n[IN]
47 .HTML-TAG ".NH \\n[an-level]"
49 .nr an-no-space-flag 1
51 \." make the size of the head bigger
56 .\" if n (TTY output), use uppercase
61 .\" if not n (not TTY), use normal case (not uppercase)
65 .\" if not n (not TTY), put a border/line under subheading
70 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 .\" SS - level-two heading that works better for non-TTY output
72 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77 .nr an-prevailing-indent \\n[IN]
82 .nr an-no-space-flag 1
85 \." make the size of the head bigger
91 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92 .\" BB/BE - put background/screen (filled box) around block of text
93 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106 .if "\\$2"adjust-for-leading-newline" \{\
114 .nr BW \\n(.lu-\\n(.i
117 .ie "\\$2"adjust-for-leading-newline" \{\
118 \M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
121 \M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
132 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133 .\" BM/EM - put colored marker in margin next to block of text
134 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
151 \M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
159 .\" -----------------------------------------------------------------
160 .\" * set default formatting
161 .\" -----------------------------------------------------------------
162 .\" disable hyphenation
164 .\" disable justification (adjust text to left margin only)
166 .\" -----------------------------------------------------------------
167 .\" * MAIN CONTENT STARTS HERE *
168 .\" -----------------------------------------------------------------
170 onnode \- run commands on ctdb nodes
173 .HP \w'\fBonnode\ [OPTION]\ \&.\&.\&.\ NODES\ COMMAND\ \&.\&.\&.\fR\ 'u
174 \fBonnode [OPTION] \&.\&.\&. NODES COMMAND \&.\&.\&.\fR
178 onnode is a utility to run commands on a specific node of a CTDB cluster, or on all nodes\&.
180 The NODES option specifies which node to run a command on\&. You can specify a numeric node number (from 0 to N\-1) or the special node \'all\'\&. You can also specify lists of nodes, separated by commas, and ranges of numeric node numbers, separated by dashes\&. If nodes are specified multiple times then the command will be executed multiple times on those nodes\&. The order of nodes is significant\&.
182 The COMMAND can be any shell command\&. The onnode utility uses ssh or rsh to connect to the remote nodes and run the command\&.
187 Execute COMMAND in the current working directory on each node\&.
192 Run commands in parallel on the specified nodes\&. In this mode
197 Do not print node addresses\&. Normally, onnode prints informational node addresses if more than one node is specified\&. This overrides \-v\&.
202 Print a node addresses even if only one node is specified\&. Normally, onnode prints informational node addresses when more than one node is specified\&.
207 Show a short usage guide\&.
211 The following command would show the process ID of ctdb on all nodes
222 .BB lightgray adjust-for-leading-newline
225 onnode all pidof ctdbd
227 .EB lightgray adjust-for-leading-newline
238 The following command would show the last 5 lines of log on each node, preceded by the node\'s hostname
249 .BB lightgray adjust-for-leading-newline
252 onnode all "hostname; tail \-5 /var/log/log\&.ctdb"
254 .EB lightgray adjust-for-leading-newline
265 The following command would restart the ctdb service on all nodes\&.
276 .BB lightgray adjust-for-leading-newline
279 onnode all service ctdb restart
281 .EB lightgray adjust-for-leading-newline
292 The following command would run \&./foo in the current working directory, in parallel, on nodes 0, 2, 3 and 4\&.
303 .BB lightgray adjust-for-leading-newline
306 onnode \-c \-p 0,2\-4 \&./foo
308 .EB lightgray adjust-for-leading-newline
322 Contains a list of each node\'s IP address or hostname\&.
325 /etc/ctdb/onnode\&.conf
327 If this file exists it is sourced by onnode\&. The main purpose is to allow the administrator to set $SSH to something other than "ssh"\&. In this case the \-t option is ignored\&. For example, the administrator may choose to use use rsh instead of ssh\&.
332 \m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
333 .SH "COPYRIGHT/LICENSE"
344 .BB lightgray adjust-for-leading-newline
347 Copyright (C) Andrew Tridgell 2007
348 Copyright (C) Ronnie sahlberg 2007
349 Copyright (C) Martin Schwenke 2008
351 This program is free software; you can redistribute it and/or modify
352 it under the terms of the GNU General Public License as published by
353 the Free Software Foundation; either version 3 of the License, or (at
354 your option) any later version\&.
356 This program is distributed in the hope that it will be useful, but
357 WITHOUT ANY WARRANTY; without even the implied warranty of
358 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU
359 General Public License for more details\&.
361 You should have received a copy of the GNU General Public License
362 along with this program; if not, see http://www\&.gnu\&.org/licenses/\&.
363 .EB lightgray adjust-for-leading-newline