System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

HP-UX system: abnormal change date

SOLVED
Go to solution
Dags
Frequent Advisor

HP-UX system: abnormal change date

My system is running on hpux 11.11. My date changes frequently. I've already setup ntpdate to another server. But unfortunately this does not solve the problem. Any inputs?

TIA,
Dagz
21 REPLIES
TTr
Honored Contributor

Re: HP-UX system: abnormal change date

What is it changed to?
The same date each time?
The same offset than the current date?
The epoch date?
Does it happen at the same time of the dayweek?
Does it happen after a specific task is performed?

All these will determine if it is a hardware issue or something changes the date deliberately.
James R. Ferguson
Acclaimed Contributor

Re: HP-UX system: abnormal change date

Hi:

Running 'ntpdate' is only going to occur periodically. Running 'ntp' (the 'xntpd' daemon) allows continuous synchronization to reliable time sources.

That said, if your local system time is drifting vastly from true time, your server battery for providing power to the internal clock may need replacement.

Regards!

...JRF...
Dags
Frequent Advisor

Re: HP-UX system: abnormal change date

What is it changed to? to current date
The same date each time? no
The same offset than the current date? no
The epoch date? i don't know
Does it happen at the same time of the dayweek? only on saturdays
Does it happen after a specific task is performed? not sure... we are running billrun. we need specific date for this not the current date.

thanks for your reply
Dags
Frequent Advisor

Re: HP-UX system: abnormal change date

i don't think that it's the battery... although the server is a bit old.
James R. Ferguson
Acclaimed Contributor

Re: HP-UX system: abnormal change date

Hi (again):

> Does it happen at the same time of the dayweek? only on saturdays

How very interesting. That would point to something done specifically on *your* server.

> Does it happen after a specific task is performed? not sure... we are running billrun. we need specific date for this not the current date.

So, you need a *specific date*. Does that mean that your application (or a wrapper around it; or an operator) is actually changing the system date? If so, you have problems in logging, software source control, auditing, etc. You can "manufacture" a date argument for your billing application and pass it to it.

Regards!

...JRF...
Dags
Frequent Advisor

Re: HP-UX system: abnormal change date

If my system date change, how will I know what causes that to happen, which user did that, how did that happens? I think this could help me.
Patrick Wallek
Honored Contributor

Re: HP-UX system: abnormal change date

>>we are running billrun. we need specific date for this not the current date.

So rather than inputting a date into the software, you change the system date? If that is the case, then I would guess that is probably your problem.

Dags
Frequent Advisor

Re: HP-UX system: abnormal change date

>So, you need a *specific date*. Does that mean that your application (or a wrapper around it; or an operator) is actually changing the system date? If so, you have problems in logging, software source control, auditing, etc. You can "manufacture" a date argument for your billing application and pass it to it.
And additional info, earlier the server changes the date before the script/jobs executed.

No, I think only superusers could change the date, right? that user is not superuser.

>So rather than inputting a date into the software, you change the system date? If that is the case, then I would guess that is probably your problem.

Yes, I'm the one who change the date to another date, but not to current date, and that's my problem. For example, I'll be using Nov. 2, 2010 date, then after for a while it changes back to Oct. 16, 2010. Hope I'm being clear with this. :)

Regards,
Dagz
Patrick Wallek
Honored Contributor

Re: HP-UX system: abnormal change date

>>Yes, I'm the one who change the date to
>>another date, but not to current date, and
>>that's my problem. For example, I'll be
>>using Nov. 2, 2010 date, then
>>after for a while it changes back to
>> Oct. 16, 2010. Hope I'm being
>>clear with this. :)

OK, I'm slightly confused! Is the problem that the date is changing **FROM** a future date back to the current date?

If so -- You mentioned above that you implemented 'ntpdate' to get a date from another server. How often does ntpdate run? What is the date on the other server? If the other servers date is current, then ntpdate will reset the date.

Dags
Frequent Advisor

Re: HP-UX system: abnormal change date

>OK, I'm slightly confused! Is the problem that the date is changing **FROM** a future date back to the current date?

>If so -- You mentioned above that you implemented 'ntpdate' to get a date from another server. How often does ntpdate run? What is the date on the other server? If the other servers date is current, then ntpdate will reset the date.

Sorry for the confusion. Let me explain again. I want the server to be dated to November 2, 2010, but it changes back to current date constantly. For temporary fix, I created a NTP server, and sync my server to it. My NTP server has November 2, 2010 date. After a few minutes, my server system time will revert back to current date, which is not normal cause I have xntpd service running.
James R. Ferguson
Acclaimed Contributor
Solution

Re: HP-UX system: abnormal change date

Hi (again):

> For temporary fix, I created a NTP server, and sync my server to it. My NTP server has November 2, 2010 date. After a few minutes, my server system time will revert back to current date, which is not normal cause I have xntpd service running.

NTP works using Epoch time (the number of seconds since January 1, 1970). What your or your server perceive as the correct local *date* and *time* is based on an offset from this UTC. This offset is your timezone ('TZ').

All said, you can't pretend that the *date* is a value disassociated from the *time* and run NTP. NTP will correct the server's time (and date) exactly as it is supposed to do.

Regards!

...JRF...
Dags
Frequent Advisor

Re: HP-UX system: abnormal change date

>All said, you can't pretend that the *date* is a value disassociated from the *time* and run NTP. NTP will correct the server's time (and date) exactly as it is supposed to do.

If I disable my ntp service, will this solve my problem?
vishnu.khandare
Respected Contributor

Re: HP-UX system: abnormal change date

Hi Dags,

Yes by stopping ntp serive ur problem will solve.
From ur last replies ur setting the date to Nov 2 2010, todays date is Oct 16 2010.
If ntp service is running it will definately sync to current date.

Hope this solves ur issue.

Regards
Vishnu Khandare
You should deserve before U desire!!!!
James R. Ferguson
Acclaimed Contributor

Re: HP-UX system: abnormal change date

Hi (again):

> If I disable my ntp service, will this solve my problem?

If, by solve, you mean prevent the bogus date/time from being adjusted to a correct value, yes, but you have a system with logs, audits, source control, password expiration's, etc. that is seriously out-of-sync. If you have any databases, you have compromised their recover-ability by fudging the date backwards and forwards.

Regards!

...JRF...
Dags
Frequent Advisor

Re: HP-UX system: abnormal change date

>Yes by stopping ntp serive ur problem will solve.
>From ur last replies ur setting the date to Nov 2 2010, todays date is Oct 16 2010.
If ntp service is running it will definately sync to current date.

But my NTP server is set to Nov. 2, 2010. And my server is sync with it. Question is, why does my NTP kept the Nov 2 date while my other server always revert to current date.

-I already stopped the xntpd service.
-Also stopped cron servcie, just in case.


I also found this in my /var/adm/syslog/syslog.log: Oct 16 22:47:49 jupiter lwiod[6623]: GSS-API error calling gss_init_sec_context: -1765328352 (Ticket expired)

This shows every time my server goes to current date.
Dags
Frequent Advisor

Re: HP-UX system: abnormal change date

>If, by solve, you mean prevent the bogus date/time from being adjusted to a correct value, yes, but you have a system with logs, audits, source control, password expiration's, etc. that is seriously out-of-sync. If you have any databases, you have compromised their recover-ability by fudging the date backwards and forwards.

@JRF

Hi, I stopped xntpd service but still my date revert to current date. I understand the risk on changing my system time, but this is part of my project.

Thanks.

mwernher
Occasional Visitor

Re: HP-UX system: abnormal change date

Hi!

Is there a possibility that a remote NTP server is pushing a current date change to this server? Is there a way we can check it?
James R. Ferguson
Acclaimed Contributor

Re: HP-UX system: abnormal change date

Hi (again):

> But my NTP server is set to Nov. 2, 2010. And my server is sync with it. Question is, why does my NTP kept the Nov 2 date while my other server always revert to current date.

Another feature of NTP is that if the difference between the time on the local server and the time source is about 1000 seconds, any attempt at synchronization is denied. This is to prevent "insane" jumps in time.

I didn't fully appreciate that your time source (server) was set to a future timestamp.

I believe that you are never synchronizing to the future time in the first place. You can verify this with:

# ntpq -pn

Also, to be clear, are you actually running 'xntpd' or are you only periodically running 'ntpdate' as from a crontask?

Regards!

...JRF...

Dags
Frequent Advisor

Re: HP-UX system: abnormal change date

>Also, to be clear, are you actually running 'xntpd' or are you only periodically running 'ntpdate' as from a crontask?

Normally we do it via cron. I just did xntpd a while ago because I thought other cron jobs were causing the change date.
Dags
Frequent Advisor

Re: HP-UX system: abnormal change date

Will not assign any points to mwernher. He's my teammate, also here to investigate.
Dags
Frequent Advisor

Re: HP-UX system: abnormal change date

Hi,

Please help us on this issue. :(