Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
this could happen hundreds of times during a day, and ruined our service. do you know why this is happening ?
Server info:
ubuntu 14.04
kernel: 4.9.0
we are using ntp to sync time:
ntpd 4.2.6p5
Quote:
remote refid st t when poll reach delay offset jitter
==============================================================================
+61.216.153.105 118.163.81.63 3 u 902 1024 321 32.320 9.831 4.736
+46.31.185.18 77.40.226.114 2 u 1031 1024 367 311.879 -30.550 27.890
176.9.118.9 192.53.103.108 2 u 41h 1024 0 288.055 -17.100 0.000
*173.255.215.209 127.67.113.92 2 u 636 1024 377 189.785 11.539 4.749
123.59.63.20 .INIT. 16 u - 1024 0 0.000 0.000 0.000
ntp config
Quote:
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org
server ntp.ubuntu.com
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
Last edited by hilou; 04-28-2017 at 11:58 PM.
Reason: ubuntu,ntp,time
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
I don't think the system time actually changed. The log file might have been parsed incorrectly, or there may have been a long delay in reporting. I'm not clear as to whether this "could" happen hundreds of times, or if it "did" happen hundreds of times.
Ntp will ignore servers that are off by over a certain amount. It would not suddenly change the time by 48 hours.
Last edited by AwesomeMachine; 04-29-2017 at 02:36 AM.
I don't think the system time actually changed. The log file might have been parsed incorrectly, or there may have been a long delay in reporting. I'm not clear as to whether this "could" happen hundreds of times, or if it "did" happen hundreds of times.
Ntp will ignore servers that are off by over a certain amount. It would not suddenly change the time by 48 hours.
Hi, Thanks for the reply. But it did happen lots of times. Please reference to the below:
Is there any remote logging to that server from elsewhere? Besides the date/time issue, I find the wide variation in PIDs very strange. What does your syslog.conf/rsyslog.conf look like?
I don't like this kind of answer, but at this moment I can only say: you need to wait. I found this also, and I will go into it, but you need to wait a few days, because at this moment I'm busy with other things/tasks.
not saying that's the straight way to a solution, just the first thing i can think of to get more insight into the matter.
many more troubleshooting steps are possible, i suppose.
it is up to you to perform them.
I have figured this out. It has nothing to do with the server time. It's because of the chaotic log of crond.
I think it would be very helpful if you could please provide a more-detailed explanation of what you just said there. "Don't be cryptic!" You're writing to the next poor soul ... ... who is trying to wrap his/her head around the very same problem, and they just stumbled-upon this thread. (Five years from now.) Write to them.
(Then, please mark the thread as [SOLVED].)
Last edited by sundialsvcs; 05-12-2017 at 10:46 AM.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
I'm assuming that you have a server that is snycronized to an external NTP timee server and is providing time to other machines on your LAN?; that would be the normal way to keep everybody on time.
NTP will not synchronize if the system time is more than 600 seconds off. It also will not slew time by hours or days. Once your local NTP is synchroized to an external time source it will slowly walk you system time into synchronization (over days, not instantly).
I notice that nobody else has asked so I will: what are those crontabs doing? Do you have statistics enabled and are you comparing logs against one another across servers? (Typically, you would keep peerstats and statistics on the time server on your LAN, not on servers that are synchronized to your local time seerver.)
The last line looks like the server time changed in a sudden, but actually it means on Apr 27 19:48:01, a cronjob ran with pid 30929, and for some reason the log printed to syslog after this line (Apr 29 08:30:01 localhost CRON[30206].
how to prove this:
Let's suppose the cronjob of the last line executed every minutes. Then you could only find one timestamp: Apr 27 19:48:01 in the whole log.
The point is: Time of server is fine. But the log to syslog is not fine. We expect syslog to log order by time, but it didn't. but I don't know what caused this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.