For security reasons (I'm a developer) I do not have command line access to our Production servers where log files are written. I can, however access those log files over HTTP. Is there a utility in the manner of "tail -f" that can "follow" a plain text file using only HTTP?
A:
You can use PsExec to execute command on remote computer. The tail command for windows can be found at http://tailforwin32.sourceforge.net/
If it has to be HTTP, you can write a light weight web service to achieve that easily. e.g., read text within a specified file from line 0 to line 200.
codemeit
2009-10-29 18:45:47
I wouldn't be able to execute anything remotely, that would make the security people apoplectic. I was hoping something already existed before I tried rolling my own.
kurosch
2009-10-29 21:50:45
+1
A:
You can do this if the HTTP server accepts requests to return parts of a resource. For example, if an HTTP request contains the header:
Range: bytes=-500
the response will contain the last 500 bytes of the resource. You can fetch that and then parse it into lines, etc. I don't know of any ready-made clients which will do this for you - I'd write a script to do the job.
You can use Hurl to experiment with headers (from publicly available resources).
Vinay Sajip
2009-11-02 09:24:07
+1 This is very helpful. I had a thought of using a HEAD method to hopefully get the size of the resource to see if anything new had been added. Coupled with a GET on a specific range I might be on to something. Thanks!
kurosch
2009-11-02 18:08:58