cat logfile | lgcpattern [ -s | -i ] patternfile
lgcpattern [ -s | -i ] patternfile < logfile
cat logfile | lgcpattern ( -p | -P )
lgcpattern ( -p | -P ) < logfile
This output can be used to re-arrange the pattern sequence in the pattern file for best performance.
The output is reduced by a leading time stamp, characters that are special to regular expressions are escaped and numbers are replaced by related regular expressions.
Please note that the pattern file including an operating system id osid(3) has to be specified. This allows to also check pattern files of operating systems different to the one logged-on to be checked.
Use the last 10 lines of the /var/log/syslog log file and check it against the syslog.Linux-64 pattern file.
This to see which message match against the patternfile and for which no matches exist (=[IGNORED]) and for which matches patterns are probably missing (=[VERIFY]).
tail -10 /var/log/syslog | \
lgcpattern syslog.Linux-64
Use the last 10000 lines of the /var/log/syslog log file to verify the syslog.Linux-64 pattern file.
This to see a statistics of message-match counts to patterns in the patternfile.
This result can be used to possibly rearrange the pattern sequence to improve analysis efficiency.
tail -10000 /var/log/syslog | \
lgcpattern -s syslog.Linux-64
Use the last 10 lines of the /var/log/syslog log file to generate patterns for the log lines.
Each "patternized" line is prepended by a commented original message line to ease up pattern definition.
tail -10 /var/log/syslog | \
lgcpattern -P
Use the last 10 lines of the /var/log/syslog log file to generate unique patterns for the log lines.
tail -10 /var/log/syslog | \
lgcpattern -p | sort -u
Use the last 500 lines of the /var/log/syslog log file to generate a list of unique patterns for the log lines that are currently not matched by any pattern of the pattern file syslog.Linux-64.
tail -500 /var/log/syslog | \
lgcpattern -i syslog.Linux-64 | \
lgcpattern -p | sort -u
This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.