34d370f8b1196f88d5c89ea305abeb7c24dcb36c
[vlendec/samba-autobuild/.git] / ctdb / doc / onnode.1
1 .\"     Title: onnode
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
4 .\"      Date: 06/12/2007
5 .\"    Manual: 
6 .\"    Source: 
7 .\"
8 .TH "ONNODE" "1" "06/12/2007" "" ""
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 onnode \- run commands on ctdb nodes
15 .SH "SYNOPSIS"
16 .HP 24
17 \fBonnode NODE COMMAND ...\fR
18 .SH "DESCRIPTION"
19 .PP
20 onnode is a utility to run commands on a specific node of a CTDB cluster, or on all nodes.
21 .PP
22 The NODE 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'.
23 .PP
24 The COMMAND can be any shell command. The onnode utility uses ssh or rsh to connect to the remote nodes and run the command.
25 .PP
26 If the COMMAND starts with a /, then the command is run via the 'at' service. Otherwise the command is run in the foreground.
27 .SH "EXAMPLES"
28 .PP
29 The following command would show the process ID of ctdb on all nodes
30 .sp
31 .RS 4
32 .nf
33 onnode all pidof ctdbd
34       
35 .fi
36 .RE
37 .PP
38 The following command would show the last 5 lines of log on each node, preceded by the nodes hostname
39 .sp
40 .RS 4
41 .nf
42 onnode all "hostname; tail \-5 /var/log/log.ctdb"
43       
44 .fi
45 .RE
46 .PP
47 The following command would restart the ctdb service on all nodes.
48 .sp
49 .RS 4
50 .nf
51 onnode all service ctdb restart
52       
53 .fi
54 .RE
55 .SH "SEE ALSO"
56 .PP
57 ctdbd(1), ctdb(1),
58 \fI\%http://ctdb.samba.org/\fR
59 .SH "COPYRIGHT/LICENSE"
60 .sp
61 .RS 4
62 .nf
63 Copyright (C) Andrew Tridgell 2007
64 Copyright (C) Ronnie sahlberg 2007
65
66 This program is free software; you can redistribute it and/or modify
67 it under the terms of the GNU General Public License as published by
68 the Free Software Foundation; either version 2 of the License, or (at
69 your option) any later version.
70
71 This program is distributed in the hope that it will be useful, but
72 WITHOUT ANY WARRANTY; without even the implied warranty of
73 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
74 General Public License for more details.
75
76 You should have received a copy of the GNU General Public License
77 along with this program; if not, write to the Free Software
78 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
79 .fi
80 .RE