Package: coreutils
Version: 5.97-5.3
Severity: normal

Hi,

I noticed that tail does not react as snappy to changes in a file it
monitors (using 'tail -f') as is technically possible. So I did an
strace on it and found the following
fstat(3, {st_mode=S_IFREG|0644, st_size=3559, ...}) = 0
nanosleep({1, 0}, NULL)                 = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3559, ...}) = 0
nanosleep({1, 0}, NULL)                 = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3559, ...}) = 0
nanosleep({1, 0}, NULL)                 = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3559, ...}) = 0
nanosleep({1, 0}, NULL)                 = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3559, ...}) = 0
nanosleep({1, 0}, NULL)                 = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3559, ...}) = 0
nanosleep({1, 0}, NULL)                 = 0
...
as you can see it sleeps for a second between each check. Causing a
delay of maximum 1 second before a change in the file monitored is
reflected in the output of tail. Furthermore: it is not efficient to use
fstat to see what has changed to the file. I propose a change to tail
that either uses directly the inotify kernel-interface or via de sgi
FAM-daemon. I once already implemented this using the older dnotify
interface.


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.18-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages coreutils depends on:
ii  libacl1                       2.2.42-1   Access control list shared library
ii  libc6                         2.5-5      GNU C Library: Shared libraries
ii  libselinux1                   1.32-3     SELinux shared libraries

coreutils recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to