vignesh
_________________________________________________________________
GENERAL MAIL
_________________________________________________________________
* [30]Re: Setting the Clock on Linux in issue 108
* [31]I hate to disagree...
* [32]Linux Master Boot Record
* [33]Perl One-Liner of the Month
* [34]thanks for -Great- article
____________________________________________________
Re: Setting the Clock on Linux in issue 108
Thu, 18 Nov 2004 22:11:55 -0500
Suramya Tomar ([35]security from suramya.com)
Reply by William Park
Hi, Firstly I would like to congratulate you on a nicely written article. I
found it very useful.
In addition to the ways you have pointed out in your article there is
another method we can use to sync linux clocks to a central server. I am
talking about using rdate ([36]http://freshmeat.net/projects/rdate).
On the website:
"The rdate utility retrieves the date and time from another machine on
your network, using the protocol described in RFC 868. If you run rdate as
root, it will set your machine's local time to the time of the machine
that you queried."
I use the following command to sync my computers clock every day:
/usr/sbin/rdate -s tick.greyware.com
Thought I should share this with you.
Thanks,
Suramya
'rdate' is just another program using port 37 (Time protocol) which is
what RFC-868 is about. I think 'netdate' is more prevalent. In fact, you
can use shell script, because the server returns number of second since
Jan 1, 1900, in 32-bit number. So:
sec=`nc time.nist.gov 37 | od -A n -t xC | tr -d ' '`
date --date="1970-1-1 0:0:$((0x$sec - 2208988800)) GMT"
where 2208988800 is to make it relative to Jan 1, 1970.
I find that there could be an extra 32-bit number for microseconds. So, if
you change the script to:
set -- `nc time.nist.gov 37 | od -An -txC`
date -u --set="1970-01-01 0:0:$((0x$1$2$3$4 - 2208988800))"
you will use only the seconds.
You are encouraged to use UDP side of things. The shell script has no
choice but to use TCP, because knowing when to exit 'nc' is a hassle.
____________________________________________________
I hate to disagree...
Thu, 18 Nov 2004 15:36:44 -0500
Brendan ([37]endosquid from endosquid.com)
Ok, I admit it. [38]http://linuxgazette.net/108/lg_mail.html has a serious
glitch... -- Heather
but...
"[sic] folks. [39]Debian's actual command (to do mass upgrades without
breaking holds or allowing package removals for apps that changed
drastically) is: apt-get upgrade dist -- Heather"
The command is:
apt-get dist-upgrade
I know, because I do it everyday.
I did attempt to correct a typo. I replaced it with a worse one. It was
late, and my vim went one way, my hand another. At least as far as I can
tell. Either that or I was on some amazing grade of sleep deprivation. --
Heather
[Kapil] You should avoid doing this for more reasons than one!
1. Since there are only three versions of Debian at any given time you
will reach the top of the charts in exactly two days! Once you already run
"unstable" (or "testing" for that matter), running:
apt-get update; apt-get upgrade
should do the trick.
I do have to say, that 'upgrade' will not help you if they drastically
=2= |