Check Time/Date on a server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Check Time/Date on a server
# 1  
Old 08-03-2009
Check Time/Date on a server

I have two servers which are not in sync.

I need to write a script that checks the time on the corresponding server and another script to call the above script on both the servers simulataneously to check if there is a time difference.

Can anyone provide me with such scripts as I am new to Unix ?
# 2  
Old 08-03-2009
Do you know about NTP - usually running an xntpd daemon. NTP detects time differences between servers and corrects them.
# 3  
Old 08-03-2009
Can you please elaborate a little more about this as I have no clue about NTP....
# 4  
Old 08-03-2009
NTP: http://en.wikipedia.org/wiki/Network_Time_Protocol
Reference Implementation: http://www.ntp.org/

As soon as you've got the daemon up and running, choose a geographically close server pool from http://www.pool.ntp.org/
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

I need a Script to read Log string and check date at the same time

I need to check 1 log file, which is logging: 2014-08-18T09:10:39+02:00 user: XXXXX START FEATURE 2014-08-18T09:10:39+02:00 user: XXXXX FINISH FEATURE I first need to check that the START FEATURE starts and finish on the same time/date for the same user, which is different each time START... (2 Replies)
Discussion started by: TheBest43
2 Replies

2. UNIX for Advanced & Expert Users

AIX idea needed to check the logs updated date and time

Hi with the help of Gabriel canepa, i have just edited filename only in his code. The help which i got and he helped is 1) I have around 22 logs and each log should be updated in the last 24 hours from the current timestamp. 2) It should check for ERROR message (not error,Error) in the log and... (2 Replies)
Discussion started by: Kalaihari
2 Replies

3. Solaris

modifying date and time and time zone on solaris 5.10 with (redundant server) veritas

I have a cluster of two Solaris server (veritas cluster). one working and the other is standby I am going to change the date on them , and am looking for a secure solution as it is giving an important service. my opinion is that the active one doesn't need to be restarted (if I don't change the... (1 Reply)
Discussion started by: barry1946
1 Replies

4. Shell Programming and Scripting

Perl code to check date and check files in particular dir

Hi Experts, I am checking how to get day in Perl. If it is “Monday” I need to process…below is the pseudo code. Can you please prove the code for below condition. if (today=="Monday" ) { while (current_time LESS THAN 9:01 AM) ... (1 Reply)
Discussion started by: ajaypatil_am
1 Replies

5. Red Hat

Server Date and Time

Hi, I am trying to change server date and time for testing purposes but every time i change the date and time it gets switched back to system date and time after half an hour or so. Is there a way to change the server date and time temporarily? My guess is that the server time is in sync with time... (5 Replies)
Discussion started by: mahmad155
5 Replies

6. UNIX for Advanced & Expert Users

Changing Time and date on Virtual server

Hello Everyone I am running a Sunos 5.10 Generic_138888-02 sun4u sparc SUNW,SPARC-Enterprise machine with more than one virtual servers are on this box. My question is possable to change the date and time on the virtual server without change the time on the main server? Thanks Peter (4 Replies)
Discussion started by: Peterh
4 Replies

7. Shell Programming and Scripting

How to check crontab edited date and time?

How to check when was the last time the crontab was updated and also what was the modification done ? (2 Replies)
Discussion started by: mail2sant
2 Replies

8. UNIX for Dummies Questions & Answers

to get remote server date & time

Hi, i dont have remote m/c user credential. i only know remote m/c ip address. and i am able to ping that remote m/c. In windows we use: "net time \\computername" to get the remote m/c time. so how can i get remote m/c time in unix m/c? (means a unix command) Thanks for the help. ... (9 Replies)
Discussion started by: partha_ori
9 Replies

9. UNIX for Advanced & Expert Users

Sync Time/date with NTP server

Hello all, What would be the most convienint and proper way on syncing up the time and date on Solaris 8 servers with an NTP server? Any help would be appreciated. Thanks (2 Replies)
Discussion started by: Sunguy222
2 Replies

10. Shell Programming and Scripting

FTP - Get the file date and time on the remote server

I would like to know if there is a way to get the date and timestamp of the file that is being FTP from the remote server using shell script. Currently the get command from FTP will have current date and timestamp. Tried the earlier suggestion 'HardFeed' but still getting the current date and time... (12 Replies)
Discussion started by: gthokala
12 Replies
Login or Register to Ask a Question