Difference between pages "Set Up Chrony For Accurate System Time" and "Help:Funtoo Editing Guidelines"

(Difference between pages)
 
(<console>)
 
Line 1: Line 1:
=== Accurate System Time (NTP) ===
+
This guide is meant to serve as a reference for those who are interested in helping improve the Funtoo wiki.
  
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.
+
== &#123;&#123;Kernelop&#125;&#125; ==
 +
To display kernel options, we encourage you to use the <tt>kernelop</tt> template. To use the <tt>kernelop</tt> template, create an entry similar to the following example:
 +
<pre>
 +
{{kernelop|title=foo,bar|desc=
 +
kernel options pasted from "make menuconfig"
 +
<&#47;pre>}}
 +
</pre>
  
The recommended NTP client/server is '''{{Package|net-misc/chrony}}'''.
+
Adding this entry will give you the following output:
 +
{{kernelop|title=foo,bar|desc=
 +
kernel options
 +
}}
  
<console>
+
Here's a more concrete example:
###i## emerge chrony
+
{{kernelop|title=File systems|desc=
###i## rc-update add chronyd default
+
<M> Second extended fs support         
</console>
+
[ ]  Ext2 extended attributes         
 +
[ ]  Ext2 execute in place support   
 +
<M> Ext3 journalling file system support
 +
}}
  
Use something like the following for your <code>/etc/chrony/chrony.conf</code>:
+
Examples of usage:  
 +
* [[Fglrx]]
 +
* [[Acpid]]
 +
* [[Microcode]]
  
 +
== &#123;&#123;File&#125;&#125; ==
 +
To display the contents of a file, use the <tt>file</tt> template.
 
<pre>
 
<pre>
server time.apple.com
+
{{file
maxupdateskew 100
+
| file name | <pre>
driftfile /etc/chrony/chrony.drift
+
contents of the file
keyfile /etc/chrony/chrony.keys
+
<&#47;pre>}}
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>
 
</pre>
  
Chronyd can then be started immediately by running <code>rc</code> to start all new services:
+
This produces:
 +
{{file
 +
| file name | <pre>
 +
contents of the file
 +
</pre>}}
  
 +
Examples of usage:
 +
* [[UEFI Install Guide]]
 +
* [[MediaWiki]]
 +
* [[Clang]]
 +
 +
== &#60;tt&#62; and &#60;code&#62; ==
 +
To emphasize filenames, commands, and other technical "jargon," use the  <tt>&#60;tt&#62;</tt> or <tt>&#60;code&#62;</tt> option. To use these, follow the example below:
 +
<pre>
 +
The <tt>/etc/fstab</tt> file is an important one. Another important file is <code>/boot/grub/grub.cfg</code>.
 +
</pre>
 +
 +
This example produces the following output (notice the difference between the fonts?): <br> The <tt>/etc/fstab</tt> file is an important one. Another important file is <code>/boot/grub/grub.cfg</code>.
 +
 +
== &#60;console&#62; ==
 +
To indicate that a user should run commands in a terminal, use <tt>&#60;console&#62;</tt>:
 +
 +
 +
For a root console:
 +
<pre>
 
<console>
 
<console>
###i## rc
+
###i## run a command as root
 +
</console>
 +
</pre>
 +
Produces:
 +
<console>
 +
###i## run a command as root
 
</console>
 
</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>:
+
{{Fancyimportant|The <tt>##i##</tt> text tags the rest of the line as being ''user input'' ("i" is for "input"). It is then highlighted in a noticeable color so it stands out from text that is not typed in by the user.}}
  
 +
Examples of usage:
 +
* [[Rootfs over encrypted lvm]]
 +
* [[Boot-Update]]
 +
* [[Fonts]]
 +
For a non-root console:
 
<pre>
 
<pre>
rc_need=dhcpcd
+
<console>
 +
$##i## run a command as user
 +
</console>
 
</pre>
 
</pre>
 +
Produces:
 +
<console>
 +
$##i## run a command as user
 +
</console>
 +
Examples of usage:
 +
* [[Zope HOWTO]]
 +
* [[Benchmarking]]
  
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:Wiki Development]]
 
+
[[Category:System]]
+

Revision as of 08:53, 18 February 2014

This guide is meant to serve as a reference for those who are interested in helping improve the Funtoo wiki.

{{Kernelop}}

To display kernel options, we encourage you to use the kernelop template. To use the kernelop template, create an entry similar to the following example:

{{kernelop|title=foo,bar|desc=
kernel options pasted from "make menuconfig"
</pre>}} 

Adding this entry will give you the following output: Under foo-->bar:

kernel options

Here's a more concrete example: Under File systems:

<M> Second extended fs support          
[ ]   Ext2 extended attributes          
[ ]   Ext2 execute in place support     
<M> Ext3 journalling file system support

Examples of usage:

{{File}}

To display the contents of a file, use the file template.

{{file
| file name | <pre>
contents of the file
</pre>}}

This produces:

{{{name}}}
{{{body}}}

Examples of usage:

<tt> and <code>

To emphasize filenames, commands, and other technical "jargon," use the <tt> or <code> option. To use these, follow the example below:

The <tt>/etc/fstab</tt> file is an important one. Another important file is <code>/boot/grub/grub.cfg</code>.

This example produces the following output (notice the difference between the fonts?):
The /etc/fstab file is an important one. Another important file is /boot/grub/grub.cfg.

<console>

To indicate that a user should run commands in a terminal, use <console>:


For a root console:

<console>
###i## run a command as root
</console>

Produces:

# run a command as root

Important

The ##i## text tags the rest of the line as being user input ("i" is for "input"). It is then highlighted in a noticeable color so it stands out from text that is not typed in by the user.

Examples of usage:

For a non-root console:

<console>
$##i## run a command as user
</console>

Produces:

$ run a command as user

Examples of usage: