#!/bin/sh # # Count how many clustor jobs are currently running on the client nodes # in a simplistic manner. Based upon a program originally written by # David Duke on June 14, 1999 and modified by GLen Pringle. nodes="01 02 03 04 05 06 07 08 09 10 11 12 13 14 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66" for i in $nodes do echo -n "clustor$i " rsh clustor$i ps auxw | grep 'atcjobs' | awk ' BEGIN { count=0; users=""; } { users=sprintf("%s%s ",users, $1); count++; } END { printf "%2d ( %s)\n", count,users; }' done