Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Comparing time differences between 2 Solaris servers Post 303023543 by Fossil_84 on Wednesday 19th of September 2018 04:57:03 AM
Old 09-19-2018
Quote:
Originally Posted by Neo
As I recall, have not confirmed, you can use ntpdate on any server to check it's offset relative to another server.

Just run ntpd on all your servers and you can use ntpdate to check all offsets.
Quote:
Originally Posted by Neo
As I recall, have not confirmed, you can use ntpdate on any server to check it's offset relative to another server.

Just run ntpd on all your servers and you can use ntpdate to check all offsets.
Thanks Neo! NTPDATE allowed me to check on the time difference between 2 servers.

For sharing, the command is

NTPDATE -q (server IP)

Once again many thanks to Neo and Bakunin for your expertise. I'll take your advise to investigate further on the system architecture. Hopefully will be able to resolve this issue.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Working out time differences

Hi everyone, I need to be able to write into a ksh script, a function that can look at 2 24 hour time variables and work out the difference between them. e.g job1 runs at 21:00 job2 runs at 01:00 diff = 04:00 hours I would also need negative numbers i.e where job1 runs after job2 ... (1 Reply)
Discussion started by: rik1551
1 Replies

2. Shell Programming and Scripting

Date/time differences

A thanks to all ahead of time. I've checked previous posts about this subject and can't find any that quite fit what I need. If I've missed the post could you point me there. When I do an ls -al I get the following output: -rw-r--r-- 1 staff staff 855 July 24 20:05 ... (4 Replies)
Discussion started by: gillr
4 Replies

3. Shell Programming and Scripting

comparing file content differences

I need to write a script to find out if there are any .c files created/removed from the last time i monitored the files available. i first created a file to contain all the .c files available on the system. (ls *.c > file1) I created another file using the same command. I used the comm file1... (4 Replies)
Discussion started by: RianTan
4 Replies

4. Solaris

comparing 2 Solaris servers

hello has anyone built a script that compares 2 Solaris servers? CPU, memory, swap, memory variables in /etc/system, Solaris version Could you please advise on how to make such a comparaison? thanks (9 Replies)
Discussion started by: melanie_pfefer
9 Replies

5. UNIX for Dummies Questions & Answers

Differences between time command and usr/bin/time

I wondered if someone could point out the differences between the time commmand and usr/bin/time and the accuracy one might have over another. Also, is there a website or two a person could maybe link for me to describe the differences? Thank you for your time. (2 Replies)
Discussion started by: icedrake
2 Replies

6. Shell Programming and Scripting

Comparing files columnwise and print the differences in third file

Hello Everybody!!!!!!!!! Request you to help me with the below mentioned issue: I have 2 files say, File 1: a|4|7 b|3|2 c|8|8 d|8|9 File 2: a|4|6 b|2|2 c|8|8 d|9|8 The third file(output file) should have: Data mismatch in row 1 column 3 Data mismatch in row 2 coumn 2 Data... (3 Replies)
Discussion started by: abhijeet1409
3 Replies

7. Shell Programming and Scripting

Perl: Comparing to two files and displaying the differences

Hi, I'm new to perl and i have to write a perl script that will compare to log/txt files and display the differences. Unfortunately I'm not allowed to use any complied binaries or applications like diff or comm. So far i've across a code like this: use strict; use warnings; my $list1;... (2 Replies)
Discussion started by: dont_be_hasty
2 Replies

8. Shell Programming and Scripting

Comparing two files and list the differences

Hi * I have two text files which has the file size, timestamp and the file name. I need to compare these two files and get the differences in the output format. Can anyone help me out with this. * cat file1.txt *474742 Apr 18* 2010 sample.log *135098 Apr 18* 2010 Testfile 134282 Apr 18* 2010... (7 Replies)
Discussion started by: Sendhil.Kumaran
7 Replies

9. Shell Programming and Scripting

Help comparing 2 files and sending differences

I have 2 files that need to be compared. Email the differences if something is different and don't email if nothing is different. One or both of the files could be empty. One or both could have data in them. example files backup.doc.$(date +%y%m%d) file size is 0 backup.doc.$(TZ=CST+24... (4 Replies)
Discussion started by: jabbott3
4 Replies

10. Shell Programming and Scripting

Comparing 2 xml files and print the differences only in output

Hi....I'm having 2 xml files, one is having some special characters and another is a clean xml file does not have any special characters. Now I need one audit kind of file which will show me only from which line the special characters have been removed and the special characters. Can you please... (1 Reply)
Discussion started by: Krishanu Saha
1 Replies
NTPDATE(8)						    BSD System Manager's Manual 						NTPDATE(8)

NAME
ntpdate -- set the date and time via NTP SYNOPSIS
ntpdate [-bBdoqsuv] [-a key] [-e authdelay] [-k keyfile] [-o version] [-p samples] [-t timeout] server ... DESCRIPTION
Note: The functionality of this program is now available in the ntpd(8) program. See the -q command line option in the ntpd(8) page. After a suitable period of mourning, the ntpdate utility is to be retired from this distribution. The ntpdate utility sets the local date and time by polling the Network Time Protocol (NTP) server(s) given as the server arguments to deter- mine the correct time. It must be run as root on the local host. A number of samples are obtained from each of the servers specified and a subset of the NTP clock filter and selection algorithms are applied to select the best of these. Note that the accuracy and reliability of ntpdate depends on the number of servers, the number of polls each time it is run and the interval between runs. The following options are available: -a key Enable the authentication function and specify the key identifier to be used for authentication as the argument key. The keys and key identifiers must match in both the client and server key files. The default is to disable the authentication function. -B Force the time to always be slewed using the adjtime(2) system call, even if the measured offset is greater than +-128 ms. The default is to step the time using settimeofday(2) if the offset is greater than +-128 ms. Note that, if the offset is much greater than +-128 ms in this case, it can take a long time (hours) to slew the clock to the correct value. During this time, the host should not be used to synchronize clients. -b Force the time to be stepped using the settimeofday(2) system call, rather than slewed (default) using the adjtime(2) system call. This option should be used when called from a startup file at boot time. -d Enable the debugging mode, in which ntpdate will go through all the steps, but not adjust the local clock. Information useful for general debugging will also be printed. -e authdelay Specify the processing delay to perform an authentication function as the value authdelay, in seconds and fraction (see ntpd(8) for details). This number is usually small enough to be negligible for most purposes, though specifying a value may improve timekeeping on very slow CPU's. -k keyfile Specify the path for the authentication key file as the string keyfile. The default is /etc/ntp.keys. This file should be in the format described in ntpd(8). -o version Specify the NTP version for outgoint packets as the integer version, which can be 1 or 2. The default is 3. This allows ntpdate to be used with older NTP versions. -p samples Specify the number of samples to be acquired from each server as the integer samples, with values from 1 to 8 inclusive. The default is 4. -q Query only - don't set the clock. -s Divert logging output from the standard output (default) to the system syslog(3) facility. This is designed primarily for conve- nience of cron(8) scripts. -t timeout Specify the maximum time waiting for a server response as the value timeout, in seconds and fraction. The value is rounded to a mul- tiple of 0.2 seconds. The default is 1 second, a value suitable for polling across a LAN. -u Direct ntpdate to use an unprivileged port for outgoing packets. This is most useful when behind a firewall that blocks incoming traffic to privileged ports, and you want to synchronise with hosts beyond the firewall. Note that the -d option always uses unpriv- ileged ports. -v Be verbose. This option will cause ntpdate's version identification string to be logged. The ntpdate utility can be run manually as necessary to set the host clock, or it can be run from the host startup script to set the clock at boot time. This is useful in some cases to set the clock initially before starting the NTP daemon ntpd(8). It is also possible to run ntpdate from a cron(8) script. However, it is important to note that ntpdate with contrived cron(8) scripts is no substitute for the NTP daemon, which uses sophisticated algorithms to maximize accuracy and reliability while minimizing resource use. Finally, since ntpdate does not discipline the host clock frequency as does ntpd(8), the accuracy using ntpdate is limited. Time adjustments are made by ntpdate in one of two ways. If ntpdate determines the clock is in error more than 0.5 second it will simply step the time by calling the system settimeofday(2) routine. If the error is less than 0.5 seconds, it will slew the time by calling the system adjtime(2) routine. The latter technique is less disruptive and more accurate when the error is small, and works quite well when ntpdate is run by cron(8) every hour or two. The ntpdate utility will decline to set the date if an NTP server daemon (e.g., ntpd(8)) is running on the same host. When running ntpdate on a regular basis from cron(8) as an alternative to running a daemon, doing so once every hour or two will result in precise enough time- keeping to avoid stepping the clock. ntpd(8). FILES
/etc/ntp.keys contains the encryption keys used by ntpdate. SEE ALSO
ntpd(8) BUGS
The slew adjustment is actually 50% larger than the measured offset, since this (it is argued) will tend to keep a badly drifting clock more accurate. This is probably not a good idea and may cause a troubling hunt for some values of the kernel variables kern.clockrate.tick and kern.clockrate.tickadj. BSD
January 6, 2000 BSD
All times are GMT -4. The time now is 04:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy