Author Topic: Ntpdate  (Read 3308 times)

kmatthew

  • Newbie
  • *
  • Posts: 4
    • View Profile
Ntpdate
« on: December 14, 2004, 01:21:28 am »
Hi,

 has anyone managed to locate or successfully compile a version of ntpdate or an ntp client that is broadcastclient capable.

I tried cross compiling one, but ran into all sorts of stupid ./configure problems.


Catch Ya

sgtron

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • http://
Ntpdate
« Reply #1 on: December 17, 2004, 08:29:56 pm »
I tried the one from ZSI but couldn't make it work.  I think it used to work on my 5500, but couldn't swear to it.  So now I just go to time.gov and update manually every now and then.
SL5500 (Broken Screen, but still works)
SL6000L (Needs Sled, will pay $250)
64MB SanDisk CF (FAT16)
5GB Seagate Microdive (ext3 Flakey, sent back)
4GB Hitachi Microdrive (Fat16) replaced flakey 5GB Seagate
1GB Pq1 SD Card (Fat16)

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
Ntpdate
« Reply #2 on: December 17, 2004, 09:00:27 pm »
The one from zsi (qpe ntpdate) does work on my 6000.  I do notice that it takes a minute before the gui gets updated, but the commandline shows that it is instantaneous on the system.

BTW - I run it with root priv.
« Last Edit: December 17, 2004, 09:00:59 pm by bluedevils »
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)

sgtron

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • http://
Ntpdate
« Reply #3 on: December 17, 2004, 10:47:56 pm »
Yeah, I guess it *does* work... must be the "run as root" option.
SL5500 (Broken Screen, but still works)
SL6000L (Needs Sled, will pay $250)
64MB SanDisk CF (FAT16)
5GB Seagate Microdive (ext3 Flakey, sent back)
4GB Hitachi Microdrive (Fat16) replaced flakey 5GB Seagate
1GB Pq1 SD Card (Fat16)

tz

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://
Ntpdate
« Reply #4 on: December 20, 2004, 02:16:12 pm »
There was one hiccup with the one I rolled myself - atd would lock the hardware clock, and I had to use hwclock or something to update the ntpdate into the cmos (boot survivable) clock after stopping atd (and restarting it afterward).  The GUI clock did the same thing - killed and restarted atd if you changed the time.

inode0

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Ntpdate
« Reply #5 on: January 07, 2005, 02:36:31 pm »
Here is what I'm doing with ntpdate on my 6k.  I built 4.2.0 and it should poke the hardware clock when appropriate.  I'll leave the package for a while here in case anyone wants it:

ntpdate 4.2.0

I prefer having this just run when I make a network connection so here is what I do to get that to happen:

(1) builtin wireless card

Edit /etc/hotplug/wlan.agent to include the following in the register/resume case after the interface is successfully brought up:
Code: [Select]
               if [ -x /usr/bin/ntpdate ]; then
                        /usr/bin/ntpdate -s time.example.com >/dev/null 2>&1
                fi
(2) CF wireless cards

Edit /etc/pcmcia/network to include a call to clock_adj () at the end of start case.
Code: [Select]
               'start')
                    ifup
                    start_fn $DEVICE
                    clock_adj
                    ;;
and add the clock_adj () function to the bottom of /etc/pcmcia/network.functions
Code: [Select]
clock_adj ()
{
    if [ -x /usr/bin/ntpdate ]; then
        /usr/bin/ntpdate -s time.example.com >/dev/null 2>&1
    fi
}

Be sure to substitute an appropriate time server for time.example.com above.

John

gojira

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Ntpdate
« Reply #6 on: January 26, 2005, 02:25:28 am »
Quote
I prefer having this just run when I make a network connection so here is what I do to get that to happen:
(1) builtin wireless card
(2) CF wireless cards

Any idea how to do that for the usb interface?  I'm using ntpd at the moment, but just running ntpdate on connect would save a little memory.

Thanks.
Zaurus SL-C3200 Debian EABI / Sharp ROM (tetsu v18j), Socket CF Bluetooth (Rev E), BT747 GPS, Canon K30225 CF Wifi.  RIP: Zaurus SL-C860 Sharp ROM (1.40JP).

inode0

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Ntpdate
« Reply #7 on: January 26, 2005, 07:21:03 pm »
Quote
Any idea how to do that for the usb interface?  I'm using ntpd at the moment, but just running ntpdate on connect would save a little memory.
The only external USB NIC I have doesn't work with the 6k so I can't really test but given that the internal wireless is a USB device I would expect the instructions I gave for it would work with other USB NICs.  Did you try it?

If you turn on syslog on your Z you should see the ntpdate message in /var/log/messages.  If it doesn't work if you can send what does show up in /var/log/messages when you plug in your NIC I might be able to help.

John

gojira

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Ntpdate
« Reply #8 on: January 27, 2005, 12:48:32 am »
Quote
The only external USB NIC I have doesn't work with the 6k so I can't really test but given that the internal wireless is a USB device I would expect the instructions I gave for it would work with other USB NICs.  Did you try it?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=64095\"][{POST_SNAPBACK}][/a][/div]

Sorry, I wasn't clear.  I actually meant the builtin usbd0 (ethernet over usb) interface.  The interface is always up, so I can't just add stuff to /etc/hotplug/usbdnet. I guess that also means there's no event when the host at the other end configures the interface there (when the z is connected and shows up on the usb bus on the host) and makes the link available, so there's probably no easy way...

Thanks.
« Last Edit: February 01, 2005, 02:18:41 am by gojira »
Zaurus SL-C3200 Debian EABI / Sharp ROM (tetsu v18j), Socket CF Bluetooth (Rev E), BT747 GPS, Canon K30225 CF Wifi.  RIP: Zaurus SL-C860 Sharp ROM (1.40JP).

inode0

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Ntpdate
« Reply #9 on: January 27, 2005, 01:53:02 am »
Quote
Sorry, I wasn't clear.  I actually meant the builtin usbd0 (tcp over usb) interface.  The interface is always up, so I can't just add stuff to /etc/hotplug/usbdnet. I guess that also means there's no event when the host at the other end configures the interface there (when the z is connected and shows up on the usb bus on the host) and makes the link available, so there's probably no easy way...
I needed an excuse to look at this sometime anyway, thanks.

One possibility that comes to mind is to hook it to lease renewal if you are using a dhcp client that supports hooks.  Many I've used do support them.  Perhaps this weekend I'll have time to take a look at this.

There is always cron too, but I don't know if the combination of cron + ntpdate would save space in the end or not.  Off to add another project to my list now ...

John

gojira

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Ntpdate
« Reply #10 on: January 28, 2005, 11:15:22 pm »
Quote
I needed an excuse to look at this sometime anyway, thanks.
[chomp]
Off to add another project to my list now ...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=64141\"][{POST_SNAPBACK}][/a][/div]

don't let me spoil your fun or anything, but I just realised it doesn't actually need to be triggered from the z, so I just added
Code: [Select]
ssh root@zaurus ntpdate 192.168.129.1 to my sync script on the desktop
Zaurus SL-C3200 Debian EABI / Sharp ROM (tetsu v18j), Socket CF Bluetooth (Rev E), BT747 GPS, Canon K30225 CF Wifi.  RIP: Zaurus SL-C860 Sharp ROM (1.40JP).