github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

ngauthier / watch_me

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Watch multiple log files in a single terminal window — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

initial commit 
Nick Gauthier (author)
Wed Nov 12 08:24:40 -0800 2008
commit  ad541f7ea8c0a23bb9ac55030382ee7aeb1e900c
tree    0ae38bb66e66cae21198aeee4c73df8f968dec5c
watch_me /
name age
history
message
file README Loading commit data...
directory examples/
file watch_me.rb
README
============
= Watch Me =
============
Nick Gauthier (nick@smartlogicsolutions.com)

===========
= Purpose =
===========
The purpose of watch me is to allow developers to watch multiple log files at once in a single
terminal. This is very useful when viewing logs over SSH because you don't have to open multiple
sessions in order to watch multiple logs.

=========
= Usage =
=========
Using watch_me is very simple:

Usage: watch_me.rb -l lines -r refresh file1 [file2 file3 ...]
       lines: number of rows to use, a.k.a. height of console. Default 24.
       refresh: refresh interval in seconds. Default 4

The lines option is important if you want to make full use of your terminal space. Set this value
to the number of rows that your terminal is sized to display. This defaults to 24, as many terminals
open in 80x24 by default.

The refresh option is the number of seconds between each log refresh.

The number of lines to display per file is automatically calculated using the number of files and
the number of lines for the entire application.

watch_me uses tail in order to view the most recent log entries.

============
= Examples =
============

For a simple example, perform the following actions:

1) Open 3 terminal windows in the watch_me directory
2) In the first terminal, run:
   $ ./examples/rander.rb > rander.1.log
3) In the second terminal, run:
   $ ./examples/rander.rb > rander.2.log
4) In the third terminal, run:
   $ ./watch_me.rb rander.1.log rander.2.log
   
The rander script outputs random numbers to stdout. This allows you to watch the output of both
programs simultaneously.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server