linux如何写一个脚本完成对a,b,c...多个机器作日常检查
tabno 2007-08-22 05:41:13 假设有a,b,c...等多个机器,root密码为xxx
已知这些机器都启动了ssh服务,且ssh服务端口号更改为了7050
日常检查包括执行如下命令
echo "press Enter to check error and fail"
echo "------------------------------------"
read
cat /var/log/messages | grep error | more
grep fail /var/log/messages | more
echo "press Enter to check File system"
echo "------------------------------------"
read
df -m
echo "press Enter to check Performance"
echo "------------------------------------"
read
top
echo "press Enter to check cpu and memmory"
echo "------------------------------------"
read
vmstat 1 20
谢谢。