Using glTail
This week I found a gem (literally) called glTail, it’s a log file visualizer using the tail command. All you need is Ruby and RubyGems. If you don’t have either of those (Ruby or RubyGems), follow this tutorial first.
It’s a very simple install process, and I made it much harder the first 10 times I tried. I can’t get this to work on a Macbook, but on a Mac Pro, iMac, or Macbook Pro this works fine.
First check to see what version of Ruby you have, open Terminal.app and type:
ruby -v
It should return something like:
The-Kid:~ garrett$ ruby -v ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
Next you need to check which version of RubyGems that you have, again type:
The-Kid:~ garrett$ gem -v 1.3.1
If it’s anything else, I suggest upgrading it:
sudo gem update --system
After that you should be good to go to install the required gems.
sudo gem install net-ssh -v 1.1.4
sudo gem install ruby-opengl file-tail
Just to be safe we will install the glTail gem on it’s own after the previous gems were installed correctly.
sudo gem install gltail
After it is installed, simply go to your home directory, (run the command cd ~/) and install the yaml file (you can name it whatever you want).
gl_tail --new config.yaml
And this will place an easy to understand configuration file where you told it to, in this case it will be located at ~/config.yaml. Now lets open up the config file, and add/edit our first site.
mate ~/config.yaml
A quick note, you will regret using any tabs inside of here, just use space whenever you want to indent. Additionally you can add the port option if you need to connect via a certain port.
servers:
customsitename:
host: site.com
user: username
password: password
command: tail -f -n0
files: /var/log/apache2/access.log
parser: apache
color: 0.2, 1.0, 0.2, 1.0
That’s all you need to do, now lets run the command (make sure you are in your home directory first):
gl_tail configfile config.yaml
Now you should see something along the lines of:

That’s all you need to do, if you want more configuration, read on. Instead of just using the apache log, you can use any of the supported parsers; apache, iis, mysql, nginx, pix, postfix, postgresql, pureftpd, qmail, rails, squid, tshark.
I currently take advantage of my MySQL slow query log, and using my production log for my website. You should be able to drag the corner of the glTail window to make it bigger, but there is a specific config option inside the yaml file.
config:
dimensions: 1200x600
I can’t offer too much help if anything goes awry, seeing as I can’t get this to work on my Macbook, but if something goes wrong go ahead and post your log and I will try to help.













