Hardware and system timing are different

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Hardware and system timing are different
# 1  
Old 06-05-2014
Hardware and system timing are different

-> We have 2 servers server1 and server2 server.
->server1 is master application and server2 is slave application server. ->output of server1 hardware and slave timing:
Code:
#  hwclock --show Thu 05 Jun 2014 05:34:08 PM SGT  -0.465666 seconds # date Thu Jun  5 17:34:16 SGT 2014 
# cd /etc/sysconfig/ 

# ls -ltr clock* -rw-r--r-- 1 root root 179 Jul  3  2008 clock 

# cat clock 
# The ZONE parameter is only evaluated by system-config-date. # The timezone of the system is defined by the contents of  /etc/localtime. 
ZONE="Asia/Singapore" 
UTC=false 
ARC=false 
*************
#   ->output of server2 server hardware and software info: 

#  hwclock --show Thu 05 Jun 2014 04:02:23 PM SGT  -0.225825 seconds 
# date Thu Jun  5 17:05:05 SGT 2014 
#  hwclock --show Thu 05 Jun 2014 04:13:40 PM SGT  -0.436206 seconds # date Thu Jun  5 17:15:14 SGT 2014
# cd /etc/sysconfig/ 
# cat clock
 # The ZONE parameter is only evaluated by system-config-date.
 # The timezone of the system is defined by the contents of  /etc/localtime. ZONE="Asia/Singapore"
 UTC=false 
ARC=false 

# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.7 (Tikanga) #   ->There is a change in the hardware and linux system time change.

-> We know how to change the system and hardware timing.
-> Need advice if we want to change the hardware and system timing then what is the procedure and impact on server appllicationa.
->Kindliy assist.

Last edited by Scott; 06-05-2014 at 08:10 AM.. Reason: Please use code tags
# 2  
Old 06-05-2014
Have a look at the date command manual page:-
Code:
man date

That should let you set the system clock. Take care considering the time zone.

Why is the hardware clock important to you?

Also have a look at the clock manual page:-
Code:
man clock

I hope that this helps,

Robin
# 3  
Old 06-05-2014
Hi Robin,

Thanks for your reply.

1)for hardware clock, I will use cmd :
Code:
hwclock --set --date "05/06/2013 17:34:08"

2) Setting System timing to according to Hardware timing:
Code:
# hwclock -s

or
Code:
# hwclock -hctosys

Please advice either hardwae to system timing copy will be ok or system to hardware timing ok?

3) We have already set the time zone so I will not change it.

4) We have some application running over these system where server1 is master and server2 as slave. kindly also advice that we need to stop out application or without stopping, we can proceed for time change?

5)I checked on the internet and mentiond like hardware clock always keep running even after the server is in shutdown status while system clock depends on kernal. once linux OS is shutdwon then system clock stop running.

Kindly Advice...

Last edited by Franklin52; 06-05-2014 at 11:10 AM.. Reason: Please use code tags
# 4  
Old 06-05-2014
Usually you sync the system time between your servers with the NTP protocol.
And sync the system time to the HW clock during shutdown.
# 5  
Old 06-11-2014
Yes, you are correct. Instead of manually changing or updating time, I restarted the ntp serices. I found the reason of this time difference that last week this server rebooted and ntp services was not running. After restarting ntp services, automatically system timing synced with ntp server. Application was not depend on this timing so without stopping application, I am able to do this.

After this, using below command I synced hardware timing to system timing:
hwclick --systohc

Thanks guys for your help in solving this issue.
# 6  
Old 06-11-2014
To ensure that ntpd is started at system boot, ensure the following:
1.
Code:
chkconfig --list | grep ntp

says ntpd ... 3:on 4:on 5:on ...
(and your current runlevel, who -r, is 3 or 4 or 5.
2.
ntpd runs with -g option.
# 7  
Old 06-19-2014
Hi Guys!!!

->I checked the output on my both server and showing below output:

************
Code:
Server01
[root@server01 ~]# chkconfig --list | grep ntp
ntpd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@server01 ~]# ps -ef |grep ntp
ntp       4135     1  0 May30 ?        00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
root     17003 16771  0 18:52 pts/0    00:00:00 grep ntp
[root@server01 ~]# who -r
         run-level 3  2014-05-30 16:06                   last=S
[root@server01 ~]# date
Thu Jun 19 18:53:10 SGT 2014
[root@server01 ~]#

************
Server02
Code:
[root@server02 ~]# chkconfig --list | grep ntp
ntpd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@server02 ~]# ps -ef |grep ntp
root     15332 15261  0 18:55 pts/0    00:00:00 grep ntp
ntp      25876     1  0 Jun10 ?        00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
[root@server02 ~]# date
Thu Jun 19 18:55:49 SGT 2014
[root@server02 ~]#

***************

->That means that after system reboot ntp services will automatically start.

Thanks guys for your help and support. Without getting ans from you guys, resolving issue was difficult.
Now my issue solved.

Last edited by Franklin52; 06-19-2014 at 10:37 AM.. Reason: Please use code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. SCO

Need Help Installing Legacy System on Newer Hardware

We have a legacy software application that runs on SCO OpenServer 5.0.6, and the current server (built around 2003-04) is still running. I have been attempting to upgrade the hardware, to hopefully increase the time that we will have access to the data in this system, but am running into an... (13 Replies)
Discussion started by: spock9458
13 Replies

2. UNIX for Advanced & Expert Users

Linux Command To Find the System Configuration And Hardware Information

Hello guys. I wanted to find the System Configuration and Hardware Information on one of my servers. Here is part of the cpu info: CPU core info: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 44 model name : Intel(R) Xeon(R) CPU... (2 Replies)
Discussion started by: Ymir
2 Replies

3. Solaris

Manufacturer name of computer system(hardware) , processor

Hi All, Can someone let me know the method or set of commands by which i can retrive manufacturer name of computer system (hardware of machine ) and manufacturer of processor. i get below information when fired psrinfo command : psrinfo -vp The physical processor has 1 virtual processor... (6 Replies)
Discussion started by: omkar.jadhav
6 Replies

4. Shell Programming and Scripting

Timing a script

i have a very big script i have that i'd like to add a timeout to. this script runs on a several remote host. i update this script with timeout clause and then copy it over to all the hosts on which it is currently on. basically, i want the timeout to make the script abort/exit if it's... (1 Reply)
Discussion started by: SkySmart
1 Replies

5. AIX

System P hardware

hello everybody, Is there any training to get deep knowledge an hands on lab with system p hardware firmware microcode upgrading etc... thanks in advance (2 Replies)
Discussion started by: Vit0_Corleone
2 Replies

6. Solaris

basic hardware & system requirements for solaris 10

hi all, i want to setup a solaris10 lab for 50 trainees. kindly let me know all the basic hardware & system requirements for the lab . with regards, Raj (5 Replies)
Discussion started by: rajp_8007
5 Replies

7. Programming

timing your functions

hi everyone. If you have a function created in your code and you want to find out how long it takes for it to run you can use a struct called gettimeofday(). so lets say we have a function like this int myfunction (int r) { /*some math calculations*/ return answer; } How do i set up... (3 Replies)
Discussion started by: bebop1111116
3 Replies

8. UNIX for Advanced & Expert Users

scp timing out

having problems using scp in that during peak hours it appears to time out. anyone have similar experiences? any thoughts regarding a solution... (1 Reply)
Discussion started by: jph
1 Replies

9. Solaris

What command to check system hardware

What command can I run on a Solaris 8 server to check the hardware (ie number of processors, speed of processors, installed memory etc). (4 Replies)
Discussion started by: soliberus
4 Replies
Login or Register to Ask a Question