You probably won't be surprised to learn that I haven't actually done, or tried this, myself, but researching it I think that you can query an external NTP server from your internal NTP server WITHOUT actually updating its clock, and then compare the two for difference.
On your internal NTP server on which you want to monitor drift, set up the NTP config file with a single server entry to an external NTP/PTP server and include the server option 'noselect'.
When the NTP query runs it will not update the clock but the offset can be viewed using
or
You don't say what Unix/Linux you are running (EDIT: Sorry you posted to the HP-UX forum) and therefore I cannot say what NTP commands are implemented on it. You will have to test the function manually first and then get one of the scripting experts on this forum to help you if you need it. You will, of course, also need to include a function to update the clock for real when it gets too far adrift.
I have a script which must not be run more than once at any given time. THis script will be scheduled to run every 20 mins as a cron job.
In my script can i have logic to say if this script is already running from the previous cron, then exit.
How do i go about doing that. If you describe the... (11 Replies)
Hi guys I'm very new to unix and I have to create an awk script that detects webpage addresses from a file/webpage and outputs how many times each webpage was detected.e.g. if my file was:
(Note: The symbol " was added to stop them being created into links)
"www.google.com"... (1 Reply)
Hi guys I'm very new to unix and I have to create an awk script that detects webpage addresses from a file/webpage and outputs how many times each webpage was detected.e.g. if my file was:
www.google.com
www.facebook.com
www.google.com
the output should be:
www.google.com x2... (2 Replies)
Dear community,
what I'm try to do is deny users to run a script without parameters from command bash, but the same script should run without parameters only from crontab.
Example runs by crontab:*/5 * * * * /tmp/script.sh
Here the normal execution starts every 5 minutes
Example #1 runs by... (16 Replies)
I have to check daily 20 processes each day. The names are like Network1 Network2 Network3 ....... Network20.
There is built in utility for doing this. Following is the command to check a single network process.
check_process_status 1
If we want to check the status of Network2 then the... (6 Replies)
Hi all,
I am needing some help with a script that will search for a video file by known extensions and then do a pattern search (I'm guessing via regex) and then based on a match of one type of another move the file to an assigned directory.
I would like to do this with either a shell script... (7 Replies)
Hi forum,
So I am trying to determine the OS type with the following script:
#!/usr/bin/sh
OStype1=`uname -s`
Sunos1=SunOs
if
then
echo "This system is Linux"
exit 0
elif
then
echo "This system is SunOs"
exit 0
elif (1 Reply)
Hello there,
I am not an expert in networking related stuff but I got a requirement to create UNIX script to query our Company's internal time source via NTP for time drift detect and report it when > +/- 50ms.
I have been googling a lot but thought to post it in this forum to get a... (1 Reply)
Hello,
I have a small script and it runs from web application in below format:
pipe:///path_to_myscript.sh url1 url2 url3
myscript.sh:
#!/bin/bash
count=0
while
do
count=$((count+1))
exec 3>&1
((ffmpeg -i $1 ...... -f mpegts pipe:1 2>/dev/null 1>&3 ) 2>&1 | \
while read LINE; do echo... (9 Replies)
Discussion started by: baris35
9 Replies
LEARN ABOUT CENTOS
chrony
CHRONY(1) User's Manual CHRONY(1)NAME
chrony - programs for keeping computer clocks accurate
SYNOPSIS
chronyc [OPTIONS]
chronyd [OPTIONS]
DESCRIPTION
chrony is a pair of programs for keeping computer clocks accurate. chronyd is a background (daemon) program and chronyc is a command-line
interface to it. Time reference sources for chronyd can be RFC1305 NTP servers, human (via keyboard and chronyc), or the computer's real-
time clock at boot time (Linux only). chronyd can determine the rate at which the computer gains or loses time and compensate for it while
no external reference is present. Its use of NTP servers can be switched on and off (through chronyc) to support computers with dial-
up/intermittent access to the Internet, and it can also act as an RFC1305-compatible NTP server.
USAGE
chronyc is a command-line interface program which can be used to monitor chronyd's performance and to change various operating parameters
whilst it is running.
chronyd's main function is to obtain measurements of the true (UTC) time from one of several sources, and correct the system clock accord-
ingly. It also works out the rate at which the system clock gains or loses time and uses this information to keep it accurate between mea-
surements from the reference.
The reference time can be derived from either Network Time Protocol (NTP) servers, reference clocks, or wristwatch-and-keyboard (via
chronyc). The main source of information about the Network Time Protocol is http://www.ntp.org.
It is designed so that it can work on computers which only have intermittent access to reference sources, for example computers which use a
dial-up account to access the Internet or laptops. Of course, it will work well on computers with permanent connections too.
In addition, on Linux it can monitor the system's real time clock performance, so the system can maintain accurate time even across
reboots.
Typical accuracies available between 2 machines are
On an ethernet LAN : 100-200 microseconds, often much better On a V32bis dial-up modem connection : 10's of milliseconds (from one session
to the next)
With a good reference clock the accuracy can reach one microsecond.
chronyd can also operate as an RFC1305-compatible NTP server and peer.
SEE ALSO chronyc(1), chrony(1)
http://chrony.tuxfamily.org/
AUTHOR
Richard Curnow <rc@rc0.org.uk>
This man-page was written by Jan Schaumann <jschauma@netmeister.org> as part of "The Missing Man Pages Project". Please see
http://www.netmeister.org/misc/m2p2/index.html for details.
The complete chrony documentation is supplied in texinfo format.
chrony @VERSION@ @MAN_DATE@ CHRONY(1)