[plug] tail -f /var/log/messages
Christian
christian at amnet.net.au
Wed May 31 11:45:30 WST 2000
On Tue, May 30, 2000 at 09:18:34AM +0800, Earnshaw, Mike wrote:
> List,
>
> I am trying to monitor the /var/log/messages file in a quick smart
> fashion (I hesitate to use the term real time), I normally use
>
> tail -f /var/log/messages
>
> but there seems to be some delay before the screen reflects what has
> happened in the log. Is there a way to increase the "polling speed" of
> this command. 'Man tail' on my machine did not indicate so.
How do you know there's a delay? If you're tailing the file then you're
probably going to get the information quicker than if you open another
window and run 'tail file'. From my experience there certainly is a
delay but probably of no more than a second and I attribute most of
this to syslog. For example, if you run something like ippl and ping
your own machine then by the second ping or so there will be the first
line written into the log file. The second line will not be written
because syslog buffers it's log events so that it can write lines like
"Last message repeated x times". Honestly, if you add up all the
different factors involved (other programs running in their given
timeslice, context switches, syslog's processing of the event plus any
other current events, buffered disk I/O etc.) then I doubt most of the
delay is coming from tail. But even if it is, a one second delay
probably isn't unacceptable if you're manually monitoring the log file!
Your response time will be orders of magnitude greater.
Regards,
Christian.
More information about the plug
mailing list