CHU(8) CHU(8) NNAAMMEE chu - sets and disciplines the system clock SSYYNNOOPPSSIISS //ssbbiinn//cchhuu [-l:_m_a_x_a_d_j] [-d:_p_r_o_p_d_e_l_a_y] [file] DDEESSCCRRIIPPTTIIOONN cchhuu sets and disciplines the system clock based on time broadcasts from radio station CHU. You must have a shortwave receiver tuned to radio station CHU connected to the input of your sound card for this to work. With a good quality received signal, and reasonably stable system clock, cchhuu can achive an accuracy of less than +/- 10 mS from UTC, and discipline the system clock frequency to within +/- 1 ppm. Theoretically, with a perfect received signal, cchhuu should be able to yeild +/- 0.5 mS resolution. cchhuu is usually run via crond(8) with a crontab entry that looks like this: 5,35 * * * * /sbin/chu -l:120 -d:2000 >> /var/log/chu.log This will run cchhuu at 5 and 35 minutes past each hour, and log the results to _/_v_a_r_/_l_o_g_/_c_h_u_._l_o_g Also, it limits the maximum correction to 2 minutes (120 seconds). The --dd option is used here to account for a delay of 2 milliseconds. NNOOTTEESS cchhuu uses no ioctl() calls on the audio device. It assumes the audio format to be 8 KHz sample rate, 8 bits per sample, each sample being an unsigned byte. This is the default for most audio devices in Linux. Reading from a file is really only useful for debugging since this will set the clock incorrectly. CHU broadcasts can be found on 3.330 MHz, 7.335 MHz, and 14.670 MHz. PPAARRAAMMEETTEERRSS ffiillee - PCM format file or sound device. Default is /dev/dsp. --ll::_m_a_x_a_d_j - Maximum time adjustment in seconds. If not specified, adjustment is not limited. --dd::_p_o_p_d_e_l_a_y - Propagation delay from CHU in microseconds. Default is zero. FFIILLEESS /usr/local/etc/chu.last Records the last time a correction was made using the adjtimex(2) API. AAUUTTHHOORRSS VV00..11..2299 William Rossi, bill@rossi.com, Feb 1999