- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- disable a client from NTP and set NTP timing backw...
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
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
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-13-2003 07:27 PM
тАО02-13-2003 07:27 PM
My Primary NTP Server :(cook:10.4.37.26)
/etc/ntp.conf contains
server 127.127.1.1 #local clock
peer 10.4.37.27
/etc/rc.config.d/netdaemons contains
export NTPDATE_SERVER=
export XNTPD=1
export XNTPD_ARGS=
My Secondary NTP Server :(Buller:10.4.37.27)
/etc/ntp.conf contains
server 127.127.1.1 #local clock
peer 10.4.37.26
/etc/rc.config.d/netdaemons contains
export NTPDATE_SERVER=cook
export XNTPD=1
export XNTPD_ARGS=
All my Clients
/etc/ntp.conf contains
server cook
server buller
server 127.127.1.1 #local clock in case of disaster
/etc/rc.config.d/netdaemons contains
export NTPDATE_SERVER=cook
export XNTPD=1
export XNTPD_ARGS=
Now i want to set the date backwards to more than a year to do some application BCRT for another two months .... how do i do this?
If i change the time of NTP Server (Primary) will it automatically reflect in all NTP clients immediately, say within next 10 minutes??
Do i need to restart the xntpd services in all my clients ??
2. In the above process i need to exclude one server which is our backup server from this date change, since we use this server for backup of other machines also. How do i disable the NTP Client on this machine???
Thanks for all your guidance, in advance ...
Cheers
-bala-
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2003 07:44 PM
тАО02-13-2003 07:44 PM
Re: disable a client from NTP and set NTP timing backwards
Use the date command or SAM to change the system date and time and you are okay unless you need to reboot.
If you need to reboot, you'll need to disable automatic startup of the xntpd daemon.
Best way to do that on a temporary basis is to comment out the activation line in /sbin/init.d/xnptd
Good Luck.
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
тАО02-13-2003 07:51 PM
тАО02-13-2003 07:51 PM
Re: disable a client from NTP and set NTP timing backwards
I want to set time back on all my machines except the backup server. If i change my time in my Primary NTP Server, i would like to know whether all my clients will set their time backwards automatically??
I want to disable one client, my backup server, from this time change so that it will continue with the current date/time.
cheers
-bala-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2003 09:19 PM
тАО02-13-2003 09:19 PM
Re: disable a client from NTP and set NTP timing backwards
Sometimes when the time difference is more then there can be problems.So you can do a ntpupdate on the client.
You can exclude the backup server by editing the /etc/ntp.conf file and removing the line which has the "server" and also modifying the /etc/rc.config.d/netdaemons and changing the XNTPD=0 and XNTPD_SERVER=
and doing a /sbin/init.d/xntpd stop
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2003 09:22 PM
тАО02-13-2003 09:22 PM
Re: disable a client from NTP and set NTP timing backwards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2003 12:28 AM
тАО02-14-2003 12:28 AM
Re: disable a client from NTP and set NTP timing backwards
BTW if i want to revert the backup server as NTP client, all i need to do is just undo the changes made in /etc/conf & /etc/rc.config.d/netdaemons and start xntpd.
Correct me if i need to something more ...
cheers
-bala-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2003 12:32 AM
тАО02-14-2003 12:32 AM
Re: disable a client from NTP and set NTP timing backwards
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2003 01:33 AM
тАО02-14-2003 01:33 AM
Re: disable a client from NTP and set NTP timing backwards
One last question, my Secondary NTP Server (ie., buller) doesn't have "server 10.4.37.26" but instead it have "peer 10.4.37.26".
What does this mean ??? when setting time backwards, do i need to do it on both primary and secondary servers?? Or setting time in Primary Server will be sufficient ???
Cheers
-bala-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2003 01:40 AM
тАО02-14-2003 01:40 AM
Re: disable a client from NTP and set NTP timing backwards
Because 'peer' means that the synchronizations happens vice versa.
Like secondary server synchronized to primary server and the primary server syncronized to the secondary server.
This scenario is for failure scenario and is for redundancy.
Like a PDC and BDC.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2003 06:48 PM
тАО02-16-2003 06:48 PM
Re: disable a client from NTP and set NTP timing backwards
I had successfully changed the NTP on my network .... but here are some points i want to share with you ....
I changed my system date on NTP Primary Server to year 2002 ... but my NTP Secondary Server and all my clients didn't change their time automatically even after 15 minutes ...
so i log into each of the client machines and did the following :
/sbin/init.d/xntpd stop
ntpdate ntpserverIP
/sbin/init.d/xntpd start
then the timing on the machine has been changed to that of NTP Server .....
Would like to know why it is so ?? I need to set my date back every friday, so that my application testing will carry out with the specified date range every week ...
cheers
-bala-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2003 09:20 PM
тАО02-16-2003 09:20 PM
Re: disable a client from NTP and set NTP timing backwards
For example, if the client were out of sync by 10 minutes with the server, it would take 4-8 HOURS to adjust the time on the client, but only if there were no other NTP sources for the client, or all the sources had a reasonably close time value.
NTP will never change the date/time days or weeks forward or reverse. This can only be done using ntpdate which forces a step-change in the date/time. This is done during bootup. NOTE: I would be VERY concerned if you change the date on running machines! Every program, database and even cron/at will be very confused by an online change and for a reboot change, logfiles will be out of order (like wtmp, syslog.log, mail.log, etc). I would hope that these are crash-and-burn machines and not production because the ramifications may be very hard to track down and fix.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2003 10:48 PM
тАО02-16-2003 10:48 PM
Re: disable a client from NTP and set NTP timing backwards
These machines are our would-be PRODuction machines .... we want to test our applications performance, reliability, etc on these production systems apart from development and test machines ..... We will set the time back to current one before the application goes live ....
There is a specific need to set our system time to 01/april/2002 to do the test since our test data is as of 31/march/2002 .....
Every friday morning the data will be refreshed with a master copy we had kept as backup and various testing and fixing will go on up to next friday when the data is again refreshed ...
On every friday after refreshing the data, all my systems date must be set to 01/April/2002 before starting all applications on various servers ....
In our development and product test environments i had created a cron job to set the date backwards on every friday morning ....
But in out production environment, NTP thing is configured ..... how do i automate the date change ????
thanks
-bala-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2003 07:49 AM
тАО02-17-2003 07:49 AM
SolutionIn fact, your ntp daemon should not even START if the clocks vary by over 1000 seconds! That's why you have to use the ntpdate command before anything works.
Before NTPd came along, most of us used rdate to synchronize our clocks. We'd put it in the crontab and forget about it. You could take a similar approach.
FIRST, turn OFF NTPd on each client of interest! (Trust me....)
NEXT: Create a simple script that uses rsh or ssh to run against each client:
rsh -l root
or
rsh -l root
This is your "update everyone" script.
Congratulations - when you run this script, everyone is sync'd to server cook.
NEXT: You still need some regular time synchronization, since you will run for a week between resets (if I understand it correctly.) Put a line in each CLIENT's crontab to run:
0 * * * * ntpdate cook
to run once an hour.
LASTLY - Although you shouldn't have to, I would highly recommend that you stop any other hosts from even asking cook for the time of day.
He's *wrong* compared to everyone else, so he's not to be trusted. Normally, an NTP client will recognize that "cook" is wrong, and deliberately mark it as not trusted. I wouldn't want to risk the rest of the production environment by confusing their dates.
Remember to comment out the "peer" statements from both cook AND buller ntp.conf scripts. This means stop both ntpd processes, edit both conf files, put cook's clock back into the past, then start both ntpds.
Two Other Useful Suggestions:
1) Don't use "cook" as your time source, use one of your clients instead. That way, you won't have to do any editing in the production environment, merely editing on your special clients.
2) If you use "ntpdate" to sync with, then you will need ntpd running on a client as an NTP server. Therefore I would suggest tp use "rdate" as your sync'ing tool instead.
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2003 08:39 PM
тАО02-17-2003 08:39 PM
Re: disable a client from NTP and set NTP timing backwards
But rdate is not available in my servers ....
& rsh is disabled in all my servers except the backup server due to security reasons by the client .....
so the solution i assume, is to change the machine time on all my clients individually by creating cron entries in each clients to execute ntpdate, after making changes to the ntp server time ...
FYI i'm a DBA and doing system admin as beginner .....
cheers
-bala-