Friday, December 9, 2016

System Time I

System Time I


Setting the Hardware Clock with hwclock 


Recall from Chapter 5 that two time sources are used on a Linux system:



• Hardware clock
  This clock is integrated into the CMOS chip on your Linux system’s 
  motherboard. It runs all the time, even when the system is powered off.



• System time
  This clock runs via software inside the Linux kernel itself. It is driven by
  an ISA timer interrupt. System time is measured as the number of seconds since 00:00:00 
  January 1, 1970, UTC. 




The key thing to remember is that the hardware clock and the system time may not be
the same. When managing a Linux system, we are more concerned with the system time than the
time reported by the hardware clock. The role of the hardware clock is pretty basic. Its job
is to keep time when the system is powered off. The system time is synchronized to the hardware
clock time when the Linux operating system starts. After booting, Linux only uses system time.
The hardware clock is ignored.



To manage the hardware clock on your system, you can use the

hwclock 

command at the shell prompt. It can do the following:



Display the current time.
Set the hardware clock time.
Synchronize the hardware clock to the system time.
Synchronize the system time to the hardware clock.



You can use the options shown in Table 16-3 with hwclock on most Linux distributions. 


As you can see, the scope of hwclock’s functionality is limited to the local computer system. On
a network, you may need to ensure that the system time on your Linux systems is synchronized.




[options shown in Table 16-3 with hwclock, p 609] 


LX0-104 Exam Objectives (N)

No comments:

Post a Comment