Hallo Thibaut Thanx for the fast answer.
> > Is the file opened at start and closed on normal shutdown > > (whith start-stop-daemon)? > No. The records file is only open when necessary. The daemon doesn't > write directly to that file either. It writes to a temporary file and > then moves it in place of the old records file. I don't see how that > think that the default update interval of 60s is probably overkill and > prone to that kind of situation... Temporary write and move, then this must be the problem (what else?). > > I suggest to open the file, write whatever and close immedately > > every time. > Which is exactly what is done, afaik. > > Suggested cronjob workaround (not tested): > > @daily /etc/init.d/uptimed restart > How's that suppose to help? All files are closed and opended again (but that isn't the way the program works, you say). I tried to kill -9 the job several times, but the error was not reproducable (random 1 returns 0..9 randomly): # while true; do sleep $((55 + $(random 1) )); kill -9 $(ps aux | grep -v grep | grep uptim | tr -s ' ' | cut -d' ' -f2); sleep 3; /etc/init.d/uptimed start; cat /var/spool/uptimed/records; done > Out of curiosity, what filesystem are you using on your system? In > particular what file system is used on /var/spool/uptimed ? From /etc/fstab: /dev/hda8 /var xfs defaults 0 2 From <http://en.wikipedia.org/wiki/XFS>: > Journaling is an approach to guaranteeing file system consistency even > in presence of power failures or system crashes. XFS provides > journaling for file system metadata, where file system updates are > first written to a serial journal before the actual disk blocks are > updated. > .... > Where recently modified data has not been flushed to disk before a > system crash, XFS ensures that any unwritten data blocks are zeroed on > reboot, .... XFS's journaling procedures are similar to > the "writeback" level of ext3. The part "unwritten data blocks are zeroed" could be the problem. What do you think? I will set the update interval to 600s and pray ;-) cu Peter