-
Notifications
You must be signed in to change notification settings - Fork 0
Processing input files
Table of contents
- Relevant keystrokes
- Monitoring files
- Analyzing files
- Multiple input files
- Merging multiple input files
The Salomon process (no matter if monitoring or analyzing) can be canceled at any time by pressing the universal and well-known Ctrl+C keystroke.
By pressing Ctrl+S the output freezes until defreezing it again using Ctrl+Q.
This feature uses the follow mode of the tail
utility to return the lines of the file and colorizes the output with user-defined colors. The file will be monitored until the user cancels the process.
For example, to monitor the file /var/log/foobar.log
using the file foo_colors.cfg
to colorize certain lines:
./salomon.sh -a monitor -i /var/log/foobar.log -c foo_colors.cfg
Alternatively, you can also give the --monitor
command-line argument instead of -a monitor
.
Instead of monitoring a file, it is also possible to analyze it. This will simply return its lines and colorize certain of them, then exit.
For example, to analyze the file /var/log/foobar.log
using the file foo_colors.cfg
to colorize certain lines:
./salomon.sh -a analyze -i /var/log/foobar.log -c foo_colors.cfg
Alternatively, you can also give the --analyze
command-line argument instead of -a analyze
.
You can also provide multiple (two or more) input files at once.
When monitoring multiple files a separator will be displayed that shows to which file a new line was last added and when analyzing they will simply be processed one by another.
For example, to monitor the files /var/log/foo.log
and /var/log/bar.log
using the file foo_colors.cfg
to colorize certain lines:
./salomon.sh -a monitor -i /var/log/foo.log -i /var/log/bar.log -c foo_colors.cfg
Notice that the argument -i
is required for each input file given.
This feature is primarily intended for analyzing multiple files.
Usually the files are processed one after another by default. However, in some cases it is useful to be able to merge several log files of the same type (e.g. mail logs) into one, especially when working with timestamps.
This can simply be done using the --merge
argument. For example:
./salomon.sh -a monitor -i /var/log/maillog_1.log -i /var/log/maillog_2.log -i /var/log/maillog_3.log -c foo_colors.cfg --merge
When using --merge
with monitoring mode, it simply removes the file separators from the output.
Wiki
Quick start
Installation (optional)
- Quick installation guide
- Manually downloaded archive
- Verifying archive integrity
-
Installation script
(to install, update and uninstall)
- RPM package
Compatibility
Configuration
Salomon-BSD
Usage
- Processing input files
- Colorizing and highlighting certain lines
- Handling file paths containing certain characters
Development