108.1 Maintain System Time Flashcards
Format for date command.
date MonthDayHourMinuteYear
Command to print ntp query info.
ntpq -p
* indicates the main server
+ indicates a good time server
- indicates the server is out of range and is ignored
ntpq uses random time servers that change every _ and shows the three _ _ last used.
hour
IP addresses
Command to show the network time synchronization status.
ntpstat
Command to manually synchronize the system time with an NTP server when the ntp daemon (ntpd) is not running.
ntpdate -s [fqdn of ntp server]
Will call function settimeofday() if clock is more than 0.5 seconds off.
Will decline to set the date if ntpd is running.
Must be run as root.
Function which initializes the tzname variable from the TZ environment variable.
tzset()
Command to set the hardware clock (BIOS) to the system time.
hwclock –systohc
Command to set the hardware clock (BIOS) to UTC.
hwclock –utc
Command to set the hardware clock (BIOS) date and time.
hwclock –date=[YYYY-MM-DD hh:mm:ss]
hwclock –date=’2 days ago’
Locale environment variable that specifies date and time format for the system.
LC_TIME
Path to the conf file where the TZ environment variable is set for the system time zone.
/etc/profile
How is UTC different from GMT?
UTC includes leap seconds.
NTP pool time servers are selected based on which are _ _.
geographically closest
NTP stratum:
- A stratum-1 device receives its time signal from a stratum-0 device.
- NTP handles up to 16 stratum levels.
- Multiple stratum are used in large networks to prevent overloading the network with time synchronization requests.
Path to configuration options for the NTP server and the option to help prevent amplification attacks.
/etc/ntp.conf
disable monitor