Sponsored Content
Full Discussion: Script to detect time drift
Operating Systems HP-UX Script to detect time drift Post 303017461 by Green_Star on Wednesday 16th of May 2018 09:53:26 AM
Old 05-16-2018
Hi MadeInGermany,

Quick question for my knowledge purposes.
If NTP is scheduled to run every 10 minutes on the server, do you think the clocks get synchronised?
Will there be an explicit need to check for the time drifts? Can the time drift situation occur at all?

Thank you.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to detect my script is already running

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)
Discussion started by: rmulchandani
11 Replies

2. Shell Programming and Scripting

AWK script to detect webpages from file

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)
Discussion started by: ROFL
1 Replies

3. Shell Programming and Scripting

AWK script to detect webpages from file

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)
Discussion started by: ROFL
2 Replies

4. Shell Programming and Scripting

Detect if script starts from queue

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)
Discussion started by: Lord Spectre
16 Replies

5. Shell Programming and Scripting

How to detect Hanged process in shell script?

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)
Discussion started by: Nakul_sh
6 Replies

6. Shell Programming and Scripting

Help with detect with regex and move script

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)
Discussion started by: Simplify
7 Replies

7. UNIX for Advanced & Expert Users

A script to detect system type

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)
Discussion started by: dampio
1 Replies

8. UNIX for Beginners Questions & Answers

Script to detect time drift on server

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)
Discussion started by: Green_Star
1 Replies

9. Shell Programming and Scripting

How to detect url in use in a script?

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
NTPD(8) 						 Clockwatcher's Programming Manual						   NTPD(8)

NAME
ntpd - time synchronization daemon implementing NTP SYNOPSIS
ntpd [-d] [-s] [-t] OPTIONS
-d will bump the debug level by one. May be specified more than once to increment debug level by one each time. Has no effect if ntpd has not been compiled with DEBUG defined. -s will cause ntpd to not adjust the the local clock. -t will cause ntpd to modify the value of tickadj in your kernel. This will have no effect unless ntpd was compiled with SETTICKADJ defined. DESCRIPTION
NTPD is the network time synchronization daemon and is normally invoked at boot time from the /etc/rc(8) file. It implements a new revi- sion of the Network Time Protocol first described in RFC-958. It maintains the host's time synchronized with a set of distributed time servers, each with varying accurracy and reliability. Multiple time server masters may exist, but there is no requirement for election of a single master. Ntpd uses the adjtime(2) system call to slew the clock of the host by small amount in order to keep the clock synchronized. If the local clock exceeds the ``correct'' time by some threshold, then settimeofday(2) is used to make a step adjustment of the local clock. When ntpd(8) is started on the machine, it reads configuration information from /etc/ntp.conf which contains information about other ntp time servers and host specific information. Configuration information is listed one entry per line, with fields separated by whitespace. Lines which begin with a ``#'' character are treated as comments. Here is a sample configuration file: # # Local clock parameters # # Precision of the local clock to the nearest power of 2 # ex. # 60-HZ = 2**-6 # 100-HZ = 2**-7 # 1000-HZ = 2**-10 precision -7 # # intrinsic drift of local clock # tickadj 1 # # Peers Type Name # peer foo.umd.edu peer 192.5.39.94 peer bar.arpa server bogon.umd.edu passive bozo.umd.edu There are two major types of information specified in the configuration file: local host information, and remote timer server specifica- tion. The local host information is used to describe the intrinsic properties of the local host's timekeeping machinary. The commands in this group are precision, and tickadj. The precision command takes a number which describes the resolution of the local clock, as a power of two. For example, a VAX system typi- cally has a 100 HZ clock and thus a precision of -7. If the symbol _hz is defined in the namelist of /vmunix, this value is automatically set based on the value of hz. The tickadj command is used to specify the granularity of clock adjustment done by the adjtime(2) system call. If the -s option is speci- fied when ntpd is invoked, the kernel variable _tickadj is modified via /dev/kmem. The preferred method of setting tickadj is by changing the value in the kernel file conf.c instead of having ntpd set in this rude fashion. On a VAX, a value of 1 is usually used. See the README file for typical values of tickadj on various hardware platforms. Currently three timer server specifications are supported. They are peer, server and passive. Each command takes either a dotted-quad internet address or a host name. Each host specified in any one of the three commands is elligable to be synchronized to, while random hosts which set up a peer relationship are not. The peer and server commands create an active polling situation; in the case of peer, the NTP packets are sourced in Symmetric-Active mode, while using server causes the packets to be in Client mode. When reachability is lost with a configured host in either of these two cases, the daemon will continue to poll to re-acquire that host. A host specified in the passive command will not continue to be polled. If that host begins to poll us, it will be eligable as to be synchronized but will not be polled if reachability is lost. It is recommended that the bulk of the peers configured should be specified with the client keyword; this will minimize resource usage on the remote NTP server. If your host will be serving as a redistribution point for a cluster of hosts, you should set up peer relation- ships with higher quality clocks (lower stratums) and other equal stratum clocks. In other words, if you are not redistributing time to others, you shouldn't need to configure any peers in your NTP configuration; client specifications are more appropriate. NOTES
Please choose your NTP peers carefully; send mail to ntp@TRANTOR.UMD.EDU for assitance. There exists a broadcast command which will exercise completely untested code. Use at your own risk. There is no reason to believe that the hpux code which was added still works. In general, this code and adaptations of the NTPD to plat- forms without the adjtime(2) system call are not likely to be very satisfying. BUGS
No doubt. FILES
/etc/ntp.conf NTP daemon configuration file SEE ALSO
adjtime(2), settimeofday(2), RFC-958, Network Time Protocol (Version 1) Specification and Implementation, Revised 17 September 1988 AUTHORS
Louis A. Mamakos, louie@TRANTOR.UMD.EDU Michael G. Petry, petry@TRANTOR.UMD.EDU The University of Maryland, Computer Science Center. LOCAL
27 November 1996 NTPD(8)
All times are GMT -4. The time now is 08:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy