ONNODE(1)
π ONNODE(1) β CTDB Β· clustered TDB database π
okay bestie, welcome to onnode, the little utility in the CTDB (clustered TDB database) family. this page is about running commands on cluster nodes. buckle up, it's giving sysadmin main character energy π¦
β¨ NAME β¨
onnode β run commands on CTDB cluster nodes π
π SYNOPSIS π
onnode [OPTION...] {NODES} {COMMAND}
πΈ DESCRIPTION πΈ
so like. onnode is a utility to run commands on a specific node of a CTDB cluster, or on all nodes. no cap. π
NODES tells it which node(s) to run a command on. the details live in the NODES SPECIFICATION section down below, don't skip it π
COMMAND can be any shell command, periodt. the onnode utility uses ssh or rsh to connect to the remote nodes and run the command. it's literally just that. π₯
β¨ OPTIONS β¨
-cβ ExecuteCOMMANDin the current working directory on the specified nodes.-f FILENAMEβ Specify an alternative nodesFILENAMEto use instead of the default. see the discussion of/etc/ctdb/nodesin the FILES section for more details. π«Ά-iβ Keep standard input open, allowing data to be piped toonnode. normallyonnodecloses stdin to avoid surprises when scripting. π note: this option is ignored when using-por ifONNODE_SSHis set to anything other than"ssh".-nβ Allow nodes to be specified by name rather than node numbers. these nodes don't need to be listed in the nodes file. you can avoid the nodes file entirely by combining this with-f /dev/null. iconic. π«-pβ RunCOMMANDin parallel on the specified nodes. the default is to runCOMMANDsequentially on each node.-Pβ Push files to nodes. names of files to push are specified rather than the usual command. β οΈ quoting is fragile/broken β filenames with whitespace in them are not supported.-qβ Do not print node addresses. normally,onnodeprints informational node addresses if more than one node is specified. this overrides-v.-vβ Print node addresses even if only one node is specified. normally,onnodeprints informational node addresses when more than one node is specified.-h,--helpβ Show a short usage guide. π
π¦ NODES SPECIFICATION π¦
Nodes can be specified via numeric node numbers (from 0 to N-1) or mnemonics. multiple nodes are specified using 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. no like fr fr, it matters.
the following mnemonics are available:
allβ All nodes. πanyβ A node wherectdbdis running. this semi-random but there is a bias towards choosing a low numbered node. π²ok|healthyβ All nodes that are not disconnected, banned, disabled or unhealthy.con|connectedβ All nodes that are not disconnected.
π EXAMPLES π
the following command would show the process ID of ctdbd on all nodes:
onnode all ctdb getpid
the following command would show the last 5 lines of log on each node, preceded by the node's hostname:
onnode all "hostname; tail -5 /var/log/ctdb/log.ctdb"
the following command would restart the ctdb service on all nodes, in parallel:
onnode -p all service ctdb restart
the following command would run ./foo in the current working directory, in parallel, on nodes 0, 2, 3 and 4:
onnode -c -p 0,2-4 ./foo
π FILES π
/etc/ctdb/nodesβ Default file containing a list of each node's IP address or hostname.- as above, a file specified via the
-fis given precedence. if a relative path is specified and no corresponding file exists relative to the current directory then the file is also searched for in the CTDB configuration directory. - otherwise the default is
/etc/ctdb/nodes.
- as above, a file specified via the
/etc/ctdb/onnode.confβ If this file exists it is sourced byonnode. the main purpose is to allow the administrator to setONNODE_SSHto something other than"ssh". in this case the-toption is ignored. π
π SEE ALSO π
ctdb(7), http://ctdb.samba.org/
π AUTHOR π
this documentation was written by Andrew Tridgell, Martin Schwenke. absolute legends, honestly. π«Ά
β COPYRIGHT β
Copyright Β© 2007 Andrew Tridgell, Ronnie Sahlberg Copyright Β© 2008 Martin Schwenke
this program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU General Public License for more details.
you should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.
and that's the whole page, bestie π§ this was written for the ctdb collection, dated 09/13/2026 β onnode(1), and yes that's the same date as the manual header, we're consistent like that. slay πβ¨
π¦ where this page comes from
- ubuntu stonking: ctdb 2:4.24.7+dfsg-1ubuntu1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms