Sponsored Content
Full Discussion: Script to detect time drift
Operating Systems HP-UX Script to detect time drift Post 303017237 by Green_Star on Friday 11th of May 2018 08:52:14 AM
Old 05-11-2018
Thanks for your response hicksd8.

My responses are below

You have an internal company NTP server? Yes, we have internal NTP server

You are trying to test it's accuracy, is that correct? Yes. correct

Do you have access to that internal NTP server to run stuff on it? Or can you only check it from a client machine? We have access to server to run stuff on it.
 

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

NAME
ntp - query an ntp clock SYNOPSIS
ntp [-v] [-s] [-f] hosts... DESCRIPTION
ntp sends an ntp packet to the ntp daemon running on each of the given hosts. A daemon fills in fields of the ntp packet as per RFC-???? and sends the packet back. ntp then formats and prints the result on the standard output. The default output shows the delay, offset, and date in ctime() format. Options can reset the time of the local system clock. OPTIONS
-v Verbose output, showing the full contents of received ntp packets, plus caluclated offset, displacement, etc. -s Set system time-of-day clock. Will only happen if time offset is less than compiled-in constant WAYTOBIG (currently 1000 seconds). Will not happen if remote host is unsynchronized. -f Force setting system clock regardless of offset. Must be used with -s option. Still will not reset clock if remote system is unsynchronized. NTP RESULTS
The default output for each host looks like this: 128.8.10.1: delay:1.845207 offset:-0.358460 Mon Mar 20 08:05:44 1989 The verbose output for each host looks like this: Packet from: [128.8.10.1] Leap 0, version 1, mode Server, poll 6, precision -10 stratum 1 (WWVB) Synch Distance is 0000.1999 0.099991 Synch Dispersion is 0000.0000 0.000000 Reference Timestamp is a7bea6c3.88b40000 Tue Mar 7 14:06:43 1989 Originate Timestamp is a7bea6d7.d7e6e652 Tue Mar 7 14:07:03 1989 Receive Timestamp is a7bea6d7.cf1a0000 Tue Mar 7 14:07:03 1989 Transmit Timestamp is a7bea6d8.0ccc0000 Tue Mar 7 14:07:04 1989 Input Timestamp is a7bea6d8.1a77e5ea Tue Mar 7 14:07:04 1989 umd1: delay:0.019028 offset:-0.043890 Tue Mar 7 14:07:04 1989 The various fields are interpreted as follows: Packet from: [address] The address that this ntp packet was received from. Leap indicator: n The leap second indicator. Non-zero if there is to be a leap second added or subtracted at the new year. Status: n Stratum: n (source) The stratum of the clock in the NTP hierarchy, along with the source of the clock, either the name of a reference standard (such as WWVB or GOES) or the Internet address of the clock that this clock is derived from. Poll = n The desired poll rate of the peer. Precision = exponent (dec) The claimed precision of the clock, in seconds. Synchronizing Dist is ??? Synchronizing Dispersion is ??? The next five timestamps are given as NTP fixed-point values, in both hexadecimal and ctime(3). These are set either by this ntp process, or by the server we are quering. Reference Timestamp is hex-timestamp ctime string The last time the server clock was adjusted. (remote time) Originate Timestamp is hex-timestamp ctime string When the ntp request was transmitted by us to the server. (local time) Receive Timestamp is hex-timestamp ctime string When the ntp request was received at the server. (remote time) Transmit Timestamp is hex-timestamp ctime string When the ntp response was transmitted by the server. (remote time) Input Timestamp is hex-timestamp ctime string When the ntp response was received by us. (local time) hostname: delay:time offset:time The summary of the results of the query, giving the hostname of the responding clock (from the command line), the round-trip delay, and the offset between the two clocks (assuming symmetric round-trip times). BUGS
Using ntp with the current host will show inaccurate results. Probably a few others. Report bugs to Louis A. Mamokos (louie@trantor.umd.edu). SEE ALSO
RFC-???? Network Time Protocol(1), Dave Mills and ... ntpd(8), ntpdc(8) 30 July 1988 NTP(8)
All times are GMT -4. The time now is 03:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy