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">
6 <refentrytitle>onnode</refentrytitle>
7 <manvolnum>1</manvolnum>
12 <refname>onnode</refname>
13 <refpurpose>run commands on ctdb nodes</refpurpose>
18 <command>onnode NODE COMMAND ...</command>
22 <refsect1><title>DESCRIPTION</title>
24 onnode is a utility to run commands on a specific node of a CTDB
25 cluster, or on all nodes.
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
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.
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.
42 <refsect1><title>EXAMPLES</title>
44 The following command would show the process ID of ctdb on all nodes
46 <screen format="linespecific">
47 onnode all pidof ctdbd
51 The following command would show the last 5 lines of log on each
52 node, preceded by the nodes hostname
54 <screen format="linespecific">
55 onnode all "hostname; tail -5 /var/log/log.ctdb"
59 The following command would restart the ctdb service on all nodes.
61 <screen format="linespecific">
62 onnode all service ctdb restart
67 <refsect1><title>SEE ALSO</title>
69 ctdbd(1), ctdb(1), <ulink url="http://ctdb.samba.org/"/>
72 <refsect1><title>COPYRIGHT/LICENSE</title>
74 Copyright (C) Andrew Tridgell 2007
75 Copyright (C) Ronnie sahlberg 2007
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.
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.
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/.