The allssh command in a Nutanix CVM

The allssh command in a Nutanix CVM is an alias to __allssh which is a bash function defined in /usr/local/nutanix/profile.d/bashrc.

$ which allssh
alias allssh='__allssh'
$ type __allssh
__allssh is a function
__allssh () 
{ 
    CMDS=$@;
    OPTS="-t -o LogLevel=ERROR -o StrictHostKeyChecking=no";
    echo "Executing $CMDS on the cluster";
    for i in `svmips`;
    do
        echo "================== "$i" =================";
        /usr/bin/ssh $OPTS $i "source /etc/profile;$@";
    done
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s