Changeset 17529 for trunk/DataCheck/Monitoring
- Timestamp:
- 01/21/14 01:35:09 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Monitoring/CheckNTPDate.sh
r13043 r17529 6 6 7 7 offset=`/usr/sbin/ntpdate -d ptbtime1.ptb.de 2>/dev/null | grep '^offset*' | cut -d' ' -f2` 8 query="INSERT NTPDate set fOffset="$offset", fMachineKEY=(SELECT fMachineKEY fromMachine WHERE fMachineName='"$HOSTNAME"'), fTime=Now()"8 query="INSERT NTPDate SET fOffset="$offset", fMachineKEY=(SELECT fMachineKEY FROM Machine WHERE fMachineName='"$HOSTNAME"'), fTime=Now()" 9 9 # host needs full address to work also on fact01 10 /usr/bin/mysql -u systemstatus --host=fact01.fact.local SystemStatus -e "$query"10 /usr/bin/mysql -u systemstatus --host=fact01.fact.local systemstatus -e "$query" 11 11 12 12 if [ $(echo " $offset > 1 || $offset < -1 " | bc) -eq 1 ]
Note:
See TracChangeset
for help on using the changeset viewer.