LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 07-11-2017, 02:03 PM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
update time on five mins intervals.


Hi all,
I had in my work computer to install linux as a virtual machine in my windows host (we are not allowed for physical linux installations....).

One of the issues I have found is that when I save my linux (latest opensuse) state and the operating system comes back does not update the time. The result is unfortunately that my timestamps lags behind.

I was wondering how I can have a short script that updates every 5 mins my system time, including my kde's clock.

I would like to thank you for your reply
Regards
alex
 
Old 07-11-2017, 03:33 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
I was wondering how I can have a short script that updates every 5 mins my system time, including my kde's clock.
You can run ntpdate through a cronjob, to update your system time:
Code:
*/5 * * * * /usr/sbin/ntpdate -s 0.europe.pool.ntp.org 1> /dev/null
Of course use a ntp server that matches your location.
And read the ntpdate manpage for more options

Regards
 
Old 07-18-2017, 01:55 PM   #3
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by bathory View Post
You can run ntpdate through a cronjob, to update your system time:
Code:
*/5 * * * * /usr/sbin/ntpdate -s 0.europe.pool.ntp.org 1> /dev/null
Of course use a ntp server that matches your location.
And read the ntpdate manpage for more options

Regards


very bery good idea!!
Actually I have tried the following


date
/usr/sbin/ntpdate -s 0.europe.pool.ntp.org
date

/usr/sbin/ntpdate
/usr/sbin/ntpdate -s 0.europe.pool.ntp.org

sudo /usr/sbin/ntpdate -s 0.europe.pool.ntp.org
root's password:
date
Tue Jul 18 20:37:55 CEST 2017


even with root password my time was not updated. It is twenty minutes behind the real time... any ideas?
 
Old 07-19-2017, 03:34 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
even with root password my time was not updated. It is twenty minutes behind the real time... any ideas?
AFAIK virtual machines are often face time sync problems. Use your favorite search engine to find out what you can do in your case.

For example see this troubleshooting guide for vmware hosts
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and move files based on time intervals fobistech Linux - Newbie 11 05-22-2017 07:36 PM
How do i start a sequence of applications at specified time intervals in Debian? Ricky_Wilson Linux - Server 2 11-19-2010 07:24 AM
How to accurately measure time intervals? 10110111 Programming 3 07-30-2009 05:34 PM
Time changes by 10-30 mins on boot redbook Linux - Laptop and Netbook 1 05-12-2007 11:35 AM
Splitting audio files at specific time intervals quickfix Linux - Software 2 08-26-2005 07:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 10:49 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