LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-08-2015, 01:18 PM   #1
ron7000
Member
 
Registered: Nov 2007
Location: CT
Posts: 248

Rep: Reputation: 26
linux reads system clock wrong, how to disable ?


using SLES 11.3, I updated from 10.4.
Now when the system boots it spits out an error saying either cannot read system clock or time is wrong, and the time in linux sets to 00:00:00 and the year goes to 2013 or 2005... sometime in the past.

When the system shuts down, it tries to write the time in linux back to the hardware system clock, and it does that wrong too then screwing up the hardware system clock.
I found in system services I can turn off the boot.clock service so it does not write and screw up the system clock.

so right now my hardware system clock stays correct and does not get modified. But how can i fix linux from either incorrectly reading the hardware system clock, or prevent it from reading it in the first place?
 
Old 03-08-2015, 01:23 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Set up NTP and pull time from a regional pool.
At least, that's what I'd try first.
 
Old 03-08-2015, 01:37 PM   #3
ron7000
Member
 
Registered: Nov 2007
Location: CT
Posts: 248

Original Poster
Rep: Reputation: 26
can you elaborate on "regional pool" and how to set up ntp ?
I've never had luck with ntp because i'm behind a firewall and proxy server.
but i have other linux systems running sles 11.3 that run fine and hold correct time, and are on the same network switch so if i can't pull time from like time.gov or whatever, how would i get it to pull from my other linux system?
 
Old 03-08-2015, 01:56 PM   #4
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Sure.
Popular NTP servers can be a pain in the neck for their owners because of the traffic they generate. In addition, there is always some malicious nitwit who wants to create problems for others, so they can end up getting DOS blasted by the script kiddy crowd.
NTP.org got around that by creating "pools". IP addresses that are forwarded to one of a group of servers based on load balancing.
Much nicer than incessantly pestering the guy who runs the atomic clock in Boulder (I'm sure he has enough to do already).

You need to invoke ntpd (it's a service, so it's persistent so in the *nix world that makes it a daemon) with the '-g' switch which precludes it from looking at system time for comparison (because it will freek out if it sees to much "drift" between the system time and the ntpq response).
I'm not the guy to ask about configuring NTP in Susse, however try "man 'ntp'/'ntpd" or "man -k/K 'ntp'/'ntpd') and that will direct you to the appropriate config files in Susse. Apparently "yast" has an NTP configuration capability (I always configure network services by hand because you're always better off understanding the technology rather than understanding the tool however if yast can make it happen, who am I to judge? )

EDIT: Sorry I didn't address this at first, my mistake.
Quote:
how would i get it to pull from my other linux system?
You'd have to set it up as a local NTP server, which isn't hard either although I'm afraid if I gave you directions it would just confuse you. I'm not a SUSSE guy (though I do like the little lizard). I'd suggest you make the proxy the network clock or a router that can bypass the proxy and still reach your servers.

Last edited by dijetlo; 03-08-2015 at 02:19 PM. Reason: Clarity
 
Old 03-08-2015, 03:53 PM   #5
ron7000
Member
 
Registered: Nov 2007
Location: CT
Posts: 248

Original Poster
Rep: Reputation: 26
playing with ntp stuff now.
Code:
## sles 10.4 default setup, i never touched/configured ntp
##
## Undisciplined Local Clock. This is a fake driver intended for backup
## and when no outside source of synchronized time is available.
##
server 127.127.1.0              # local clock (LCL)
fudge  127.127.1.0 stratum 10   # LCL is unsynchronized
Code:
## sles 11.3 default setup I never touched/configured ntp
server 127.127.1.0  iburst
fudge 127.127.1.0
suse 11 ntp : https://www.suse.com/documentation/s...netz_xntp.html

can anyone can explain things in 50 words or less?
I don't feel like scouring documentation
 
Old 03-08-2015, 04:04 PM   #6
ron7000
Member
 
Registered: Nov 2007
Location: CT
Posts: 248

Original Poster
Rep: Reputation: 26
here's a quick shot of what happens during boot up
Code:
EFI Time Services Driver v0.4
Fixed MDIO Bus: probed
mousedev: PS/2 mouse device common for all mice
EFI Variables Facility v0.08 2004-May-17
TCP cubic registered
Registering the dns_resolver key type
registered taskstats version 1
Freeing unused kernel memory: 2688kB freed
doing fast boot
your system time is not correct:
Thu Jan  1 00:00:03 UTC 1970
setting system time to:
Wed Sep 17 00:00:00 UTC 2014
SCSI subsystem initialized
Fusion MPT base driver 4.28.00.01suse
Copyright (c) 1999-2010 LSI Corporation
Fusion MPT SAS Host driver 4.28.00.01suse
mptsas 0001:00:01.0: PCI INT A -> GSI
 
Old 03-08-2015, 05:51 PM   #7
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Thumbs up

Quote:
Thu Jan 1 00:00:03 UTC 1970
Second 0 (sorry, second 3)
The beginning of the Unix Epoc.
You call it an error but really.... it's almost magical


Be proud, my son.....

Last edited by dijetlo; 03-08-2015 at 05:54 PM.
 
Old 03-09-2015, 11:04 AM   #8
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
It sounds like the CMOS battery is dead, and that's why the time is getting reset every time the computer is rebooted. Are you able to open the computer up and replace it? On most computers, it's a watch battery somewhere on the motherboard.
 
Old 03-10-2015, 08:40 AM   #9
ron7000
Member
 
Registered: Nov 2007
Location: CT
Posts: 248

Original Poster
Rep: Reputation: 26
it's a big rack server. before linux even loads, i'm in on the system controller and that holds the date & time fine.
so it's not the battery,
and when i ran sles 10.4 it reads the hardware clock fine.
so pretty sure something changed going into sles 11, and the machine is old having a deprecated time syntax or something,
that's my best guess. i need to scrounge another hard drive, load sles 10.4 onto it, and verify.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Clock on wrong time (system clock is set to UTC) yanom Debian 6 07-26-2011 11:26 AM
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 07:19 PM
system clock wrong after reboot hank43 Linux - Software 3 03-09-2007 02:50 AM
System clock always wrong Brain Drop Fedora 1 09-09-2004 12:18 AM
system clock wrong!!! need help pockyboy Linux - General 3 07-03-2002 06:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration