Samba, CIFS, tail, Perl, and the meaning of life

I’m having some issues with all of the above, and it’s just not as much fun as it was when I started.

Here’s the deal:

Using QNX 6.2.1 as a server, I have a bunch of remote machines (WinXP) which interface with it. There are logfiles that the server generates which are very useful to tail. However, this is where the fun begins.

The user of the WinXP machine wants to be able to tail the file. I tried using CIFS to mount a windows share and dump the (ever growing) logfile there. Ignoring the issue I had with the timestamp incrementing every time the file was written, all the tail utilities I found for windows got really angry at this ever-growing file. If the program managed to access the file, it would actually cause QNX to stop being able to spit data into it until you closed the program. Then (apparently via some form of QNX magic), all of the data would get spit into the file, available the next time you opened it.

Fine QNX, have it your way, I said to myself. So I tried exploring a samba share on QNX from windows. Touche, said QNX, not a chance. In this instance, windows didn’t seem to be able to recognize (at any reasonable pace) the file being re-written by QNX. Tail utilities opened it just fine, but were very slow to update.

Then I thought to use Perl. Unfortunately, this is where I got stuck. There is a Net::Telnet module for PERL which can do things very nicely. However, it doesn’t (so nicely) spit data to stdout. It is capable of spitting simple things, but not the tail of an ever growing file.

So, folks, I look to you for help. I need to be able to tail a remote file on a QNX server from Windows using some type of scripting. A webpage on the QNX server that updates frequently (once every second or two) would be acceptable, but I cannot require the user to have to manually log into the server and “tail -f”…

Thanks in advance,

If a web page is acceptable, run slinger on QNX. The web page can be build with CGI and java script to auto update the content. I did this on QNX a while ago to provide web access to look at process list (output to sin). That was on QNX4 but the same should be easy to do with QNX6.


Thanks for the input. We’re actually already running Apache on the servers for some other stuff, so it’s all good there.

I just need to find some cgi/js tail code now :slight_smile:

Why don’t you can tail directory ?