DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Server Monitoring

06.07.2008
| 2776 views |
  • submit to reddit
        # servers.sh
export MAILSERVERS="server1 server2 server3"
export WEBSERVERS="www1 www2 www3 www4"

#!/bin/bash
### Assess disk space on mail servers
source ./servers.sh
for i in ${MAILSERVERS} ; do
       echo =========${i} =============
       ssh root@${i} "df"
       echo ============ =============
done

# min   hour    dom     month   dow     command

grep “###” *