--
You received this message because you are subscribed to the Google Groups "Weewx user's group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
My workaround is I have installed an ntp server on my NAS. Given weewx won't work until the NAS is fully booted, there's now only a small risk that the db on the NAS has started but ntp server hasn't. This is on top of weewx not updating the time on the console until after it has done its initial dump which in my case will be at least 40 mins worth of data by which time I hope the ntp server is running, and the pi has updated. This however is very specific to my setup which I don't think is typical.
We will still have a daylight savings ending problem I think though. I'm not sure how this is handled now (for those of us that have to set the console to manual)
--
Cheers
Matthew
I think the right way to solve this is in the daemon script. It already has a requirement that NTP be running before starting weewx, but it should really mean it! I'm not enough of an NTP whiz to know how to do this, but it should not allow weewx to proceed until there has been a successful NTP update.
--
You received this message because you are subscribed to a topic in the Google Groups "Weewx user's group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/tmbrOC6-UiM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
do_start()
{
NPROC=`ps ax | grep $WEEWX_BIN | grep $NAME.pid | wc -l`
if [ $NPROC != 0 ]; then
return 1
fi
#Ensure NTP is up
if ! ntp-wait -n 20 -s 3; then
log_daemon_msg "Not starting $DESC: NTP not synchronised" "$NAME"
return 2
fi
start-stop-daemon --start --chuid $WEEWX_USER --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2
return 0
}
if (/Connection refused/) {
print "\bntpd is not running!\n" if ($opt_v);
last;
}
--
You received this message because you are subscribed to a topic in the Google Groups "Weewx user's group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/tmbrOC6-UiM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
do_start()
{
NPROC=`ps ax | grep $WEEWX_BIN | grep $NAME.pid | wc -l`
if [ $NPROC != 0 ]; then
return 1
fi
# Ensure NTP is up
sudo /etc/init.d/ntp restart
if ! ntp-wait -v -n 20 -s 3; then
log_daemon_msg "Not starting $DESC: NTP not synchronised" "$NAME"
return 2
fi
start-stop-daemon --start --chuid $WEEWX_USER --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2
return 0
}
Feb 19 00:09:50 raspberrypi kernel: [ 0.948124] NET: Registered protocol family 2
Feb 19 00:09:50 raspberrypi kernel: [ 0.953548] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
Feb 19 00:09:50 raspberrypi kernel: [ 0.960816] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
Feb 19 00:09:50 raspberrypi kernel: [ 0.967341] TCP: Hash tables configured (established 4096 bind 4096)
Feb 19 00:09:50 raspberrypi kernel: [ 0.973817] TCP: reno registered
Feb 19 00:09:50 raspberrypi kernel: [ 0.977077] UDP hash table entries: 256 (order: 0, 4096 bytes)
Feb 19 00:09:50 raspberrypi kernel: [ 0.982989] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
Feb 19 00:09:50 raspberrypi kernel: [ 0.989730] NET: Registered protocol family 1
Feb 19 00:09:50 raspberrypi kernel: [ 0.994661] RPC: Registered named UNIX socket transport module.
Feb 19 00:09:50 raspberrypi kernel: [ 1.000727] RPC: Registered udp transport module.
Feb 19 00:09:50 raspberrypi kernel: [ 1.005456] RPC: Registered tcp transport module.
Feb 19 00:09:50 raspberrypi kernel: [ 1.010206] RPC: Registered tcp NFSv4.1 backchannel transport module.
Feb 19 00:09:50 raspberrypi kernel: [ 1.017559] bcm2708_dma: DMA manager at f2007000
Feb 19 00:09:50 raspberrypi kernel: [ 1.022380] bcm2708_gpio: bcm2708_gpio_probe c05a5e50
Feb 19 00:09:50 raspberrypi kernel: [ 1.027833] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
Feb 19 00:09:50 raspberrypi kernel: [ 1.037222] audit: initializing netlink socket (disabled)
Feb 19 00:09:50 raspberrypi kernel: [ 1.042900] type=2000 audit(0.890:1): initialized
Feb 19 00:09:50 raspberrypi kernel: [ 1.204713] VFS: Disk quotas dquot_6.5.2
Feb 19 00:09:50 raspberrypi kernel: [ 1.209108] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Feb 19 00:09:50 raspberrypi kernel: [ 1.217964] FS-Cache: Netfs 'nfs' registered for caching
Feb 19 00:09:50 raspberrypi kernel: [ 1.224701] NFS: Registering the id_resolver key type
Feb 19 00:09:50 raspberrypi kernel: [ 1.230023] Key type id_resolver registered
Feb 19 00:09:50 raspberrypi kernel: [ 1.234235] Key type id_legacy registered
Feb 19 00:09:50 raspberrypi kernel: [ 1.239059] msgmni has been set to 875
Feb 19 00:09:50 raspberrypi kernel: [ 1.244933] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
Feb 19 00:09:50 raspberrypi kernel: [ 1.252784] io scheduler noop registered
Feb 19 00:09:50 raspberrypi kernel: [ 1.256745] io scheduler deadline registered (default)
Feb 19 00:09:50 raspberrypi kernel: [ 1.262337] io scheduler cfq registered
Feb 19 00:09:50 raspberrypi kernel: [ 1.266481] bcm2708_fb_debugfs_init: could not create debugfs entry
Feb 19 00:09:50 raspberrypi kernel: [ 1.274066] BCM2708FB: allocated DMA memory 5b400000
Feb 19 00:09:50 raspberrypi kernel: [ 1.279221] BCM2708FB: allocated DMA channel 0 @ f2007000
Feb 19 00:09:50 raspberrypi kernel: [ 1.302108] Console: switching to colour frame buffer device 82x26
Feb 19 00:09:50 raspberrypi kernel: [ 1.312280] uart-pl011 dev:f1: no DMA platform data
Feb 19 00:09:50 raspberrypi kernel: [ 1.318617] kgdb: Registered I/O driver kgdboc.
Feb 19 00:09:50 raspberrypi kernel: [ 1.325224] vc-cma: Videocore CMA driver
Feb 19 00:09:50 raspberrypi kernel: [ 1.330584] vc-cma: vc_cma_base = 0x00000000
Feb 19 00:09:50 raspberrypi kernel: [ 1.336593] vc-cma: vc_cma_size = 0x00000000 (0 MiB)
Feb 19 00:09:50 raspberrypi kernel: [ 1.343355] vc-cma: vc_cma_initial = 0x00000000 (0 MiB)
Feb 19 00:09:50 raspberrypi kernel: [ 1.359415] brd: module loaded
Feb 19 00:09:50 raspberrypi kernel: [ 1.369031] loop: module loaded
Feb 19 00:09:50 raspberrypi kernel: [ 1.373730] vchiq: vchiq_init_state: slot_zero = 0xdb000000, is_master = 0
Feb 19 00:09:50 raspberrypi kernel: [ 1.382860] Loading iSCSI transport class v2.0-870.
Feb 19 00:09:50 raspberrypi kernel: [ 1.390296] usbcore: registered new interface driver smsc95xx
Feb 19 00:09:50 raspberrypi kernel: [ 1.397784] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
Feb 19 00:09:50 raspberrypi kernel: [ 1.605088] Core Release: 2.80a
Feb 19 00:09:50 raspberrypi kernel: [ 1.609591] Setting default values for core params
Feb 19 00:09:50 raspberrypi kernel: [ 1.615639] Finished setting default values for core params
Feb 19 00:09:50 raspberrypi kernel: [ 1.822535] Using Buffer DMA mode
Feb 19 00:09:50 raspberrypi kernel: [ 1.827124] Periodic Transfer Interrupt Enhancement - disabled
Feb 19 00:09:50 raspberrypi kernel: [ 1.834247] Multiprocessor Interrupt Enhancement - disabled
Feb 19 00:09:50 raspberrypi kernel: [ 1.841106] OTG VER PARAM: 0, OTG VER FLAG: 0
Feb 19 00:09:50 raspberrypi kernel: [ 1.846734] Dedicated Tx FIFOs mode
Feb 19 00:09:50 raspberrypi kernel: [ 1.852053] dwc_otg: Microframe scheduler enabled
Feb 19 00:09:50 raspberrypi kernel: [ 1.852293] dwc_otg bcm2708_usb: DWC OTG Controller
Feb 19 00:09:50 raspberrypi kernel: [ 1.858508] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
Feb 19 00:09:50 raspberrypi kernel: [ 1.867127] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
Feb 19 00:09:50 raspberrypi kernel: [ 1.873949] Init: Port Power? op_state=1
Feb 19 00:09:50 raspberrypi kernel: [ 1.879244] Init: Power Port (0)
Feb 19 00:09:50 raspberrypi kernel: [ 1.883884] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
Feb 19 00:09:50 raspberrypi kernel: [ 1.892095] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Feb 19 00:09:50 raspberrypi kernel: [ 1.900734] usb usb1: Product: DWC OTG Controller
Feb 19 00:09:50 raspberrypi kernel: [ 1.906809] usb usb1: Manufacturer: Linux 3.10.25+ dwc_otg_hcd
Feb 19 00:09:50 raspberrypi kernel: [ 1.914031] usb usb1: SerialNumber: bcm2708_usb
Feb 19 00:09:50 raspberrypi kernel: [ 1.920712] hub 1-0:1.0: USB hub found
Feb 19 00:09:50 raspberrypi kernel: [ 1.925845] hub 1-0:1.0: 1 port detected
Feb 19 00:09:50 raspberrypi kernel: [ 1.931481] dwc_otg: FIQ enabled
Feb 19 00:09:50 raspberrypi kernel: [ 1.931499] dwc_otg: NAK holdoff enabled
Feb 19 00:09:50 raspberrypi kernel: [ 1.931510] dwc_otg: FIQ split fix enabled
Feb 19 00:09:50 raspberrypi kernel: [ 1.931529] Module dwc_common_port init
Feb 19 00:09:50 raspberrypi kernel: [ 1.931964] usbcore: registered new interface driver usb-storage
Feb 19 00:09:50 raspberrypi kernel: [ 1.939784] mousedev: PS/2 mouse device common for all mice
Feb 19 00:09:50 raspberrypi kernel: [ 1.947318] bcm2835-cpufreq: min=700000 max=700000 cur=700000
Feb 19 00:09:50 raspberrypi kernel: [ 1.954632] bcm2835-cpufreq: switching to governor powersave
Feb 19 00:09:50 raspberrypi kernel: [ 1.961694] bcm2835-cpufreq: switching to governor powersave
Feb 19 00:09:50 raspberrypi kernel: [ 1.968608] cpuidle: using governor ladder
Feb 19 00:09:50 raspberrypi kernel: [ 1.973952] cpuidle: using governor menu
Feb 19 00:09:50 raspberrypi kernel: [ 1.979161] sdhci: Secure Digital Host Controller Interface driver
Feb 19 00:09:50 raspberrypi kernel: [ 1.986588] sdhci: Copyright(c) Pierre Ossman
Feb 19 00:09:50 raspberrypi kernel: [ 1.992257] sdhci: Enable low-latency mode
Feb 19 00:09:50 raspberrypi kernel: [ 2.038820] mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform's DMA
Feb 19 00:09:50 raspberrypi kernel: [ 2.049306] mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
Feb 19 00:09:50 raspberrypi kernel: [ 2.056539] sdhci-pltfm: SDHCI platform and OF driver helper
Feb 19 00:09:50 raspberrypi kernel: [ 2.063693] ledtrig-cpu: registered to indicate activity on CPUs
Feb 19 00:09:50 raspberrypi kernel: [ 2.073290] hidraw: raw HID events driver (C) Jiri Kosina
Feb 19 00:09:50 raspberrypi kernel: [ 2.087648] usbcore: registered new interface driver usbhid
Feb 19 00:09:50 raspberrypi kernel: [ 2.094702] usbhid: USB HID core driver
Feb 19 00:09:50 raspberrypi kernel: [ 2.104547] TCP: cubic registered
Feb 19 00:09:50 raspberrypi kernel: [ 2.111309] Initializing XFRM netlink socket
Feb 19 00:09:50 raspberrypi kernel: [ 2.119031] NET: Registered protocol family 17
Feb 19 00:09:50 raspberrypi kernel: [ 2.125027] Key type dns_resolver registered
Feb 19 00:09:50 raspberrypi kernel: [ 2.133992] Indeed it is in host mode hprt0 = 00021501
Feb 19 00:09:50 raspberrypi kernel: [ 2.140973] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
Feb 19 00:09:50 raspberrypi kernel: [ 2.169594] registered taskstats version 1
Feb 19 00:09:50 raspberrypi kernel: [ 2.179149] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Feb 19 00:09:50 raspberrypi kernel: [ 2.193195] Waiting for root device /dev/sda2...
Feb 19 00:09:50 raspberrypi kernel: [ 2.202631] mmc0: new high speed SDHC card at address 1234
Feb 19 00:09:50 raspberrypi kernel: [ 2.219515] mmcblk0: mmc0:1234 SA16G 14.6 GiB
Feb 19 00:09:50 raspberrypi kernel: [ 2.240476] mmcblk0: p1 p2
Feb 19 00:09:50 raspberrypi kernel: [ 2.368843] usb 1-1: new high-speed USB device number 2 using dwc_otg
Feb 19 00:09:50 raspberrypi kernel: [ 2.376938] Indeed it is in host mode hprt0 = 00001101
Feb 19 00:09:50 raspberrypi kernel: [ 2.579516] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
Feb 19 00:09:50 raspberrypi kernel: [ 2.587742] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Feb 19 00:09:50 raspberrypi kernel: [ 2.597407] hub 1-1:1.0: USB hub found
Feb 19 00:09:50 raspberrypi kernel: [ 2.602828] hub 1-1:1.0: 3 ports detected
Feb 19 00:09:50 raspberrypi kernel: [ 2.889024] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
Feb 19 00:09:50 raspberrypi kernel: [ 3.009564] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
Feb 19 00:09:50 raspberrypi kernel: [ 3.017948] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Feb 19 00:09:50 raspberrypi kernel: [ 3.029679] smsc95xx v1.0.4
Feb 19 00:09:50 raspberrypi kernel: [ 3.095007] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:f2:04:71
Feb 19 00:09:50 raspberrypi kernel: [ 3.189060] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
Feb 19 00:09:50 raspberrypi kernel: [ 3.314773] usb 1-1.2: New USB device found, idVendor=067b, idProduct=2303
Feb 19 00:09:50 raspberrypi kernel: [ 3.323347] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Feb 19 00:09:50 raspberrypi kernel: [ 3.332330] usb 1-1.2: Product: USB-Serial Controller
Feb 19 00:09:50 raspberrypi kernel: [ 3.338949] usb 1-1.2: Manufacturer: Prolific Technology Inc.
Feb 19 00:09:50 raspberrypi kernel: [ 3.439101] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
Feb 19 00:09:50 raspberrypi kernel: [ 3.561445] usb 1-1.3: New USB device found, idVendor=03f0, idProduct=f807
Feb 19 00:09:50 raspberrypi kernel: [ 3.569946] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 19 00:09:50 raspberrypi kernel: [ 3.578823] usb 1-1.3: Product: v221w
Feb 19 00:09:50 raspberrypi kernel: [ 3.584014] usb 1-1.3: Manufacturer: HP
Feb 19 00:09:50 raspberrypi kernel: [ 3.589353] usb 1-1.3: SerialNumber: AA41170090000239
Feb 19 00:09:50 raspberrypi kernel: [ 3.596931] usb-storage 1-1.3:1.0: USB Mass Storage device detected
Feb 19 00:09:50 raspberrypi kernel: [ 3.605401] scsi0 : usb-storage 1-1.3:1.0
Feb 19 00:09:50 raspberrypi kernel: [ 5.171628] scsi 0:0:0:0: Direct-Access hp v221w 1638 PQ: 0 ANSI: 4
Feb 19 00:09:50 raspberrypi kernel: [ 5.184126] sd 0:0:0:0: [sda] 31950720 512-byte logical blocks: (16.3 GB/15.2 GiB)
Feb 19 00:09:50 raspberrypi kernel: [ 5.196251] sd 0:0:0:0: [sda] Write Protect is off
Feb 19 00:09:50 raspberrypi kernel: [ 5.202804] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
Feb 19 00:09:50 raspberrypi kernel: [ 5.203491] sd 0:0:0:0: [sda] No Caching mode page found
Feb 19 00:09:50 raspberrypi kernel: [ 5.210442] sd 0:0:0:0: [sda] Assuming drive cache: write through
Feb 19 00:09:50 raspberrypi kernel: [ 5.221982] sd 0:0:0:0: [sda] No Caching mode page found
Feb 19 00:09:50 raspberrypi kernel: [ 5.228861] sd 0:0:0:0: [sda] Assuming drive cache: write through
Feb 19 00:09:50 raspberrypi kernel: [ 5.237687] sda: sda1 sda2
Feb 19 00:09:50 raspberrypi kernel: [ 5.245613] sd 0:0:0:0: [sda] No Caching mode page found
Feb 19 00:09:50 raspberrypi kernel: [ 5.252606] sd 0:0:0:0: [sda] Assuming drive cache: write through
Feb 19 00:09:50 raspberrypi kernel: [ 5.260225] sd 0:0:0:0: [sda] Attached SCSI removable disk
Feb 19 00:09:50 raspberrypi kernel: [ 5.355662] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
Feb 19 00:09:50 raspberrypi kernel: [ 5.366289] VFS: Mounted root (ext4 filesystem) on device 8:2.
Feb 19 00:09:50 raspberrypi kernel: [ 5.377771] devtmpfs: mounted
Feb 19 00:09:50 raspberrypi kernel: [ 5.382800] Freeing unused kernel memory: 144K (c0573000 - c0597000)
Feb 19 00:09:50 raspberrypi kernel: [ 8.254465] usbcore: registered new interface driver usbserial
Feb 19 00:09:50 raspberrypi kernel: [ 8.361984] usbcore: registered new interface driver usbserial_generic
Feb 19 00:09:50 raspberrypi kernel: [ 8.452647] usbserial: USB Serial support registered for generic
Feb 19 00:09:50 raspberrypi kernel: [ 8.665806] usbcore: registered new interface driver pl2303
Feb 19 00:09:50 raspberrypi kernel: [ 8.895834] bcm2708-i2s bcm2708-i2s.0: Failed to create debugfs directory
Feb 19 00:09:50 raspberrypi kernel: [ 8.919103] usbserial: USB Serial support registered for pl2303
Feb 19 00:09:50 raspberrypi kernel: [ 8.926855] pl2303 1-1.2:1.0: pl2303 converter detected
Feb 19 00:09:50 raspberrypi kernel: [ 9.359761] usb 1-1.2: pl2303 converter now attached to ttyUSB0
Feb 19 00:09:50 raspberrypi kernel: [ 13.780393] EXT4-fs (sda2): re-mounted. Opts: (null)
Feb 19 00:09:50 raspberrypi kernel: [ 14.191093] EXT4-fs (sda2): re-mounted. Opts: (null)
Feb 19 00:09:50 raspberrypi kernel: [ 20.209959] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Feb 19 00:09:50 raspberrypi kernel: [ 22.853994] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Feb 19 00:09:50 raspberrypi kernel: [ 24.467073] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
Feb 19 00:09:51 raspberrypi /usr/sbin/cron[1905]: (CRON) INFO (pidfile fd = 3)
Feb 19 00:09:51 raspberrypi /usr/sbin/cron[1906]: (CRON) STARTUP (fork ok)
Feb 19 00:09:51 raspberrypi /usr/sbin/cron[1906]: (CRON) INFO (Running @reboot jobs)
Feb 19 00:09:51 raspberrypi dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Feb 19 00:09:51 raspberrypi ifplugd(eth0)[1575]: client: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Feb 19 00:09:51 raspberrypi dhclient: DHCPOFFER from 192.168.1.1
Feb 19 00:09:51 raspberrypi ifplugd(eth0)[1575]: client: DHCPOFFER from 192.168.1.1
Feb 19 00:09:51 raspberrypi kernel: [ 27.572969] Adding 102396k swap on /var/swap. Priority:-1 extents:1 across:102396k FS
Feb 19 00:09:52 raspberrypi ntpd[1979]: ntpd 4.2...@1.2349-o Fri May 18 20:30:57 UTC 2012 (1)
Feb 19 00:09:52 raspberrypi ntpd[1982]: proto: precision = 1.000 usec
Feb 19 00:09:52 raspberrypi ntpd[1982]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Feb 19 00:09:52 raspberrypi ntpd[1982]: Listen normally on 1 lo 127.0.0.1 UDP 123
Feb 19 00:09:52 raspberrypi ntpd[1982]: peers refreshed
Feb 19 00:09:52 raspberrypi ntpd[1982]: Listening on routing socket on fd #18 for interface updates
Feb 19 00:09:52 raspberrypi ntpd[1982]: restrict: error in address '::' on line 38. Ignoring...
Feb 19 00:09:52 raspberrypi ntpd[1982]: restrict: error in address '::1' on line 42. Ignoring...
Feb 19 00:09:52 raspberrypi ntpd[1982]: Deferring DNS for 0.debian.pool.ntp.org 1
Feb 19 00:09:52 raspberrypi ntpd[1982]: Deferring DNS for 1.debian.pool.ntp.org 1
Feb 19 00:09:52 raspberrypi ntpd[1982]: Deferring DNS for 2.debian.pool.ntp.org 1
Feb 19 00:09:52 raspberrypi ntpd[1982]: Deferring DNS for 3.debian.pool.ntp.org 1
Feb 19 00:09:52 raspberrypi ntpd[1991]: signal_no_reset: signal 17 had flags 4000000
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: Found user 'avahi' (UID 107) and group 'avahi' (GID 110).
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: Successfully dropped root privileges.
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: avahi-daemon 0.6.31 starting up.
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: Successfully called chroot().
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: Successfully dropped remaining capabilities.
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: Loading service file /services/udisks.service.
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: socket() failed: Address family not supported by protocol
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: Failed to create IPv6 socket, proceeding in IPv4 only mode
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: socket() failed: Address family not supported by protocol
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: Network interface enumeration completed.
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: Registering HINFO record with values 'ARMV6L'/'LINUX'.
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: Server startup complete. Host name is raspberrypi.local. Local service cookie is 1318528320.
Feb 19 00:09:52 raspberrypi avahi-daemon[2008]: Service "raspberrypi" (/services/udisks.service) successfully established.
Feb 19 00:09:53 raspberrypi dhclient: DHCPACK from 192.168.1.1
Feb 19 00:09:53 raspberrypi ifplugd(eth0)[1575]: client: DHCPACK from 192.168.1.1
Feb 19 00:09:53 raspberrypi avahi-daemon[2008]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.6.
Feb 19 00:09:53 raspberrypi avahi-daemon[2008]: New relevant interface eth0.IPv4 for mDNS.
Feb 19 00:09:53 raspberrypi avahi-daemon[2008]: Registering new address record for 192.168.1.6 on eth0.IPv4.
Feb 19 00:09:53 raspberrypi dhclient: bound to 192.168.1.6 -- renewal in 41366 seconds.
Feb 19 00:09:53 raspberrypi ifplugd(eth0)[1575]: client: bound to 192.168.1.6 -- renewal in 41366 seconds.
Feb 19 00:09:54 raspberrypi ntpd[1982]: ntpd exiting on signal 15
Feb 19 00:09:54 raspberrypi ntpd_intres[1991]: DNS 0.debian.pool.ntp.org -> 204.2.134.163
Feb 19 00:09:54 raspberrypi ntpd_intres[1991]: parent died before we finished, exiting
Feb 19 00:17:06 raspberrypi ntpdate[2183]: step time server 208.68.36.196 offset 422.055244 sec
Feb 19 00:17:06 raspberrypi ifplugd(eth0)[1575]: Program executed successfully.
Feb 19 00:17:13 raspberrypi ntpd[2240]: ntpd 4.2...@1.2349-o Fri May 18 20:30:57 UTC 2012 (1)
Feb 19 00:17:13 raspberrypi ntpd[2241]: proto: precision = 1.000 usec
Feb 19 00:17:13 raspberrypi ntpd[2241]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Feb 19 00:17:13 raspberrypi ntpd[2241]: Listen normally on 1 lo 127.0.0.1 UDP 123
Feb 19 00:17:13 raspberrypi ntpd[2241]: Listen normally on 2 eth0 192.168.1.6 UDP 123
Feb 19 00:17:13 raspberrypi ntpd[2241]: peers refreshed
Feb 19 00:17:13 raspberrypi ntpd[2241]: Listening on routing socket on fd #19 for interface updates
Feb 19 00:17:13 raspberrypi ntpd[2241]: restrict: error in address '::' on line 38. Ignoring...
Feb 19 00:17:13 raspberrypi ntpd[2241]: restrict: error in address '::1' on line 42. Ignoring...
Feb 19 00:17:33 raspberrypi weewx[2275]: wxengine: Initializing weewx version 2.6.1
# Ensure NTP is up
sleep 30s
sudo /etc/init.d/ntp restart
if ! ntp-wait -v -n 20 -s 3; then
log_daemon_msg "Not starting $DESC: NTP not synchronised" "$NAME"
return 2
fi
--
You received this message because you are subscribed to the Google Groups "Weewx user's group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
pi@raspberrypi ~ $ sudo /etc/init.d/weewx startTo add to the mystery, I have gotten this script to work a handful of times, but only after the Pi has run for a while (as in hours) beforehand and I start it manually. It is strange. It has never worked on boot for me (I can't find any error messages in syslog to tell me why)
[....] Starting weewx weather system: weewxWaiting for ntpd to synchronize... No!
ntpd did not synchronize.
[FAIL] Not starting weewx weather system: NTP not synchronised: weewx failed!
pi@raspberrypi ~ $ sudo /etc/init.d/weewx startAnd weewx starts up according to syslog. However, the script doesn't always start weewx on boot. It's about 50/50. The syslog shows NTP starting due to the boot process, then closing due to the ntp restart command in the script, then reopening. However there are no further messages in syslog relating to the script nor is there any weewx error message. I expect that there would be an output similar to above ("Not starting weewx weather system: NTP not synchronised: weewx failed!") but I can't find the log file where this would be. Do you know where I can look to see the error output of the init.d script?
[ ok ] Starting weewx weather system: weewx[....] Stopping NTP server: ntpd.
[ ok ] Starting NTP server: ntpd.
Waiting for ntpd to synchronize... OK!
. ok
Feb 27 11:59:32 raspberrypi ntpd[2079]: ntpd 4.2...@1.2349-o Fri May 18 20:30:57 UTC 2012 (1)
Feb 27 11:59:32 raspberrypi ntpd[2086]: proto: precision = 1.000 usec
Feb 27 11:59:32 raspberrypi ntpd[2086]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Feb 27 11:59:32 raspberrypi ntpd[2086]: Listen normally on 1 lo 127.0.0.1 UDP 123
Feb 27 11:59:32 raspberrypi ntpd[2086]: Listen normally on 2 eth0 192.168.1.9 UDP 123
Feb 27 11:59:32 raspberrypi ntpd[2086]: peers refreshed
Feb 27 11:59:32 raspberrypi ntpd[2086]: Listening on routing socket on fd #19 for interface updates
Feb 27 11:59:32 raspberrypi ntpd[2086]: restrict: error in address '::' on line 38. Ignoring...
Feb 27 11:59:32 raspberrypi ntpd[2086]: restrict: error in address '::1' on line 42. Ignoring...
Feb 27 11:59:33 raspberrypi ntpdate[2133]: the NTP socket is in use, exiting
Feb 27 11:59:33 raspberrypi ifplugd(eth0)[1649]: Program executed successfully.
Feb 27 11:59:34 raspberrypi ntpd[2086]: ntpd exiting on signal 15
...
Feb 27 11:59:37 raspberrypi ntpd[2286]: ntpd 4.2...@1.2349-o Fri May 18 20:30:57 UTC 2012 (1)
Feb 27 11:59:37 raspberrypi ntpd[2290]: proto: precision = 0.999 usec
Feb 27 11:59:37 raspberrypi ntpd[2290]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Feb 27 11:59:37 raspberrypi ntpd[2290]: Listen normally on 1 lo 127.0.0.1 UDP 123
Feb 27 11:59:37 raspberrypi ntpd[2290]: Listen normally on 2 eth0 192.168.1.9 UDP 123
Feb 27 11:59:37 raspberrypi ntpd[2290]: peers refreshed
Feb 27 11:59:37 raspberrypi ntpd[2290]: Listening on routing socket on fd #19 for interface updates
Feb 27 11:59:37 raspberrypi ntpd[2290]: restrict: error in address '::' on line 38. Ignoring...
Feb 27 11:59:37 raspberrypi ntpd[2290]: restrict: error in address '::1' on line 42. Ignoring...
sudo update-rc.d -f ntp remove
(If you end up wanting to start ntpd again at boot, just run "sudo update-rc.d ntp defaults")
Third step: edit the /etc/init.d/weewx startup script
First save the original one for a backup copy in case things go south
# sudo cp /etc/init.d/weewx /etc/init.d/weewx.orig
Now edit the startup script to insert the following, starting at line 64
# sudo nano /etc/init.d/weewx
Scroll down until you see:
NPROC=`ps ax | grep $WEEWX_BIN | grep $NAME.pid | wc -l`if [ $NPROC != 0 ]; thenreturn 1fi
Right after that, insert the following:
# Ensure NTP is up
# On boot, get time with ntpdate then start ntpd
if echo "" && sudo ntpdate-debian; then
sudo /etc/init.d/ntp start
logger -s "Starting $DESC: ntpdate synchronised time"
# If ntpdate-debian fails, restart ntpd and check for ntp synchronization
elif sudo /etc/init.d/ntp restart && ntp-wait -v -n 20 -s 3; then
logger -s "Starting $DESC: ntpd synchronised time"
# If both fail, then provide error message and make sure ntpd is running regardless
else
logger -s "Not starting $DESC: NTP not synchronised, check internet connection"
sudo /etc/init.d/ntp start
return 2
fi
Now save the edit.
Fourth step: make an edit to the ntp-wait command
First make a backup copy of itif (/Connection refused/) {print "\bntpd is not running!\n" if ($opt_v);last;}
# Otherwise, we have a bigger problem.
$ sudo apt-get remove fake-hwclock
Then remove the old, recorded time:
$ sudo rm /etc/fake-hwclock.data--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I know this is an old thread but I want to ask you about another possible solution. I have a Particle Photon based weather station that I have dumping sensor readings to a phant server I have running on my network. The phant server timestamps everything in UTC. I can then do a jsonp query with a cron job python script I have running then parse that into a format that fileparse.py likes. I also parse out and convert the EST corrected timestamp from the server into unix epoch format. Can weewx be set up to ignore it's own timestamps and just use the imported ones, which technically are more accurate because they represent the very moment the reading was taken? I tried using fileparse to import the timestamp into the dateTime label in weewx, but I think it didn't like that.
Another possible solution to the NTP problem is to use a server you have on your local network and configure it as an NTP relay. I have a freenas box running my phant server in a jail on it so would be easy to just set it up to act as an NTP relay and have the Pi sync from that rather than the internet, therefore I can operate completely in a net down situation and keep collecting data with proper timestamps.