Re: How do I set the system time on production server?

Поиск
Список
Период
Сортировка
От Andrew G. Hammond
Тема Re: How do I set the system time on production server?
Дата
Msg-id 20020320232334.GA650@xyzzy.dhs.org
обсуждение исходный текст
Ответ на Re: How do I set the system time on production server?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-sql
On Wed, Mar 20, 2002 at 12:22:13PM -0500, Peter Eisentraut wrote:
> Ken Corey writes:
>
> > I've just realized that our (production, naturally) database's idea of the
> > current date/time is 24 hours and 14 minutes fast.  What a weird thing.
> >
> > So, is there a way to set the date/time?
>
> The system time is inherited from the operating system.  You can use
> date(1) or maybe hwclock(8) to alter the system time.  On some systems it
> is not recommended to change the system time because that messes up all
> kinds of scheduling, so if you can afford it, reboot and change the time
> in the BIOS.  You should find information in those man pages about the
> recommended way to do it on your system.

A previous email mentioned ntp.  Personally, I'd use the
above approach and then maintain the clock with ntpdate.
This program references and ntp time server and gently
syncs your system clock to the one true time.  I prefer
this to running the ntp daemon propper, since that
strikes me as overkill on most systems, and it adds yet
another security issue to pay attention to.  Stick it as
a cron job every couple of hours or so and it'll keep
your clock in line.  Like all things ntp, you have to
set your system clock to GMT, but that shouldn't be a
problem unless you're running a braindead OS.  Anyway,
for a time gap as big as the one you mentioned, there's
probably no way to really fix it gently.

--
Andrew G. Hammond  mailto:drew@xyzzy.dhs.org  http://xyzzy.dhs.org/~drew/
56 2A 54 EF 19 C0 3B 43 72 69 5B E3 69 5B A1 1F              613-389-5481
5CD3 62B0 254B DEB1 86E0  8959 093E F70A B457 84B1
"To blow recursion you must first blow recur" -- me

В списке pgsql-sql по дате отправления:

Предыдущее
От: Keith Gray
Дата:
Сообщение: Migrating a MySQL schema with an enum
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Migrating a MySQL schema with an enum