Korenix | System Feature
21
NOTE
Before using the NTP client utility, check your IP and DNS settings to
make sure that an Internet connection is available.
3-5-2
NTP Server
NTP is configured by the /etc/ntp.conf file. Here is a simple example:
server time.stdtime.gov.tw
driftfile /var/db/ntp.drift
The
server
option specifies which servers are to be used, with one server listed on each
line. The
driftfile
option specifies which file is used to store the system clock's frequency
offset. The ntpd program uses this to automatically compensate for the clock's natural drift,
allowing it to maintain a reasonably correct setting even if it is cut off from all external
time sources for a period of time.
To start the server, execute the command:
# ntpd
To check the server status, execute the command:
# ntpq –p 127.0.0.1
For more information, read the following links about setting up a NTP server:
http://www.freebsd.org/doc/handbook/network-ntp.html
3-6
Cron Daemon (Schedule jobs)
Cron is a daemon to execute scheduled commands. Cron wakes up every minute, examining
the /etc/crontab, checking each command to see if it should be run in the current minute.
Crontab syntax :
A crontab file has five fields for specifying day, date and time followed by the command to be
run at that interval.
* * * * * command to be executed
- - - - -
| | | | |