Chavez Gutierrez, Freddy
2002-Jul-04 07:09 UTC
[Samba] tail -f doesn't work on a smbfs mount
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 I can see the last lines in file zzz.txt the first time, but I don't get the new lines that are appended in such file. From any windows station I have no problem seeing the file zzz.txt updated. I tried "tail --follow /logs/zzz.txt" and doesn't work either. If I umount then mount again, I can see the new lines in the file. I have to say that IIS block the file zzz.txt against write, but permit read that file. Thanks for your help. Freddy Chavez. -------------- next part -------------- HTML attachment scrubbed and removed
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.txtKernel version? /Urban
Chavez Gutierrez, Freddy
2002-Jul-04 09:11 UTC
[Samba] tail -f doesn't work on a smbfs mount
> 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>Kernel version?Red Hat Linux 7.3 with kernel 2.4.18. -------------- next part -------------- HTML attachment scrubbed and removed
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.txtWhich 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