This is half a bleg and half an idea.
Trying to get useful information of log files that are being continually
written is kind of frustrating. The usual Linux method is to tail
-f the file and then apply a bunch of grep, cut, sed or awk filters
to the pipeline. This is clumsy if you don't know what you're dealing
with or looking for yet, and there are a bunch of other limitations with
this approach. So my idea is to create an application with these features:
- Reads multiple files simultaneously
- Can display lines in multiple 'windows' on screen
- Keeps statistics on each window - e.g. number of lines per second
- Dynamically apply regular expressions to each input or window
- These regexps can be used to:
- Move text from an input into a window
- Select lines for display or exclude them from display
- Reformat the lines to remove unneeded info or make sections homgeneous
- Keep statistics on lines matching
- Starts right from the end of the file, no need to seek the last N lines
- Can also work in 'static' mode where the file is read from the start
- An option might be to start in 'pipe' mode and then start reading
(backward or forward) through the file as time permits.
- Can write the output of a window to a file as well as display it
- Save and load configurations in a simple text file format so you can
easily reload an entire session
I'm thinking it should be named 'wag', because it's the wag tailing the dog
and because of a similarity to watch.
If such a thing even vaguely exists, please
email me. Otherwise I'll have to
think about learning how to write inotify-based ncurses-driven applications
in my copious free time.