source: trunk/DataCheck/CheckNTPDate.sh@ 11848

Last change on this file since 11848 was 11848, checked in by Daniela Dorner, 13 years ago
added (two scripts checking the status of the network card and the time of the machines; crontab files for all 4 machines)
  • Property svn:executable set to *
File size: 420 bytes
Line 
1#!/bin/bash
2#
3# script to check whether the time of the computer is off
4# offset is inserted into the database
5#
6
7offset=`ntpdate -d ptbtime1.ptb.de 2>/dev/null | grep '^offset*' | cut -d' ' -f2`
8query="INSERT NTPDate set fOffset="$offset", fMachineKEY=(SELECT fMachineKEY from Machine WHERE fMachineName='"$HOSTNAME"'), fTime=Now()"
9#echo $query
10/usr/bin/mysql -u systemstatus --host=fact01 SystemStatus -e "$query"
11
12
Note: See TracBrowser for help on using the repository browser.