$ cat check_ntp_server.sh
#!/bin/sh
###################################################################################
#
# SCRIPT: Checks Internal and external DNS query.
# Author: Sam
# Date: Wed Apr 17 07:29 EDT 2015
# Usage: Simply run ./check_ntp_server.sh script.
# Detail: There is a file ntp.servers which includes ntp servers.
# $ more ntp.servers
# ntpserv01
# ntpserv02
# ntpserv03
# ntpserv04
#
for i in `cat ntp.servers`
do
echo " "
echo "Checking $i"
ssh -q $i /usr/sbin/ntpq -p; echo " "; echo "Checking FS"; df -h
#ssh -q $i /usr/sbin/ntpq -p; echo " "; echo "Checking FS"; df -h; echo ""; echo "Top Output"; top
done
#!/bin/sh
###################################################################################
#
# SCRIPT: Checks Internal and external DNS query.
# Author: Sam
# Date: Wed Apr 17 07:29 EDT 2015
# Usage: Simply run ./check_ntp_server.sh script.
# Detail: There is a file ntp.servers which includes ntp servers.
# $ more ntp.servers
# ntpserv01
# ntpserv02
# ntpserv03
# ntpserv04
#
for i in `cat ntp.servers`
do
echo " "
echo "Checking $i"
ssh -q $i /usr/sbin/ntpq -p; echo " "; echo "Checking FS"; df -h
#ssh -q $i /usr/sbin/ntpq -p; echo " "; echo "Checking FS"; df -h; echo ""; echo "Top Output"; top
done
No comments:
Post a Comment