Running commands across zones


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 :)

This article was posted by Matty on 2005-09-06 18:11:00 -0400 -0400