[ros-users] ntp and multi-machines

Kevin Watts watts at willowgarage.com
Wed May 5 18:24:32 UTC 2010


First of all, it looks like the offset is really, really high between your
embedded board and your laptop. You can probably use "chrony" to sync them:
http://chrony.tuxfamily.org/

ntp_monitor.py checks against both the remote host, and the computer. If
either one of these commands fails, then ntp_monitor.py won't work. I wrote
a ticket, so I can disable this call in a future release:
https://code.ros.org/trac/wg-ros-pkg/ticket/4277

The exact command ntp_monitor.py runs is against the hostname of the
computer, not the IP.

Can you try:
$ python
> import socket
> socket.gethostname()
MY_HOSTNAME
$ ntpdate -q MY_HOSTNAME

Can you post the output from that command, and the return code (from "echo
$?"). Thanks.

Kevin




On Wed, May 5, 2010 at 10:41 AM, Enea Scioni
<enea.scioni at student.unife.it>wrote:

>
> Sure!
> On my laptop the output is:
> $ ntpdate -q 127.0.0.1
> server 127.0.0.1, stratum 3, offset -0.000012, delay 0.02565
>  5 May 19:22:28 ntpdate[5000]: adjust time server 127.0.0.1 offset
> -0.000012
> sec
>
> and
>
> $ ntpdate -q 134.58.255.1
> server 134.58.255.1, stratum 2, offset -0.000195, delay 0.02599
>  5 May 19:22:57 ntpdate[5001]: adjust time server 134.58.255.1 offset
> -0.000195 sec
>
> where 134.58.255.1 is the server ip.
>
> Instead, on embedded board:
> $ ntpdate -q 127.0.0.1
> server 127.0.0.1, stratum 0, offset 0.000000, delay 0.00000
>  1 Jan 01:08:09 ntpdate[1535]: no server suitable for synchronization found
>
> (expected, because there isn't the ntp deamon running on embedded board),
> and
> $ ntpdate -q 10.8.30.30
> server 10.8.30.30, stratum 3, offset 1273079765.187633, delay 0.02666
>  1 Jan 01:09:58 ntpdate[1541]: step time server 10.8.30.30 offset
> 1273079765.187633 sec
>
> where 10.8.30.30 is the ip assigned at my pc on LAN.
>
> Enea Scioni
>
> --
> View this message in context:
> http://ros-users.122217.n3.nabble.com/ntp-and-multi-machines-tp765453p779546.html
> Sent from the ROS-Users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> ros-users mailing list
> ros-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ros-users
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100505/1cec74e5/attachment-0003.html>


More information about the ros-users mailing list