日誌集合和管理工具尚未弄好,用shell作了簡單的工具查看多臺機器上的一樣日誌:shell
#!/bin/bash HOSTS="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