日志集合和管理工具还没有弄好,用shell做了简单的工具查看多台机器上的同样日志:
#!/bin/bashHOSTS="host1 host2 host3 host4"SCRIPT="tail -$2 /logpath/$1"for HOSTNAME in ${HOSTS} ; do echo "" echo "${HOSTNAME}" echo "======================================================" sshpass -p "password" ssh -l username ${HOSTNAME} "${SCRIPT}"done