[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] NTP server



Hi all!

I've a raq4 with some random time problem, so I want to set a ntp server to
check and set my time hourly.

I'm not sure what to do.

I think:

1) find and check a NTP server:

I found this:  150.145.33.1
It's an Italian ntp server.

I checked with:

[root sbin]# ntpdate -q 150.145.33.1
server 150.145.33.1, stratum 1, offset -258.237294, delay 0.21260
24 Dec 02:07:28 ntpdate[10219]: step time server 150.145.33.1
offset -258.237294 sec

The time (24 Dec 02:07:28) is correct , so I think that's a good ntp
server!!

2)Check if in the crontab there is this line:

01 * * * * root run-parts /etc/cron.hourly

There is!

3)put a file (called for exmple "rightime") inside the /etc/cron.hourly
directory like this:

#!/bin/sh
/usr/sbin/ntpdate 150.145.33.1>&1 > /dev/null

4)set owner, group and permission  of "rightime"  to root, root, 700


Am I right?
What is the last part of line 2 of "rightime" (>&1 > /dev/null)?
Sincereally I found it in a previous post (RE: [cobalt-users] Problem with
Date changing, 26/11/2000), but i don't know what is ">&1>/dev/null".
The process ntpdate will send the output to &1(??) and this will send output
to /dev/null ??
What are "&1" and  "/dev/null" and what are them for?

Sorry if this a stupid question, but I would understand what I do.

Thanks in advance,
Merry Christmas and happy New Year,

Filiberto Ricci