While reading through Brendan Gregg’s Solaris zones tutorial, I ran across his zonerun script. This nifty little script allows you to run a command across several Solaris zones (the script uses zlogin to accomplish the task):
$ zonerun "uname -a; echo"
SunOS irc 5.10 Generic_118822-11 sun4u sparc SUNW,Ultra-5_10
SunOS sunonews 5.10 Generic_118822-11 sun4u sparc SUNW,Ultra-5_10
$ zonerun "uptime ; echo"
12:08pm up 1 day(s), 10:55, 1 user, load average: 0.59, 0.41, 0.18
12:08pm up 2 min(s), 0 users, load average: 0.59, 0.41, 0.18
This nifty script kinda reminds me of Sun cluster’s ctelnet utility :)