Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

a cli histogram generator for real-time log changes

branch: master
README.textile

loghist – a cli histogram generator for real-time log changes

Amin Astaneh <amin@aminastaneh.net>
Copyright © 2012

Description

loghist, inspired by spark (https://github.com/holman/spark), tails a specified log and creates a histogram based on frequency of search matches via grep and a specified interval in seconds.

Example Usage

Usage: ./loghist file seconds expression
 file: logfile to generate histogram from
 seconds: number of seconds between samples
 expression: uses grep

This generates a histogram for HTTP 200s from the current apache logfile, sampling every 5 seconds.

root@machine:~$ loghist /var/log/apache2/access.log 5 "HTTP/1.0\" 200"
2012/03/25 21:03:08 | 18 	==================
2012/03/25 21:03:13 | 30 	==============================
2012/03/25 21:03:18 | 26 	==========================
2012/03/25 21:03:23 | 17 	=================
2012/03/25 21:03:28 | 25 	=========================
2012/03/25 21:03:33 | 28 	============================

Enjoy!

Something went wrong with that request. Please try again.