Looks like the "ntpq -c rl" changes with every update of the NTP package.
Take the "ntpq -pn" output instead! To be processed like this in the shell script:
This User Gave Thanks to MadeInGermany For This Post:
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 REDHAT
ntptrace
ntptrace(1) User Commands ntptrace(1)NAME
ntptrace - Trace peers of an NTP server
SYNOPSIS
ntptrace [-flags] [-flag [value]] [--option-name[[=| ]value]] [host]
DESCRIPTION
ntptrace is a perl script that uses the ntpq utility program to follow the chain of NTP servers from a given host back to the primary time
source. For ntptrace to work properly, each of these servers must implement the NTP Control and Monitoring Protocol specified in RFC 1305
and enable NTP Mode 6 packets.
If given no arguments, ntptrace 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 -n, --numeric
Print IP addresses instead of hostnames.
Output hosts as dotted-quad numeric format rather than converting to the canonical host names.
-m number, --max-hosts=number
Maximum number of peers to trace. This option takes an integer number as its argument. The default number for this option is:
99
This option has not been fully documented.
-r string, --host=string
Single remote host. The default string for this option is:
127.0.0.1
This option has not been fully documented.
-?, --help
Display usage information and exit.
-!, --more-help
Pass the extended usage information through a pager.
-v [{v|c|n --version [{v|c|n}]}]
Output version of program and exit. The default mode is `v', a simple version. The `c' mode will print copyright information and
`n' will print the full copyright notice.
EXIT STATUS
One of the following exit values will be returned:
0 (EXIT_SUCCESS)
Successful program execution.
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
70 (EX_SOFTWARE)
libopts had an internal operational error. Please report it to autogen-users@lists.sourceforge.net. Thank you.
NOTES
This manual page was AutoGen-erated from the ntptrace option definitions.
ntp (4.2.8p13) 20 Feb 2019 ntptrace(1)