This is a discussion on rdate question within the Linux Networking forums, part of the Linux Forums category; If I do a 'rdate -p some.host' Do some.host need to have some deamon running in order to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
If I do a 'rdate -p some.host'
Do some.host need to have some deamon running in order to reply, or what? I have tried to use the rdate against an internal linux server, but it won't reply. If I try a 'rdate -p 127.0.0.1' on that server, nothing happens. Jørn Dahl-Stamnes, EDB Teamco AS e-mail: Jorn.Dahl-Stamnes@nospam.novit.no (remove nospam first) web: http://spiderman.novit.no/dahls/ |
|
|||
|
Jørn Dahl-Stamnes <jorn.dahl-stamnes@nospam.edb.com> wrote:
> If I do a 'rdate -p some.host' > Do some.host need to have some deamon running in order to reply, or what? Read the first paragraph of "man rdate", rdate connects to an RFC 868 time server over a TCP/IP network, printing the returned time and/or setting the system clock. > I have tried to use the rdate against an internal linux server, but it won't > reply. If I try a 'rdate -p 127.0.0.1' on that server, nothing happens. How were you expecting your local server to set its clock correctly to its local clock, and then actually get it right? Try this instead (as root): /usr/sbin/ntpdate tick.usno.navy.mil tock.usno.navy.mil Chris |
|
|||
|
chris-usenet@roaima.co.uk wrote:
> Try this instead (as root): > /usr/sbin/ntpdate tick.usno.navy.mil tock.usno.navy.mil And then find a time server closer to you. Preferably something with a stratum greater than 2. http://www.eecis.udel.edu/~mills/ntp/servers.html -- Cameron Kerr cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/ Empowered by Perl! |
|
|||
|
Cameron Kerr <cameron.kerr@paradise.net.nz> wrote:
> And then find a time server closer to you. Preferably something with a > stratum greater than 2. > http://www.eecis.udel.edu/~mills/ntp/servers.html Good point. I've been using NTP (from S2/S3 servers) for so long I forgot the reference. Thanks for pointing it out. Chris |
|
|||
|
Jørn Dahl-Stamnes <jorn.dahl-stamnes@nospam.edb.com> wrote:
> Do some.host need to have some deamon running in order to reply, > or what? > I have tried to use the rdate against an internal linux server, > but it won't reply. If I try a 'rdate -p 127.0.0.1' on that server, > nothing happens. That works for me. The inetd daemon can apparently be configured in /etc/inetd.conf to provide time service though the lo interface: time stream tcp nowait root internal time dgram udp wait root internal The /etc/services file may have to contain the tcp line there as well: time 37/tcp timserver time 37/udp timserver The both sets of lines in these files above came pre-configured with my Linux distribution. So I'm not sure whether they, or at least the tcp one, must be configured or not. I'm no expert on inetd/services. --- PPP-Q&A links, downloads: http://ckite.no-ip.net/ |
|
|||
|
> If I do a 'rdate -p some.host'
> > Do some.host need to have some deamon running in order to reply, or > what? Yes, definitely. rdate sends a UDP or TCP query as per RFC 868. People seem to like NTP these days, but I'm still a fan of rdate (not as accurate, but much simpler and does the job). This reminds me, which rdate client are you using? I've found a possibly ancient version, created by Lee Moore and most recently modifed in '99 by Arkadiusz Miskiewicz. I'd like to grab a newer version if one exists :) -- Jem Berkes http://www.sysdesign.ca/ |
|
|||
|
In article <40222b99@news.maxnet.co.nz>, Cameron Kerr <cameron.kerr@paradise.net.nz> wrote:
>chris-usenet@roaima.co.uk wrote: > >> Try this instead (as root): >> /usr/sbin/ntpdate tick.usno.navy.mil tock.usno.navy.mil > >And then find a time server closer to you. Preferably something with a >stratum greater than 2. > >http://www.eecis.udel.edu/~mills/ntp/servers.html We have a stratum 1 at our site, but it refuse me to use the rdate against it. The machine I try to connect to, is stratum 2 (using the stratum 1). We also have a cisco router that also refuse to answer my request. Jørn Dahl-Stamnes, EDB Teamco AS e-mail: Jorn.Dahl-Stamnes@nospam.novit.no (remove nospam first) web: http://spiderman.novit.no/dahls/ |
|
|||
|
J?rn Dahl-Stamnes <jorn.dahl-stamnes@nospam.edb.com> wrote:
> In article <40222b99@news.maxnet.co.nz>, Cameron Kerr > <cameron.kerr@paradise.net.nz> wrote: >>chris-usenet@roaima.co.uk wrote: >> >>> Try this instead (as root): /usr/sbin/ntpdate tick.usno.navy.mil >>> tock.usno.navy.mil >> >>And then find a time server closer to you. Preferably something with a >>stratum greater than 2. >> >>http://www.eecis.udel.edu/~mills/ntp/servers.html > > We have a stratum 1 at our site, but it refuse me to use the rdate > against it. rdate and NTP are two different protocols. rdate just gets given the time in the form of something like Fri Feb 6 23:40:52 NZDT 2004 NTP is much more sophisticated, and gets you much more accurate timings. Nobody uses rdate any more, except in introductory network programming courses. -- Cameron Kerr cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/ Empowered by Perl! |
|
|||
|
In article <40236732@news.maxnet.co.nz>, Cameron Kerr <cameron.kerr@paradise.net.nz> wrote:
>J?rn Dahl-Stamnes <jorn.dahl-stamnes@nospam.edb.com> wrote: >> In article <40222b99@news.maxnet.co.nz>, Cameron Kerr >> <cameron.kerr@paradise.net.nz> wrote: >>>chris-usenet@roaima.co.uk wrote: >>> >>>> Try this instead (as root): /usr/sbin/ntpdate tick.usno.navy.mil >>>> tock.usno.navy.mil >>> >>>And then find a time server closer to you. Preferably something with a >>>stratum greater than 2. >>> >>>http://www.eecis.udel.edu/~mills/ntp/servers.html >> >> We have a stratum 1 at our site, but it refuse me to use the rdate >> against it. > >rdate and NTP are two different protocols. > >rdate just gets given the time in the form of something like >Fri Feb 6 23:40:52 NZDT 2004 > >NTP is much more sophisticated, and gets you much more accurate timings. > >Nobody uses rdate any more, except in introductory network programming >courses. The reason for using rdate, is that I connect to the machines through an ISDN line. It do not want have the line up all the time, which I probably will if I use NTP. Other have suggested that I used rdate to get the time from the server. However, rdate does not work as expected: [dahls@jedi dahls]$ rdate -p <server.at.work> rdate: got EOF from time server Jørn Dahl-Stamnes, EDB Teamco AS e-mail: Jorn.Dahl-Stamnes@nospam.novit.no (remove nospam first) web: http://spiderman.novit.no/dahls/ |
|
|||
|
Jørn Dahl-Stamnes wrote:
> The reason for using rdate, is that I connect to the machines through an ISDN > line. It do not want have the line up all the time, which I probably will if I > use NTP. Other have suggested that I used rdate to get the time from the > server. > There's no reason why an NTP client should keep the line busy any more than an rdate client. > However, rdate does not work as expected: > > [dahls@jedi dahls]$ rdate -p <server.at.work> > rdate: got EOF from time server Probably because the server doesn't support rdate. Forget rdate, it's obsolete and AFAIK doesn't even support updates against a server in a different time zone. |