Difference between pages "Make.conf" and "Set Up Chrony For Accurate System Time"

From Funtoo
(Difference between pages)
Jump to: navigation, search
 
(Accurate System Time (NTP))
 
Line 1: Line 1:
== What is the make.conf file? What is its purpose? ==
+
=== Accurate System Time (NTP) ===
Make.conf is portage's and Funtoo's main configuration file. It contains many variables that define how a package will installed in a Funtoo system. You can customize portage internal variables, such as, portage tree location, sources tarball location, overlays, to name a few. You can customize hardware specs, such as TMPFS, disk limits, GCC compilation flags to achieve best performance, etc. A great deal of this customization is done through the make.conf file. This page will attempt to explain the uses of the make.conf file, different variables that can be added to it, and their uses.  
+
 
 +
It's important that your Funtoo Linux system has an accurate clock. NTP (network time protocol) can ensure your clock is accurate at all time.
 +
 
 +
The recommended NTP client/server is '''{{Package|net-misc/chrony}}'''.
 +
 
 +
<console>
 +
###i## emerge chrony
 +
###i## rc-update add chronyd default
 +
</console>
 +
 
 +
Use something like the following for your <code>/etc/chrony/chrony.conf</code>:
 +
 
 +
{{File
 +
|/etc/chrony/chrony.conf|<pre>
 +
server time.apple.com
 +
maxupdateskew 100
 +
driftfile /etc/chrony/chrony.drift
 +
keyfile /etc/chrony/chrony.keys
 +
commandkey 1
 +
dumponexit
 +
dumpdir /var/log/chrony
 +
initstepslew 10 time.apple.com
 +
logdir /var/log/chrony
 +
log measurements statistics tracking
 +
logchange 0.5
 +
mailonchange me@emailprovider.com 0.5
 +
rtcfile /etc/chrony/chrony.rtc
 +
rtconutc
 +
sched_priority 1
 +
lock_all
 +
</pre>}}
 +
 
 +
Chronyd can then be started immediately by running <code>rc</code> to start all new services:
 +
 
 +
<console>
 +
###i## rc
 +
</console>
 +
 
 +
Because Funtoo Linux starts network daemons without waiting for an Internet connection to become available, and because chrony will attempt to synchronize the clock over the Internet when it first starts, you must manually configure chronyd to be dependent on whatever method you use to enable your outbound network connectivity. For example, if using <code>dhcpcd</code>, add the following to <code>/etc/conf.d/chronyd</code>:
  
== Where does this file reside? ==
 
The <tt>make.conf</tt> file is found at <tt>/etc/portage/make.conf</tt> and can be viewed and edited by running the following command:
 
 
<console>
 
<console>
###i## nano /etc/portage/make.conf
+
###i## nano /etc/conf.d/chronyd
 +
rc_need=dhcpcd
 
</console>
 
</console>
  
== Variables ==
+
You should notice a marked improvement in your system clock's accuracy. If your system time was off by a significant amount, <code>chronyd</code> will gradually correct your clock while the system runs.
  
 
[[Category:System]]
 
[[Category:System]]

Revision as of 13:54, 5 February 2014

Accurate System Time (NTP)

It's important that your Funtoo Linux system has an accurate clock. NTP (network time protocol) can ensure your clock is accurate at all time.

The recommended NTP client/server is net-misc/chrony.

# emerge chrony
# rc-update add chronyd default

Use something like the following for your /etc/chrony/chrony.conf:

server time.apple.com
maxupdateskew 100
driftfile /etc/chrony/chrony.drift
keyfile /etc/chrony/chrony.keys
commandkey 1
dumponexit
dumpdir /var/log/chrony
initstepslew 10 time.apple.com
logdir /var/log/chrony
log measurements statistics tracking
logchange 0.5
mailonchange me@emailprovider.com 0.5
rtcfile /etc/chrony/chrony.rtc
rtconutc
sched_priority 1
lock_all

Chronyd can then be started immediately by running rc to start all new services:

# rc

Because Funtoo Linux starts network daemons without waiting for an Internet connection to become available, and because chrony will attempt to synchronize the clock over the Internet when it first starts, you must manually configure chronyd to be dependent on whatever method you use to enable your outbound network connectivity. For example, if using dhcpcd, add the following to /etc/conf.d/chronyd:

# nano /etc/conf.d/chronyd
rc_need=dhcpcd

You should notice a marked improvement in your system clock's accuracy. If your system time was off by a significant amount, chronyd will gradually correct your clock while the system runs.