Skip to content

Instantly share code, notes, and snippets.

@itbdw
Last active August 29, 2015 14:20
Show Gist options
  • Save itbdw/fe7a72569f09d02b112e to your computer and use it in GitHub Desktop.
Save itbdw/fe7a72569f09d02b112e to your computer and use it in GitHub Desktop.
批量查看机器负载
#!/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