> Keeping good time

It's helpful to have your system keep the correct time. It's obviously useful to know what the time is, but certain functionality won't work well or at all if the computer's notion of time is wrong.

Tribblix can correct the system time with a high degree of accuracy using NTP - the Network Time Protocol - which compares your clock with a number of reference clocks on the internet. The implementation used in Tribblix is called chrony.

In recent releases, chrony is installed by default. If it isn't, then install it using:

zap install TRIBchrony

To check if it's running, use the command:

svcs -p chrony

If it's not online, then enable it using:

svcadm enable svc:/network/chrony:default

If the system has been running without time synchronization, then the clock may have drifted. This will slowly be corrected. To see what the current state is, use the chronyc tracking command. This will give a variety of information, which will include something like:

# chronyc tracking
...
System time     : 14.466815948 seconds fast of NTP time

The above shows that the clock is off by almost 15 seconds. After a few minutes this should come down to close to zero, and chrony should be able to hold the time accurate to within a few milliseconds.

Offset time in VirtualBox

If you're running inside a hypervisor such as VirtualBox, you might see the clock being exactly an hour out in Summer. The issue here is that there might be two things managing time - the host might have already corrected for Daylight Savings Time, and is presenting that time to the guest operating system which then corrects again.

If you see this, you can tell Tribblix what time the hardware clock is set to. In my case, I'm running in the GB timezone (look at the TZ environment variable), but the PC is also set to GB. So you should use the rtc command to tell Tribblix that the clock it's been given is already corrected:

# rtc -z GB

Index | |