Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 62 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       adjtimex [option]...


       This program gives you raw access to the kernel time vari­
       ables.  For a machine connected to the Internet, or
       equipped with a precision oscillator or radio clock, the
       best way to regulate the system clock is with ntpd(8).
       For a standalone or intermittently connected machine, you
       may use adjtimex instead to at least correct for system­
       atic drift.

       Anyone may print out the time variables, but only the
       superuser may change them.

       If your computer can be connected to the net, you might
       run ntpd for at least several hours and use adjtimex
       --print to learn what values of tick and freq it settled
       on.  Alternately, you could estimate values using the CMOS
       clock as a reference (see the --compare and --adjust
       switches).  You could then add a line to rc.local invoking
       adjtimex to set those parameters each time you reboot.


       Options may be introduced by either - or --, and unique
       abbreviations may be used.  Here is a summary of the
       options, grouped by type.  Explanations follow.

       Get/Set Kernel Time Parameters
              -p --print -t --tick val -f newfreq --frequency
              newfreq -o val --offset val -s adjustment
              --singleshot adjustment -m val --maxerr val -e val
              --esterror val -T val --timeconstant val -a[count]

       Estimate Systematic Drifts
              -c[count] --compare[=count] -i tim --interval tim
              -l file --logfile file -h timeserver --host
              timeserver -w --watch -r[file] --review[=file] -u

       Informative Output
              --help -v --version

       -p, --print
              Print the current values of the kernel time
              variables.  NOTE: The time is "raw", and may be off
              by up to one timer tick (10 msec).  "status" gives
              the value of the time_status variable in the
              kernel.  For Linux 1.0 and 1.2 kernels, the value
              is as follows:
                    0   clock is synchronized (so the kernel should

                   32   deleting leap second
                   64   clock unsynchronized
                  128   holding frequency
                  256   PPS signal present
                  512   PPS signal jitter exceeded
                 1024   PPS signal wander exceeded
                 2048   PPS signal calibration error
                 4096   clock hardware fault

       -t val, --tick val
              Set the number of microseconds that should be added
              to the system time for each kernel tick interrupt.
              There are supposed to be 100 ticks per second, so
              val should be close to 10000.  Increasing val by 1
              speeds up the system clock by about 100 ppm, or
              8.64 sec/day.  tick must be in the range

       -f newfreq, --frequency newfreq
              Set the system clock frequency offset to newfreq.
              newfreq can be negative or positive, and gives a
              much finer adjustment than the --tick switch.  The
              value is scaled such that newfreq = 1<<16 speeds up
              the system clock by about 1 ppm, or .0864 sec/day.
              Thus, --tick 10000 --frequency 6553600 is about the
              same as --tick 10001 --frequency 0.  newfreq must
              be in the range -6553600...6553600, allowing
              maximum adjustments of plus or minus 100 ppm.

       -s adj, --singleshot adj
              Slew the system clock by adj usec.  (Its rate is
              changed temporarily by about 1 part in 2000.)

       -o adj, --offset adj
              Add a time offset of adj usec.  The kernel code
              adjusts the time gradually by adj, notes how long
              it has been since the last time offset, and then
              adjusts the frequency offset to correct for the
              apparent drift.  adj must be in the range

       -m val, --maxerror val
              Set maximum error (usec).

       -e val, --esterror val
              Set estimated error (usec).  The maximum and
              estimated error are not used by the kernel.  They
              are merely made available to user processes via the
              adjtimex(2) system call.

       -t val, --timeconstant val
              Set phase locked loop (PLL) time constant.  val

       -c[count], --compare[=count]
              Periodically compare the system clock with the CMOS
              clock.  After the first two calls, print values for
              tick and frequency offset that would bring the
              system clock into approximate agreement with the
              CMOS clock.  CMOS clock readings are adjusted for
              systematic drift using using the correction in
              /etc/adjtime -- see hwclock(8).  The interval
              between comparisons is 10 seconds, unless changed
              by the --interval switch.  The optional argument is
              the number of comparisons.  (If the argument is
              supplied, the "=" is required.)

       -a[count], --adjust[=count]
              By itself, same as --compare, except the
              recommended values are actually installed after
              every other comparison.  With --review, the tick
              and frequency are set to the least-squares
              estimates.  (In the latter case, any count value is

       -i tim, --interval tim
              Set the interval in seconds between clock
              comparisons for the --compare and --adjust options.

       -u, --utc
              The CMOS clock is set to UTC (universal time)
              rather than local time.

       -l[file], --log[=file]
              Save the current values of the system and CMOS
              clocks, and optionally a reference time, to file
              (default /var/log/clocks.log).  The reference time
              is taken from a network timeserver (see the --host
              switch) or supplied by the user (see the --watch

       -h timeserver, --host timeserver
              Use ntpdate to query the given timeserver for the
              current time.  This will fail if timeserver is not
              running a Network Time Protocol (NTP) server, or if
              that server is not synchronized.  Implies --log.

       -w, --watch
              Ask for a keypress when the user knows the time,
              then ask what that time was, and its approximate
              accuracy.  Implies --log.

       -r[file], --review[=file]
              Review the clock log file (default


       If your system clock gained 8 seconds in 24 hours, you
       could set the tick to 9999, and then it would lose 0.64
       seconds a day (that is, 1 tick unit = 8.64 seconds per
       day).  To correct the rest of the error, you could set the
       frequency offset to (1<<16)*0.64/.0864 = 485452.  Thus,
       putting the following in rc.local would approximately
       correct the system clock:

            adjtimex  --tick 9999  --freq 485452


       adjtimex adjusts only the system clock -- the one that
       runs while the computer is powered up.  To set or regulate
       the CMOS clock, see hwclock(8).


       Steven S. Dick <ssd@nevets.oau.org>, Jim Van Zandt


       date(1L), gettimeofday(2), settimeofday(2), hwclock(8),
       ntpdate(8), ntpd(8), /usr/src/linux/include/linux/timex.h,

                         October 24, 1998             ADJTIMEX(8)



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can help in many different ways.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds