more merges for GPLv3 update
[samba.git] / ctdb / doc / onnode.1.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="onnode.1">
4
5 <refmeta>
6         <refentrytitle>onnode</refentrytitle>
7         <manvolnum>1</manvolnum>
8 </refmeta>
9
10
11 <refnamediv>
12         <refname>onnode</refname>
13         <refpurpose>run commands on ctdb nodes</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17         <cmdsynopsis>
18                 <command>onnode NODE COMMAND ...</command>
19         </cmdsynopsis>
20 </refsynopsisdiv>
21
22   <refsect1><title>DESCRIPTION</title>
23     <para>
24       onnode is a utility to run commands on a specific node of a CTDB
25       cluster, or on all nodes.
26     </para>
27     <para>
28       The NODE option specifies which node to run a command on. You
29       can specify a numeric node number (from 0 to N-1) or the special
30       node 'all'.
31     </para>
32     <para>
33       The COMMAND can be any shell command. The onnode utility uses
34       ssh or rsh to connect to the remote nodes and run the command.
35       </para>
36     <para>
37       If the COMMAND starts with a /, then the command is run via the
38       'at' service. Otherwise the command is run in the foreground.
39     </para>
40   </refsect1>
41
42   <refsect1><title>EXAMPLES</title>
43     <para>
44       The following command would show the process ID of ctdb on all nodes
45       </para>
46       <screen format="linespecific">
47 onnode all pidof ctdbd
48       </screen>
49
50     <para>
51       The following command would show the last 5 lines of log on each
52       node, preceded by the nodes hostname
53       </para>
54       <screen format="linespecific">
55 onnode all "hostname; tail -5 /var/log/log.ctdb"
56       </screen>
57
58     <para>
59       The following command would restart the ctdb service on all nodes.
60       </para>
61       <screen format="linespecific">
62 onnode all service ctdb restart
63       </screen>
64
65     </refsect1>
66
67   <refsect1><title>SEE ALSO</title>
68     <para>
69       ctdbd(1), ctdb(1), <ulink url="http://ctdb.samba.org/"/>
70     </para>
71   </refsect1>
72   <refsect1><title>COPYRIGHT/LICENSE</title>
73 <literallayout>
74 Copyright (C) Andrew Tridgell 2007
75 Copyright (C) Ronnie sahlberg 2007
76
77 This program is free software; you can redistribute it and/or modify
78 it under the terms of the GNU General Public License as published by
79 the Free Software Foundation; either version 3 of the License, or (at
80 your option) any later version.
81
82 This program is distributed in the hope that it will be useful, but
83 WITHOUT ANY WARRANTY; without even the implied warranty of
84 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
85 General Public License for more details.
86
87 You should have received a copy of the GNU General Public License
88 along with this program; if not, see http://www.gnu.org/licenses/.
89 </literallayout>
90   </refsect1>
91 </refentry>