bcnumsg - bcnu log file scanner

 



NAME

bcnumsg - bcnu log file scanner (and more!)


SYNOPSIS

bcnumsg -p string | -s | -n name | -d | -v filename


DESCRIPTION

bcnumsg is a program which reads through a file, normally a log file.

It can scan for a string and print out all lines containg that string. This output can be used for more powerful scanning by grep/awk etc.

It is intelligent enough to store it's last position in the file and only read from there onwards. If the file is initialized, it will start from the beginning again.

A file called BCNUHOME/flags/xxxxxx.pos is created to hold the position of the last read of the file. The xxxxxx is based on the input filename.


OPTIONS

bcnumsg accepts the following command line options:

-p string

The -p option tells the bcnumsg program to check each line of the file read for a string. If the string is found it will print the line. If this option is not specified, all lines read will be printed.

-s

The -s option tells the bcnumsg program not to update its .pos file. This file is used to keep track of the last position read within the file. It may be useful if multiple passes thru the file are required.

-n name

The -n option allows the bcnumsg program to specify a filename prefix which will be used to create the .pos file instead of the input filename

e.g. if I am processing /var/adm/messages then the .pos file will be called BCNUHOME/flags/messages.pos

If I specifiy -n fred the .pos file will be BCNUHOME/flags/fred.pos

-d

The -d option switches on some debugging (not up to much yet!)

-v

The -v option switches on slightly more verbose output (not up to much yet!)


RETURN VALUES

bcnumsg quits with an exit value of 1 if there is an error. The error string is printed to stderr via perror(3).

An exit value of 0 is returned on success.


FILES

 BCNUHOME/flags/filename.pos    file which holds the position last read


ENVIRONMENT VARIABLES

 BCNUHOME               Set to a the bcnu home directory
 BCNUAGENT              Set to the name of the running agent
 BCNUHOST               Set to the hostname of the master system


AUTHOR

John Phillips

Please send all bugs, comments, and changes to jap@users.sourceforge.net


DISCLAIMER

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Artistic License for more details.


CAVEATS

Security is weak at the moment. bcnu is designed to be easy to use, it has not been tested for all vulnerabilities.


SEE ALSO

bcnud(1), bcnumsg(1), bcnu(1), agents(5), services(5), logpatterns(5), hostinfo(5), bcnunet(5)

The bcnu home pages also have full documentation

Updated: 14th October 1999

 

   bcnumsg - bcnu log file scanner