Sponsored Content
Full Discussion: Time synch monitoring
Top Forums Shell Programming and Scripting Time synch monitoring Post 302988254 by jim mcnamara on Thursday 22nd of December 2016 12:20:50 PM
Old 12-22-2016
Filename drift - don't know Debian but it should be in the same directory tree as some other ntp files. It can be named drift or ntp.drift. Some systems have it in /etc/[something] other have it in /var/lib/ntp It gives you an estimate of your computer's clock accuracy - what it is try to correct. The values are ppm. Not seconds.
So, in an 86400 second day 10ppm is 864ms per day correction required. What this means is that ntp has had to add or subtract (if negative) that amount averaged over days of uptime. If you reset file the drift file every day
Code:
echo " `date`  `cat /etc/ntp/ntp.drift`" > /someplace/somelogfile
> /etc/ntp/ntp.drift

you get an approximation of the corrections going on for that day.

If you check the file periodically and find major changes (you decide the definition of major) you can report a problem.

Now. Locality of the time server, network, local cpu, and the stratum of your time server all affect accuracy. You should have a single server in your network that connects to a known lower stratum time server. If your time server is in house and NOT going outside, good luck with correct time. If this is for legal purposes, like records you keep and report to external agencies, correct time has to be in order.

If this is scientific or research timing between systems, especially logging boxes, is very important. Correct time as defined by an external arbiter is not usually a big deal.

What do you need? Going for a really tiny discrepancy in the drift file is not usually required.

Last edited by jim mcnamara; 12-22-2016 at 01:27 PM..
 

8 More Discussions You Might Find Interesting

1. HP-UX

Scripts for monitoring real time for the error code

Hi ! I wish extract one information(error code) from the machine which is running on the HP-UX platform. Can anyone help me? Wanted to write a scripts that monitor real time at the error code and transfer the information out from the machine. The information is then process and SMS out to the... (9 Replies)
Discussion started by: JOHNSON
9 Replies

2. Shell Programming and Scripting

Monitoring system available time

Hi, I am new to Unix. I have an application which i need to monitor it for the available system time. If the system is down, i need to send an email notifying the downtime. Can someone provide a sample code or shell script to perform the above activity. Thanks (3 Replies)
Discussion started by: borncrazy
3 Replies

3. Shell Programming and Scripting

Synch only directory sturcture- Help

Hi All, I am trying to synchronize two folders(test and test1) using rsync. "test" has some sub folders and all of the have some files also. I just want to sync the directory structure not the files in the first folder with the second. i tried the following script. rsync -av --include '*/'... (5 Replies)
Discussion started by: Tuxidow
5 Replies

4. Shell Programming and Scripting

How to stop monitoring of servers at the time of reboot through shell scripting?

We have number of servers which belongs to platforms Solaris, AIX,HP-UX and LINUX. Monitoring tool 'Patrol Agent' process run on the servers to check for the server health and communicate with the Patrol server through the port 5181. During scheduled reboot and maintenance of servers we do receive... (1 Reply)
Discussion started by: subharai
1 Replies

5. Shell Programming and Scripting

Monitoring a users log in time?

how do i start with this guys? Sample run: $ LOGTIME it2015678 <enter> User it2015678 is CRUZ Tommy H And has logged on to the system for: 8 hours 12 minutes from the time this script was run. (1 Reply)
Discussion started by: skypigeon
1 Replies

6. Shell Programming and Scripting

how to synch 2 processes to start at the same time

Hey Excuse me if this question is repeated everywhere but I am still new with scripting and I couldn't apply what I found to my case :confused::confused: I am trying to run a rec process on a ssh client and at the same time play a file from my computer so i tried this #!/bin/bash echo... (3 Replies)
Discussion started by: Antaha
3 Replies

7. Shell Programming and Scripting

Process monitoring for a fixed time

Hi Gurus, I have a scenario where i need to monitor for a process which starts at a particular time. I need to check if the process has started at the specified time and keep checking this for 5 minutes only and then want to alert me. ps -ef | grep -i process.sh | grep -v grep >... (5 Replies)
Discussion started by: jayadanabalan
5 Replies

8. Red Hat

NTPD service restart and time synch

I am using ntpd service to sync our RHEL 5.9 system to synch with GPS clock. When I change the RHEL system time more than 7 seconds than the present system time (through "Datetime" command), ntpd service does not adjust the system time to the present GPS time.But if the time is with in 7 seconds,... (6 Replies)
Discussion started by: Anjan Ganguly
6 Replies
NTPTRACE(1)                                                   General Commands Manual                                                  NTPTRACE(1)

NAME
ntptrace - trace a chain of NTP servers back to the primary source SYNOPSIS
ntptrace [ -m max_hops ] [ -n ] DESCRIPTION
ntptrace determines where a given Network Time Protocol (NTP) server gets its time from, and follows the chain of NTP servers back to their master time source. If given no arguments, it starts with localhost. Here is an example of the output from ntptrace: % ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135 server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu: stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB' On each line, the fields are (left to right): the host name, the host stratum, the time offset between that host and the local host (as measured by ntptrace; this is why it is not always zero for "localhost"), the host synchronization distance, and (only for stratum-1 servers) the reference clock ID. All times are given in seconds. Note that the stratum is the server hop count to the primary source, while the synchronization distance is the estimated error relative to the primary source. These terms are precisely defined in RFC-1305. OPTIONS
-m max_hops Sets the number of server hops to follow (default = 99). -n Turns off the printing of host names; instead, host IP addresses are given. This may be useful if a nameserver is down. BUGS
This program makes no attempt to improve accuracy by doing multiple samples. Network Time Protocol December 4, 2011 NTPTRACE(1)
All times are GMT -4. The time now is 01:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy