output of ntpq -p


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users output of ntpq -p
# 1  
Old 03-19-2009
output of ntpq -p

Howdy guys,

I have 2 sun solaris server(T200) in cluster mode.

I put the command below ntpq -p.

I need your help to understand the output. I plan to change the date and time in both server.

Code:
[solaris1] node1:/home/mydir> ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 LOCAL(0)        LOCAL(0)         3 l   20   64  377     0.00    0.000   10.01
 clusternode1-pr 0.0.0.0         16 -    - 1024    0     0.00    0.000 16000.0
*clusternode2-pr LOCAL(0)         4 u  528 1024  377     0.66    0.029    0.60


[solris2] node2:/home/mydir> ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
*LOCAL(0)        LOCAL(0)         3 l    5   64  377     0.00    0.000   10.01
 clusternode1-pr clusternode2-pr  5 u  608 1024  376     0.64   -0.038   15.12
 clusternode2-pr 0.0.0.0         16 -    - 1024    0     0.00    0.000 16000.0

Thnks,
purple
# 2  
Old 03-19-2009
What exactly do you not understand about the output?
# 3  
Old 03-19-2009
Quote:
Originally Posted by pludi
What exactly do you not understand about the output?
what is *clusternode2-pr *LOCAL(0) means?

If i enter the date command and change the date in NODE 1; Will NODE 2 automitically syncronize the time from Node1?

#date mmddhhmmyy

$ ps -ef | grep ntp
root 541 528 0 Mar 02 ? 1:27 /usr/lib/inet/xntpd
root 528 1 0 Mar 02 ? 2:38 /usr/lib/inet/xntpd

$cat /etc/inet/ntp.conf
#...
server 127.127.1.0
peer clusternode1-priv prefer
peer clusternode2-priv
peer clusternode3-priv
peer clusternode4-priv
peer clusternode5-priv
peer clusternode6-priv
peer clusternode7-priv
peer clusternode8-priv
peer clusternode9-priv
peer clusternode10-priv
peer clusternode11-priv
peer clusternode12-priv
peer clusternode13-priv
peer clusternode14-priv
peer clusternode15-priv
peer clusternode16-priv

# Drift file (optional)
driftfile /var/ntp/ntp.drift
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable

-----------------------------

Last edited by thepurple; 03-19-2009 at 04:12 PM..
# 4  
Old 03-20-2009
Allow me to use your first post as reference
Code:
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 LOCAL(0)        LOCAL(0)         3 l   20   64  377     0.00    0.000   10.01
 clusternode1-pr 0.0.0.0         16 -    - 1024    0     0.00    0.000 16000.0
*clusternode2-pr LOCAL(0)         4 u  528 1024  377     0.66    0.029    0.60

  • The asterisk indicates the prefered update node (where first to try to get the time).
  • remote is the address of the time server, with LOCAL(0) indicating the local clock.
  • refid indicated the type of the time server. LOCAL or .LCL. means local, .DCFa. is a DCF77 receiver, .PPS. is a hardware device generating a pulse every second.
  • st is the Stratum, which indicates the accuracy to be expected. Stratum 0 are usually atomic clocks, Stratum 1 might be radio controlled clocks.
  • when is the time to the next update.
  • poll is the count that when has to reach before an update is attempted
  • reach is an octal number that is left-shifted on each update. On a successful update an 1 is shifted in, 0 otherwise.
  • delay is the RTT to the time server
  • offset is the difference between the remote and the local clock
The way it's setup currently, your two servers only synchronise themselves locally and not to each other (which wouldn't be that good of an idea anyways without an additional good external source). Go to pool.ntp.org, pick a pool geographically close to you, and add it to your ntp.conf.
This User Gave Thanks to pludi For This Post:
# 5  
Old 03-20-2009
million thanks pudi to explain it.

for some reason i will not go to synchronize the time with external NTP server.

now need a advise. As you said- two servers only synchronise themselves locally and not to each other.

I have two server are cluster mode and Oracle RAC is running

To change the time and date can I change it one after another in node 1 and Node2 (with date command)?? I don't want to restart the cluster and Oracle RAC.

will it be effect anything in cluster environment.

-purple
# 6  
Old 03-20-2009
I'll take the same output as reference again:
Code:
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 LOCAL(0)        LOCAL(0)         3 l   20   64  377     0.00    0.000   10.01
 clusternode1-pr 0.0.0.0         16 -    - 1024    0     0.00    0.000 16000.0
*clusternode2-pr LOCAL(0)         4 u  528 1024  377     0.66    0.029    0.60

Your problem is that "clusternode2-priv" cannot synchronise with "clusternode1-priv", as indicated by a reach of 0 (means no successful update during the last 8 attempts, each attempt 1024 seconds apart = about 2 hours 15 minutes). This can have several causes
  • No NTP server on the other node
  • No route to the other host
  • Unable to resolve the hostname to an IP address
I'd suggest changing the ntp.conf on node 1 to be the primary time source (no sync to node 2), and on node 2 to sync from node 1, synching every minute. That way you'll only have to change the time on node 1, and node 2 will catch up a minute later.
# 7  
Old 03-20-2009
Okay. What entry i should change in the ntp.conf for both node1 and node2?

$cat /etc/inet/ntp.conf
#...
server 127.127.1.0
peer clusternode1-priv prefer
peer clusternode2-priv
peer clusternode3-priv
peer clusternode4-priv
peer clusternode5-priv
peer clusternode6-priv
peer clusternode7-priv
peer clusternode8-priv
peer clusternode9-priv
peer clusternode10-priv
peer clusternode11-priv
peer clusternode12-priv
peer clusternode13-priv
peer clusternode14-priv
peer clusternode15-priv
peer clusternode16-priv

# Drift file (optional)
driftfile /var/ntp/ntp.drift
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Ntpq - when=9d - not right?

Problem with external aerial and galleonm time server just turned back on. I'm guessing this is telling me its not worked for 9 days? Should I now force a poll or wait? $ntpq -p remote refid st t when poll reach delay offset disp... (2 Replies)
Discussion started by: psychocandy
2 Replies

2. Shell Programming and Scripting

Problem in ntpq

Hi i an not able to understand what below command in saying in its O/P what i understand is the astrick(*) one is acting as a ntp master. but not able to understand what insane and sys.peer here means. # ntpq ntpq> pe remote refid st when poll reach delay ... (2 Replies)
Discussion started by: scriptor
2 Replies

3. Red Hat

What fields we need to consider ntpq -p output?

In our environment we used to lot of events for ntp issues. I am unable to find the what needs to consider here. :( ntpq -p fields. remote refid st t when poll reach delay offset jitter ---------- Post updated at 05:13 AM ---------- Previous update was at 04:47 AM... (1 Reply)
Discussion started by: Naveen.6025
1 Replies

4. Red Hat

Command understanding the output file destination in case of standard output!!!!!

I ran the following command. cat abc.c > abc.c I got message the following message from command cat: cat: abc.c : input file is same as the output file How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies

5. Shell Programming and Scripting

Displaying log file pattern output in tabular form output

Hi All, I have result log file which looks like this (below): from the content need to consolidate the result and put it in tabular form 1). Intercomponents Checking Passed: All Server are passed. ====================================================================== 2). OS version Checking... (9 Replies)
Discussion started by: Optimus81
9 Replies

6. Shell Programming and Scripting

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

7. Shell Programming and Scripting

Awk script to run a sql and print the output to an output file

Hi All, I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file. Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies

8. Shell Programming and Scripting

awk: round output or delimit output of arithmatic string

I have a file with the following content. > cat /tmp/internetusage.txt 6709.296322 30000 2/7/2010 0.00I am using the following awk command to calculate a percentage from field 1 and 2 from the file. awk '{ print $1/$2*100 }' /tmp/internetusage.txt This outputs the value "22.3643" as a... (1 Reply)
Discussion started by: jelloir
1 Replies

9. Shell Programming and Scripting

top output for six processes with the same name, output changed from column to row

Hi, I have a system under test, and I use a script that does a ps. The output, is in the following format, it's basically the timestamp, followed by the rss and vsize. 09:03:57 68404 183656 68312 181944 69860 217360 67536 182564 69072 183172 69032 199276 09:04:27 68752 183292 70000 189020... (5 Replies)
Discussion started by: Bloke
5 Replies

10. Shell Programming and Scripting

how to make a line BLINKING in output and also how to increase font size in output

how to make a line BLINKING in output and also how to increase font size in output suppose in run a.sh script inside echo "hello world " i want that this should blink in the output and also the font size of hello world should be big .. could you please help me out in this (3 Replies)
Discussion started by: mail2sant
3 Replies
Login or Register to Ask a Question