Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been searching for a small but functional PHP script or similar that I can expose via apache. Basically I'd like what "tail -f /var/log/something" does, but visible via a web browser. I'm finding various solutions, but most of them operate with something similar to "tail -10" under the hood - which is fine if the log is "slow" in writing - as you can imagine data can be "lost" between poll attempts of more than that number of lines was written.

Is there anything lightweight that satisfies what I am looking for? Something like Splunk is way beyond what I need or want.

share|improve this question
I actually submitted the "tail -f" feature request for Splunk several years ago. What didn't you like about Splunk for this requirement? – dmourati May 31 '11 at 22:44
Splunk has a high footprint compared to what you would see with a simple script. I am using it for the moment - it's like using a backhoe to blank a flower. – draeath Jun 2 '11 at 15:25

For realtime tailing, you probably want websockets. Node.js comes to mind. See the first answer here. Edit: guess that answer suggested but didn't implement I'd google around for nodejs tail dash f

share|improve this answer

Instead of using tail, you could diff your current content against the file, and just remove "> " from each of the diff output before adding it to the page.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.