[Samba] tail -f doesn't work on a smbfs mount

Urban Widmark urban at teststation.com
Thu Jul 4 13:19:31 GMT 2002


On Thu, 4 Jul 2002, Chavez Gutierrez, Freddy wrote:

> I mount a WinNT share using a samba client version 2.2.5:
>   smbmount -t smbfs -o username=user //ntserver/share  /logs
> 
> Then I want to watch a log generated by Internet Information
> Server (IIS) that grows continually:
>   tail -f /logs/zzz.txt

Which logfile is this?

Looking at the files in %systemroot%\system32\LogFiles it looks like IIS
writes them in 64k chunks. So I get the updates, but only after it crosses
the boundary. Remounting here changes nothing.

(Looking with smbfs and smbclient. I have no console access to the server
 right now, so I can't check what windows thinks).

But it does look like 'tail -f' doesn't print everything that is written
to the log when the 64k chunks are added to it. Maybe that is how tail
works when "too much" is written at once, I don't know.

I've run something like 'ab -n 1000 http://server/some/file' to generate
log entries.


Other logfiles on that server that are written to by some java servlet are
updated continously by tail. The reason I asked for kernel version is that
with some 2.2 versions 'tail -f' wouldn't work at all ...

> If I umount then mount again, I can see the new lines in the file.

... and the reason for that sounds very much like this, the inode (size 
etc) would be remembered indefinitly.

If you run a network trace program (ethereal) on port 139 you should get a
series of requests asking for attributes of this file.


> I have to say that IIS block the file zzz.txt against write,
> but permit read that file.

What do you mean by this?
Are you getting any error messages from the kernel code? (run dmesg)

In my tests I ran as 'administrator', could there be a permission issue 
here?

/Urban





More information about the samba mailing list