NSRSCM_FILTER(8)
NSRSCM_FILTER(8)
NAME
nsrscm_filter - determines the return code of savegrp via the savegroup
completion message and a user defined evaluation table (called filter-
file)
SYNOPSIS
nsrscm_filter -f filterfile [ -i scmfile ] [ -p profile ] [ -l 0|1|2 ]
[ -u level ] [ -o outputfile ] [ -s savefile ] [ -c
client ] [ -D level ]
DESCRIPTION
The nsrscm_filter command processes the output of a savegrp command -
the savegroup completion message - and determines in conjunction with a
user defined evaluation table (filterfile) a reliable return code.
The scm-inputfile (savegroup completion message) is passed either by
the -i Option or by stdin.
The filterfile consists of two major parts: The main part (= second
part) contains groups of messages, each as a regular expression, fol-
lowed by valuations (DEF=0, ora=1, ...) The DEF-value must exist for
each group of messages. The identifiers DEF, ora, ... are called pro-
files. Why using profiles: The idea is, that the severity of a Net-
Worker message may vary, depending on the kind of backup we make: For
example a database backup will have stronger requirements than a backup
of a user PC. The command may be called with a profile by the -p
option, no -p option means profile 'DEF'. Another way to select a pro-
file is given by the first part of the filterfile: It consists of lines
like 'PROFIL ora: group1 group2 group3'. With this statement the pro-
file is determined by the given group.
The filterfile is delivered as a template (/usr/sbin/fil-
ter_msgs.templ): Each user has to adapt this file according to his
requirements.
The program processes the scm-inputfile, i.e. it evaluates all lines
containing a preceeding '*' according to the messages of the filterfile
and the given profil: A *-line that is matched by a message of the fil-
terfile gets the value of the selected profile. Most messages of the
filterfile are single line messages, but some are multiple line mes-
sages. A match is given, if all lines of such a group of messages
match a part of the scm. *-lines that dont match any lines of the fil-
terfile, get the value (n + 1), where n is the highest value of the
filterfile.
After the evaluation the return code is determined as the highest value
of the evaluated *-lines. The return code is passed by the shell vari-
able $? as usual. Additionally it can be outputted by the '-D1' option
(independent of the output option '-l').
There are 3 levels for the output amount: -l0, -l1, -l2. Level 0 means
'no output', level 1 is a summary for each client, and level 2 is a
detailed output.
There are 2 more options for outputs: The -o option redirects the out-
put into the given file instead of stdout. The -s option saves the
original scm-inputfile into the given file.
OPTIONS
-f filterfile
message filter file
-i scmfile
input file: savegroup completion message
-p profile
profile defined in filter file
-l 0|1|2
output amount, 0 means nothing
-u level
returncode, if clients cannot be resolved (default 0)
-o outputfile
redirect output
-s savefile
save original scm input
-c client
evaluate only messages for the given client
-D level
debug output for matched lines (level could be 0 to 8)
FILES
/usr/sbin/filter_msgs.templ The template for the filterfile.
SEE ALSO
savegrp(8).
NetWorker 8.0.1 Dec 02, 12 NSRSCM_FILTER(8)