- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- NTP Script
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
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
02-05-2003 07:45 AM
02-05-2003 07:45 AM
NTP Script
thanks,
sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 08:01 AM
02-05-2003 08:01 AM
Re: NTP Script
Rgrds,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 08:07 AM
02-05-2003 08:07 AM
Re: NTP Script
I would think it more pertinant to have local scripts to ensure that ntp client services are running and restart if necessary.
Just my 2 cents though.
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 08:10 AM
02-05-2003 08:10 AM
Re: NTP Script
As far as ITO is concerned, I am not exactly sure how our ITO is set up exactly, but it does pick up NTP problems automatically. So if it ever loses connection with our main time server, it reports a message. And I know that I didn't set up anything within NTP to do that, so it must be ITO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 08:26 AM
02-05-2003 08:26 AM
Re: NTP Script
either have a list of machines in a loop on the ntp server or on each machine
telnet ntp-server daytime;date
and compare the results
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 05:11 AM
02-06-2003 05:11 AM
Re: NTP Script
. schedule on each system
or
. have a list of machines and do remotely
the following:
/usr/sbin/ntpq -p
This shows whether the system is in sync with its servers and/or peers.
An '*' in the state column (1st character) says "synced".
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 05:36 AM
02-06-2003 05:36 AM
Re: NTP Script
(on one command line)
golf ## remsh ntp-server -l rb date ; date
Thu Feb 6 08:22:52 EST 2003
Thu Feb 6 08:22:52 EST 2003
If the two times come back the same or within one second, then you're fairly (but only fairly ;>) sure that things are working, at least to within the network delay.
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 05:50 AM
02-06-2003 05:50 AM
Re: NTP Script
I am using the remote capabilities of ntp to provide me the answers.
ntpq -p
The big bonus is that you don't need rsh, ssh or other rights to run your test
You'll either get back:
no answer,
Permission denied
or NTP data and stats.
If you get correct data, then parse for an entry starting with an asterisk. If there is one, you are synchronized to some NTP host somewhere. Of course, you could filter to known hosts, confirming you are properly synchronizing to the right places.
Since I am a Perl newbie, this could take a bit of time. (I opted to use perl to force myself to learn it.)
kinney@crd.ge.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 05:57 AM
02-06-2003 05:57 AM
Re: NTP Script
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 08:30 AM
02-06-2003 08:30 AM
Re: NTP Script
### Date check script, run only in cron
SHOUR=`/usr/bin/date +%H`
SMIN=`/usr/bin/date +%M`
for x in `cat /fileofservers`
do
CHOUR=`remsh $x "/usr/bin/date +%H"`
CMIN=`remsh $x "/usr/bin/date +%M"`
if [[ $SHOUR -ne $CHOUR ]]
then
opcmsg severity=major application=time object=hours msg_t="The time value in hours is incorrect" node=$x
fi
if [[ $SMIN -ne $CMIN ]]
then
opcmsg severity=minor application=time object=hours msg_t="The time value in minutes is incorrect" node=$x
fi
done
set this to run in your cron so it begins at the turn of a new min, as long as you do not have 30 or more servers it should never run more then a minute ... (not withstanding over utilization of the processors)
configure ITO/OPO to handle this acrodingly