source: genesis/tools/batch-cmd@ 9947

Last change on this file since 9947 was 9947, checked in by rick, 13 years ago

Flexible tool to allow execution single command and store output from all nodes.

  • Property svn:executable set to *
File size: 419 bytes
Line 
1#!/bin/sh
2#
3# Mega simple wrapper for batch control on nodes.
4#
5# Rick van der Zwet <info@rickvanderzwet.nl>
6#
7
8HOSTS=${*:-`cd $(dirname $0)/../nodes; echo CNode* proxy*`}
9PREFIX=${PREFIX:-'ip'}
10CMD=${CMD:-'ifconfig -a'}
11
12echo "# WARN: Going to run at $HOSTS"; sleep 2
13
14for HOST in $HOSTS; do
15 ssh -o ConnectTimeout=3 root@$HOST.wleiden.net. $CMD > $PREFIX-$HOST.txt &
16done
17
18# Wait for all processes to complete.
19wait
Note: See TracBrowser for help on using the repository browser.