- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: checking ntp is running and synching
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 04:08 AM
12-03-2003 04:08 AM
checking ntp is running and synching
I use ntpq -p and its output is
remote refid st t when poll reach delay offset disp
==============================================================================
*ntpsvr1.m1.com 8.m1.com 5 u 62 64 377 1.07 -0.174 0.08
Can someone advice how to write a simple scripts to check if the ntp is synching with the time server? what does all those column means?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 04:20 AM
12-03-2003 04:20 AM
Re: checking ntp is running and synching
rc=$?
if [ $rc -eq 0 ] then
echo "NTP is working"
else
echo "NTP is not working"
fi
columns(I don't know many)
remote server providing the ntp time
The last few involve the adjustment/difference between the time serer and the server making the query.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 04:21 AM
12-03-2003 04:21 AM
Re: checking ntp is running and synching
How to check if ntp is syncing with time server. I do this for that.
telnet time_server 13
telnet localhost 13 OR date
And compare the times on both machines.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 04:22 AM
12-03-2003 04:22 AM
Re: checking ntp is running and synching
actually I cannot give you fully proof definitions for each column but what is important is that the value under "reach" increases. this indicates the number of successfull polls.
So you could write script that every hour or two checks that the value actually increases.
Regards,
Bernhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 04:23 AM
12-03-2003 04:23 AM
Re: checking ntp is running and synching
Have a look to KBRC00001347 for columns explanation. I agree with you that it's not so obvious ... :^)
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 04:28 AM
12-03-2003 04:28 AM
Re: checking ntp is running and synching
# ps -aef | grep xntpd.
If needed, you can add ntpq and ps commands in crontab and run it on a regular interval to see if it's working properly. To find out more about the process:
# man xntpd
# man ntpq
Also, refer this book:
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000071549972
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 07:12 AM
12-03-2003 07:12 AM
Re: checking ntp is running and synching
The trick to verifying that it is syncing is to check for the * next to one of the timeservers in the first column. If it is not there, then time sync is at best degrading.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=210263
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 07:20 AM
12-03-2003 07:20 AM
Re: checking ntp is running and synching
Just check your syslog.log file
grep ntp /var/adm/syslog/syslog.log
If you have sync statements in there & nothing else - you'll be as accurate as the NTP server(s).
Rgds,
Jeff