Last active
August 29, 2015 14:20
-
-
Save itbdw/fe7a72569f09d02b112e to your computer and use it in GitHub Desktop.
批量查看机器负载
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# check cpu load | |
USR="zby" | |
hosts='' | |
hosts="${hosts} -dev001" | |
hosts="${hosts} `seq -f %003g 1 91`" | |
for ip in ${hosts} | |
do | |
machine="yourmachinename${ip}" | |
echo -n "${machine}" | |
ssh -o CheckHostIP=false -o StrictHostKeyChecking=no ${USR}@${machine} uptime | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment