- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Ntp problem
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
10-17-2002 12:54 AM
10-17-2002 12:54 AM
I configured my system to use local ntp server using its internal clock.I installed patch phne_19710. My system contains one ntp server and three ntp clients. All hpux 10.20. I moved time on ntp server 2 minutes forward and after 10 minutes all clients
was synchronized to the server's time. But synchronization occurs immediately i.e. client's clock jumps 2 minutes in one second and this may cause application problem.
If this is correct?
Why ntp client doesn't correct its time slowly as in command ntpdate -B server?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2002 05:06 AM
10-17-2002 05:06 AM
SolutionYour NTP server should not vary much.
If you need to slew clock time, here is a C program that I use.
#include
#include
#include
int call_adjtime(delta, olddelta)
struct timeval *delta;
struct timeval *olddelta;
{
int retval;
retval = adjtime(delta, olddelta);
if(retval != 0) {
perror("adjtime");
}
return(retval);
}
main(argc, argv)
int argc;
char **argv;
{
char *prog;
struct timeval delta, olddelta;
int retval;
if((prog = (char *)rindex(*argv, '/')) == NULL) {
prog = *argv;
}
else {
prog++;
}
if(argc != 2) {
fprintf(stderr, "Usage: %s seconds\n", prog);
exit(1);
}
delta.tv_sec = atoi(argv[1]);
delta.tv_usec = 0;
olddelta.tv_sec = 0;
olddelta.tv_usec = 0;
retval = 1;
while(retval != 0) {
retval = call_adjtime(δ, &olddelta);
}
for(;;) {
delta.tv_sec = olddelta.tv_sec;
delta.tv_usec = olddelta.tv_usec;
call_adjtime(NULL, &olddelta);
if(olddelta.tv_sec == 0 && olddelta.tv_usec == 0) {
if(delta.tv_sec == 0 && labs(delta.tv_usec) < 100000) {
break;
}
else {
call_adjtime(δ, &olddelta);
call_adjtime(NULL, &olddelta);
}
}
printf("remained %d.%06d\n", olddelta.tv_sec, labs(olddelta.tv_usec));
sleep(1);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2002 05:37 AM
10-17-2002 05:37 AM
Re: Ntp problem
http://bizforums.itrc.hp.com/cm/QuestionAnswer/1,,0x1e80e78d8c50d611abdb0090277a778c,00.html
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2002 06:26 AM
10-17-2002 06:26 AM
Re: Ntp problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2002 06:31 AM
10-17-2002 06:31 AM
Re: Ntp problem
If you need to adjust it slowly adjust the server slowly via the "date -a" command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2002 10:26 AM
10-18-2002 10:26 AM