Tail log files on web servers
Tailing files on a web server
Many programs generate log files. Tools like JLogTailer can be used when you have direct access to the filesystem that stores each log file.
Sometimes you may not have direct access to your log file. As long as the log file can be viewed via a web server, it is possible to tail it with WebTail.
WebTail lets you to tail the contents of log files stored on web servers. This allows you to view entries soon after they have been appended to the log file. It also reduces the amount of bandwidth compared with downloading the full file several times.
Tailing web pages with WebTail
Just run the program with no parameters to see the simple useage instructions:
C:\java\WebTail\> java -jar WebTail.jar Usage: java -jar WebTail.jar <url> [update_interval]
The update_interval is an optional parameter and specifies the number of seconds between each request made to the web server. The default value is 60 seconds.
Here is an example of a web server log file being tailed with WebTail:
C:\java\WebTail\> java -jar WebTail.jar http://your.web.server/logfile.txt 10 [Thu Dec 13 10:24:54 GMT 2001] 129.12.*.* "GET / HTTP/1.1" 200 [Thu Dec 13 10:24:55 GMT 2001] 129.12.*.* "GET /Thumbs.db HTTP/1.1" 200 [Thu Dec 13 10:26:13 GMT 2001] 129.12.*.* "GET /data/ HTTP/1.1" 200 [Thu Dec 13 10:26:19 GMT 2001] 129.12.*.* "GET /data HTTP/1.1" 200 [Thu Dec 13 10:27:33 GMT 2001] 129.12.*.* "GET /data/ HTTP/1.1" 200 [Thu Dec 13 10:31:00 GMT 2001] 129.12.*.* "GET /data/ HTTP/1.1" 200 [Thu Dec 13 10:31:07 GMT 2001] 129.12.*.* "GET / HTTP/1.1" 200
Technical requirements and reducing bandwidth
WebTail will work if your web server allows HEAD requests and reports the size of your log file. Tailing is not possible otherwise, and WebTail will exit.
Each time WebTail updates the display, it asks the web server how large the document is and then downloads only the new portion of the file. This results in much, much lower bandwidth usage than downloading the entire file every time you want to see if something new has been appended. The tail of the log is only downloaded if it has grown in size since the last check. If the log file is truncated, the tailing resumes from the end of the file.
This software product is OSI Certified Open Source Software, available under the GNU General Public License (GPL). Since the GPL may be too restrictive for use in proprietary applications, a commercial license is also provided.
Purchase a commercial license for this software.
Search this site
Copyright Paul Mutton 2001-2013