I'm starting a new bug for this, as I was advised to do per this "RESOLVED" bug. http://bugs.gentoo.org/show_bug.cgi?id=34708 The problem I am having is that I would like to use clockspeed to constantly adjust my system clock. Unlike an NTP client that periodically sync's to an NTP server, clockspeed "uses a hardware tick counter to compensate for a persistently fast or slow system clock. Given a few time measurements from a reliable source, it computes and then eliminates the clock skew." The difference between your system's clock and the accurate NTP server is supposed to be stored in the "atto" file; presumably at /var/lib/clockspeed/atto. From http://www.thedjbway.org/clockspeed/marktime.html, "The two calibration marks allow clockspeed to calculate the number of attoseconds (quintillionths, or 10-18, of a second) in one tick of the hardware tick counter." I am trying to use daemontools to start clockspeed to keep my system clock accurate. The run script for daemontools is very basic, consisting only of: #!/bin/sh exec /usr/bin/clockspeed That should be enough to get it up and running. I don't believe clockspeed spits out any loggable information. The first problem is that clockspeed keeps exiting(crashing?) and then is repeatedly restarted by supervise. The second problem is that there is no "atto" file. Could that be causing the first problem? clockspeed definitely needs the atto file so that it knows how to adjust the clock. I've been trying to produce an "atto" file by repeatedly issuing the following command: # sntpclock 198.49.126.4 > /var/lib/clockspeed/adjust Doing that twice should produce an atto and atto.tmp file. Or is clockspeed crashing before it can produce an atto file from the information in /var/lib/clockspeed/adjust? I have no idea. But I know that clockspeed does not work on my system. Could this be related to Gentoo putting the clockspeed working directory in an alternate location. I believe the default location is /usr/local/clockspeed. Was the source for the clockspeed executable maybe not updated to look for the "atto" file in /var/lib/clockspeed? Most, if not all, of the other components of the clockspeed package are working, including: sntpclock, clockview, clockadd. So I am able to initially sync my clock up, that's not the problem. The problem is that I am unable to get clockspeed to run, to use the "atto" file, so that I don't have to constantly sync to NTP servers to stay accurate. Thanks J Reproducible: Always Steps to Reproduce: 1.Start clockspeed - it exits 2. 3. Actual Results: nothing happens Expected Results: 1) clockspeed should run 2) it should find the "atto" file so it knows how persistantly fast or slow my system clock runs 3) it should constantly adjust my system clock using the information in the "atto" file 4) my system clock should be appear to be keeping nearly perfect time Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 i686) ================================================================= System uname: 2.6.11-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 1500MHz Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 29 2005, 07:22:41)] dev-lang/python: 2.3.5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.9.5, 1.4_p6, 1.8.5-r3 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://cudlug.cudenver.edu/gentoo/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" LC_ALL="en_US" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X acpi adns alsa apache2 artworkextra avi berkdb bitmap-fonts cdr crypt cups curl directfb doc dvdreds eds emboss encode esd fam fbcon flac flash foomaticdb fortran gd gdbm gif gnome gpm gstreamer gtk gtk2 guile hal imagemagick imlib java jpeg libg++ libwww mad maildir mikmod mmx mozilla mozsvg mp3 mpeg mysql ncurses nptl ogg oggvorbis opengl pam pda pdflib png python qmail quicktime readline real samba scanner sdl slang speex spell sse ssl svg svga tcpd tetex truetype truetype-fonts type1-fonts unicode usb vorbis xine xml xml2 xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LDFLAGS, LINGUAS
works fine on my system: clockspeed & rm -f /var/lib/clockspeed/atto sntpclock 212.204.235.157 > /var/lib/clockspeed/adjust sleep 5 sntpclock 212.204.235.157 > /var/lib/clockspeed/adjust ls -l /var/lib/clockspeed/atto -rw-r--r-- 1 root root 16 May 14 14:27 /var/lib/clockspeed/atto
I tried doing exactly what you did and it didn't work for me. Here's the ouput: [root /var/lib/clockspeed]# ls -la total 16 drwxr-xr-x 2 root root 4096 May 10 09:52 ./ drwxr-xr-x 16 root root 4096 May 4 11:05 ../ -rw-r--r-- 1 root root 16 May 13 10:46 adjust -rw-r--r-- 1 root root 176 May 10 09:50 leapsecs.dat [root /var/lib/clockspeed]# clockspeed & [1] 19193 [root /var/lib/clockspeed]# sntpclock 212.204.235.157 > /var/lib/clockspeed/adjust [1]+ Exit 1 clockspeed [root /var/lib/clockspeed]# sleep 5 [root /var/lib/clockspeed]# sntpclock 212.204.235.157 > /var/lib/clockspeed/adjust [root /var/lib/clockspeed]# ls -la total 16 drwxr-xr-x 2 root root 4096 May 10 09:52 ./ drwxr-xr-x 16 root root 4096 May 4 11:05 ../ -rw-r--r-- 1 root root 16 May 14 20:07 adjust -rw-r--r-- 1 root root 176 May 10 09:50 leapsecs.dat [root /var/lib/clockspeed]# It simply does not work on my machine and I have no idea why. I've recompiled it twice now hoping that something might change, no luck. I can't get it to create an atto file. J
Just an update, I was able to get clockspeed working and get an atto file created. Here is what I did: 1) I completely uninstalled everything related to clockspeed 2) I added the "debug" USE flag to /etc/portage/package.use 3) I emerged clockspeed 4) I followed your instructions above and it worked I don't think compiling with the debug USE flag actually did anything to make it work, but I'm not sure. However, there is one clear thing that is different this time, the /var/lib/clockspeed/adjust file is not a "real" file. [root /var/lib/clockspeed]# ls -l total 8 prw------- 1 root root 0 May 17 10:23 adjust| -rw-r--r-- 1 root root 16 May 17 10:23 atto -rw-r--r-- 1 root root 176 May 17 10:04 leapsecs.dat I think there was one, or possibly two problems with my clockspeed setup and they both revolve around the adjust file. With previous attempts at starting clockspeed, the adjust file was an actual file with a file size rather than a named pipe. It is now clear that that should not be the case. So I'm not sure if clockspeed was crashing and that caused the command sntpclock 1.2.3.4 > adjust to create an actual file rather than a named pipe or if adjust being an actual file was causing clockspeed to crash, and so on in a circle. Either way, clockspeed needs to be running, so that it creates the adjust file and the atto file. So I guess this is now resolved for me. Thanks. J