- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- System Time wrong...
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
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
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
тАО03-09-2006 09:12 AM
тАО03-09-2006 09:12 AM
I have checked to verify that the NTP service is running on all of them and it is.
ps -ef | grep ntp | grep -v grep
ntp 2879 1 0 Feb10 ? 00:00:13 ntpd -u ntp:ntp -p /var/run/ntpd.pid
They all give the same info for the above command (with the PID being different, of course), yet they all seem to be displaying different times.
What am I overlooking?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2006 09:22 AM
тАО03-09-2006 09:22 AM
Re: System Time wrong...
ntpq -pn
You should see a list like this:
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.10.10.10 146.164.48.5 2 u 56 64 377 -0.023 390.197 148.586
The * indicates that that is the server for this node. If you don't see the "*", stop the ntpservice and run:
ntpdate -b ntp.server
And start the service. Also ensure that no firewall is blocking the connection to the ntp server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2006 09:36 AM
тАО03-09-2006 09:36 AM
Re: System Time wrong...
All three of them (the one working and the two not) are on the same network going through the same router and using outside, public time servers.
Each of them have several entries when I run the ntpq -pn command:
From the working system:
+80.127.4.179 .PG0A. 1 u 441 1024 377 145.249 -0.761 1.130
+72.3.133.147 129.6.15.29 2 u 383 1024 377 27.063 -0.238 1.689
-64.172.230.138 164.67.62.194 2 u 72 1024 377 86.241 11.109 12.325
66.187.224.4 .INIT. 16 u - 1024 0 0.000 0.000 4000.00
*66.187.224.4 .CDMA. 1 u 403 1024 377 63.016 0.233 1.113
From the first non-working system:
+192.36.143.151 .PPS. 1 u 758 1024 377 186.287 -13.942 7.197
-24.34.79.42 132.163.4.103 2 u 737 1024 377 88.984 1.932 1.774
-64.112.189.11 128.10.252.6 2 u 589 1024 377 81.008 2.090 6.420
+66.187.233.4 .CDMA. 1 u 680 1024 377 52.510 -6.552 4.299
*66.187.224.4 .CDMA. 1 u 974 1024 375 63.270 -3.971 3.298
And from the last non-working system:
-64.34.193.47 195.137.27.138 3 u 879 1024 377 75.975 -11.893 7.095
-64.81.84.140 216.52.237.152 3 u 825 1024 377 78.760 -51.992 5.749
+216.237.126.10 132.239.1.6 2 u 831 1024 377 66.145 0.571 1.970
+66.187.233.4 .CDMA. 1 u 849 1024 377 71.435 -8.258 14.280
*66.187.224.4 .CDMA. 1 u 15 1024 377 64.283 0.236 1.794
As you see, all of them have an * next to the same entry, yet they all display different times. Do I have a "ghost in the machine" thing going on here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2006 09:51 AM
тАО03-09-2006 09:51 AM
Re: System Time wrong...
How bad is the time displayed?
What is the ouput of:
date +%z
date +%Z
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2006 10:09 AM
тАО03-09-2006 10:09 AM
Re: System Time wrong...
ZONE="America/North_Dakota/Center"
UTC=false
ARC=false
The one that is correct and one of the others (that is not) both have the same output from the two commands:
date +%z
-0600
date +%Z
CST
The last one displays something slightly different:
date +%z
+0000
date +%Z
UTC
This tells me that the last one is in the wrong time zone (UTC vs CST). I forget where to change that since it is usually a set-and-forget type thing, but it does not explain why the two that are set the same still display differnt times.
Guess the first thing to do is to find where to change the one to the UTC and then move on from there...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2006 11:10 PM
тАО03-09-2006 11:10 PM
Re: System Time wrong...
echo $TZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2006 11:44 PM
тАО03-09-2006 11:44 PM
Solutioncp /usr/share/zoneinfo/America/North_Dakota/Center /etc/localtime
This is executed at boot time according to the configuration of /etc/sysconfig/clock
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2006 04:24 AM
тАО03-10-2006 04:24 AM
Re: System Time wrong...
Thanks for the input. I am at work now, but I will see what I can do with the systems when I get home.
Silly question:
In order to make any of these suggestions work, you have to make these changes as root, right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2006 04:48 AM
тАО03-10-2006 04:48 AM
Re: System Time wrong...
export TZ="zonename"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2006 11:29 AM
тАО03-10-2006 11:29 AM
Re: System Time wrong...
It would seem as if I do not have the TZ environment variable set. When I run the
echo $TZ
I get no response at all. Just another command prompt.
I did take your advise and copied over a fresh localtime file using the command you suggested. What got my attention is that it did not complain about overwriting a file when I ran the command as I would have expected. Now i wish I would have checked the existence of the file prior to running the command. Oh well.
Now that it is copied over, I have to wait until she is no longer using it to reboot.
Strange thing. Seems as if the $TZ is not set on any of the boxes, but yet one of them is fine. I guess I still have a great deal of learning to do in regards to setting system time in Linux.
I will update this thread when there is something more to report.
Thanks for all the help so far!