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
TIMED(8)						      System Manager's Manual							  TIMED(8)

NAME
timed - time server daemon SYNOPSIS
timed [ -t ] [ -M ] [ -n network ] [ -i network ] DESCRIPTION
Timed is the time server daemon and is normally invoked at boot time from the rc(8) file. It synchronizes the host's time with the time of other machines in a local area network running timed(8). These time servers will slow down the clocks of some machines and speed up the clocks of others to bring them to the average network time. The average network time is computed from measurements of clock differences using the ICMP timestamp request message. The service provided by timed is based on a master-slave scheme. When timed(8) is started on a machine, it asks the master for the net- work time and sets the host's clock to that time. After that, it accepts synchronization messages periodically sent by the master and calls adjtime(2) to perform the needed corrections on the host's clock. It also communicates with date(1) in order to set the date globally, and with timedc(8), a timed control program. If the machine running the master crashes, then the slaves will elect a new master from among slaves running with the -M flag. A timed running without the -M flag will remain a slave. The -t flag enables timed to trace the messages it receives in the file /usr/adm/timed.log. Tracing can be turned on or off by the program timedc(8). Timed normally checks for a master time server on each network to which it is connected, except as modified by the options described below. It will request synchronization service from the first master server located. If permitted by the -M flag, it will provide synchronization service on any attached networks on which no current master server was detected. Such a server propagates the time computed by the top-level master. The -n flag, followed by the name of a network which the host is connected to (see networks(5)), overrides the default choice of the network addresses made by the program. Each time the -n flag appears, that network name is added to a list of valid networks. All other networks are ignored. The -i flag, followed by the name of a network to which the host is connected (see networks(5)), overrides the default choice of the network addresses made by the program. Each time the -i flag appears, that network name is added to a list of networks to ignore. All other networks are used by the time daemon. The -n and -i flags are meaningless if used together. FILES
/usr/adm/timed.log tracing file for timed /usr/adm/timed.masterlog log file for master timed SEE ALSO
date(1), adjtime(2), gettimeofday(2), icmp(4P), timedc(8), TSP: The Time Synchronization Protocol for UNIX 4.3BSD, R. Gusella and S. Zatti 4.3 Berkeley Distribution November 17, 1996 TIMED(8)
All times are GMT -4. The time now is 07:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy