Find Information in Error Log or Transaction Log
amps-grep
amps-grep
is a utility used to search AMPS error logs and journal files. The utility supports both literal search terms and regular expressions. The utility is aware of the structure of AMPS error messages, and returns the full text of a matching error rather than simply the line that matches.
The utility can search for a literal match, or use regular expressions. The regular expression dialect supported is the full set of regular expressions supported by the Python re
module.
Options and Parameters
Option
Description
files
(required)
The file or files to search.
--version
Show the version number of the program and exit.
--help
Show the help message and exit.
-e
,
--search_term=TERM
An exact match string to search.
-f
,
--file=LITERAL_TERMS_FILE
Obtain exact matches from LITERAL_TERMS_FILE
, one per line.
-E
,
--extended_regex=REGEX
Regular expression to search.
-n
,
--line-number
Include line numbers in results.
-H
,
--with-filename
Include filename in results.
-h
,
--no-filename
Do not include filename in results.
-i
,
--ignore-case
Use case-insensitive matching.
-v
,
--invert-match
Invert the sense of matching, to select non-matching lines.
--no-data
Do not display data field in journal results.
--include-noops
Include noops in the journal dump.
--client=CLIENTS
Search for records published by a given client. This argument accepts either a client name or a client name hash. This argument can be specified multiple times to search for multiple clients.
amps-grep
reads from the standard input if no filenames are provided.
Usage
The following examples shows the output of amps-grep
. This example simply searches for any occurrence of the term pubber
, the name of a client, in the AMPS log.
Last updated