system clock - TeraScan use of UNIX system clock

DESCRIPTION

The TeraScan programs used to set the system clock vary with the system.   Some systems have an external clock that is read one or more times each day.   If the system does not have an external clock, the UNIX date or rdate command must be used to keep the system clock accurate.

The type of clock is defined by the system.config file setting [system]gps.index.  The hardware address of the clock on the system (usually a serial port) is defined by the system.config file setting [system]gps.device.

For systems that have an external clock, the command that reads the external clock and updates the system clock is either sunclock or nmea_monitor.

The clock command can be scheduled by the file $PASSDIR/tscan.rc.local or can be run by the root or a terascan user.  When a terascan user runs a clock command, they can find out the error in the system clock but cannot reset the clock.  You must be root user to update the system clock with a clock command.

The different clock types supported are:

[system]gps.index=
       1=WWV or WWH
       2=Omega
       3=No clock attached to the system
       4=Kinnemetrics 814
       external-gps or 5=Acutime GPS ( external unit)
       internal-SV6 or 6=Acutime GPS ( internal unit) attached to antenna with a setting of [antenna.type]Controller.index = 2.
       nmea or 10=Time data obtained from input data stream of the nmea_monitor function.

GPS INTERLOCK

For [system]gps.index =external-acutime or 5, the lock file is $PASSDIR/gps_lock_XXXX (where XXXX is the device name, such as dev_term_a) is defined to keep two copies of the clock program from interfering with each other.  The actual device name of the serial port for the GPS is defined in the [system]gps.device setting in system.config.  The lock file is a 0-length file with write permission that, if needed, will be automatically defined in the $PASSDIR directory.

ANTENNA INTERLOCKS

For [system]gps.index=internal-SV6 or 6, the GPS unit is accessed using the serial port for the antenna.  To prevent two programs from accessing the same resources, a lock file $PASSDIR/ant_lock_dev_term_X  (where /dev/term/X is an example of the serial port attached to the antenna) is defined for each antenna. The serial port name is defined in the [antenna-X]antenna.device setting in system.config.   The lock file is a 0-length file that, if needed, will be automatically defined in the $PASSDIR directory.  The program antenna cannot run while the program sunclock or whereami is running and using the GPS.  The actual antenna that has the active GPS unit is associated with the lock file inferred from the [system]gps.device setting of the system.config file.  

SEE ALSO

sunclock, last_location, tscan.login, whereami, nmea_monitor

NOTES

Any residual time error is stored in the file $PASSDIR/last_location.   Do not run sunclock if the clock index ([system]gps.index) is nmea or 10.  nmea_monitor will obtain the clock adjustment and set the system clock. in place of sunclock.


Last Update: $Date: 1999/05/10 21:16:38 $