Monitoring Log files in Realtime on Unix
December 06, 2006

Here's a handy trick for monitoring log files on unix, linux or mac's.
SSH on to your server then type:
tail -f /var/log/httpd/access_log
The above command will show you the last few lines of the log file, this is no suprise if your fimiliar with tail command. However the -f option will print to your console any new lines added to the log file in realtime. So you can get a live view of the traffic on your server.
Tweet
Related Entries
- The 15 Essential UNIX commands - July 29, 2005
- A good and free log analysis tool - awstats - August 27, 2003
Trackbacks
Trackback Address: 604/FD72D345D843B4261E3A14696671B5DC
Comments
On 12/06/2006 at 6:54:50 PM EST Flo wrote:
1
Multitail <http://www.vanheusden.com/multitail/> is even more useful. It displays multiple logfiles in split windows on your console and can even merge several logfiles in one view or show you program output (eg. lsof -i) Give it a go!
On 12/07/2006 at 1:41:17 PM EST Bernie Dolan wrote:
2
I've also found it helpful to use grep if you want to filter your "realtime" tailed output by IP address, page name, etc.
tail -f /var/log/httpd/access_log | grep '192.168.1.100'
On 12/07/2006 at 2:24:35 PM EST thad wrote:
3
works on windows too, if you install cygwin and add C:\cygwin\bin to your path - http://www.cygwin.com/
On 11/18/2008 at 10:49:10 AM EST leofox wrote:
4
How do tail on a log file that will be created in the current working directory?
On 08/13/2010 at 6:48:31 PM EDT Joe wrote:
5
This is fantastic. Thanks for the tip :)
On 12/14/2010 at 12:49:02 PM EST Joe Bolognme wrote:
6
Thanks much!
Post a Comment
Recent Entries
- Nginx redirect www to non www domain
- HashDOS and ColdFusion
- HackMyCF Updated for APSB11-29 Security Hotfix
- Adobe eSeminar on FuseGuard
- Determining Which Cumulative Hotfixes are Installed on ColdFusion
- Adding Two Factor Authentication to ColdFusion Administrator
- ColdFusion Developer Week at Adobe.com
- Bug Loading Scripts for CFFileUpload and CFMediaPlayer


add to del.icio.us


