Table of Contents
LOGmngr - watch parameters and log them to disk
LOGmngr <argument
list>
This program logs lists of parameters to disk. The parameter
lists are contained in a CONFLIST format file. Each CONFLIST group is a
separate logging group. All files are written to a common directory.
When
LOGmngr is started it looks for the logging file. If the file is found the
values from it are loaded into the database.
If the file is not found a
defaults file is looked for and if found the values are loaded into the
database.
After startup LOGmngr listens for changes in the value of the
monitored datapoints. If the value changes the logging file is updated after
a suitable time period.
When the file is updated the old copy is renamed
<file1>.old and a new copy is created.
Arguments are processed using
Unix long argument syntax.
- --mngr <fn>
The CONFLIST file from which to obtain the configuration information.
If
this is not specified it defaults to "MNGRconf" in the current working
directory (i.e. the directory where the program was started).
- --mngr_pn <fn>
The program name to use when parsing the CONFLIST file.
If this argument
is not specified it generally defaults to the program name.
- --data_path <pn>
The pathname to the directory where logging files are read and written.
The log files in this directory are given the name "<log_path>/<file1>".
The
old log files are given the name "<log_path>/<file1>.old".
The default files
are given the name "<log_path>/<file1>.def".
- --show_tbl
If this argument is present the contents of the CONFLIST table is printed
to stderr
- --diag
If this argument is present stdout and stdin are left open and the program
may be killed by SIGINT.
- --verbose=<n>
Normally the program does it’s work silently. This sets the level of logging
information. The number is optional but if provided it must include the
"=". If no argument is provided the default level is 1.
0 - work silently
1 - print signon msg, option settings
The configuration file uses the
libmngr(3mngr)
facility to connect internal parameters to the AccelNET database. The mappings
for this program are given below.
Parameters needed by this program can
be combined with parameters belonging to other programs. The "program name"
field in the configuration file differentiates the entries.
LOGmngr uses
"LOGmngr" as the program name when searching the file.
- comm1 - required
Each parameter is given this type with a unique index.
- file1 - required
The name of the file to log into.
- const0 - optional
The amount of time to wait after an update before writing to disk.
This
helps eliminate nuisance I/O. The first update in a group triggers a timer
for an update. Other events arriving after the timer starts and before the
file is updated are qued for update.
#
#
this example logs two sets of parameters
#
into logging files named g1sav and g2sav.
#
#
The logging timer is 10 seconds.
#
# LOGmngr
#
LOGmngr|g1|file1 |0|g1sav | |
LOGmngr|g1|const0 |0|10 | |
LOGmngr|g1|comm1 |0|BM 01-1|Radius |
LOGmngr|g1|comm1 |1|BM 01-1|tuneTIME|
LOGmngr|g1|comm1 |2|BM 01-1|tuneSTEP|
#
LOGmngr|g2|file1 |0|g2sav | |
LOGmngr|g2|const0 |0|10 | |
LOGmngr|g2|comm1 |0|BM 03-1|Radius |
LOGmngr|g2|comm1 |1|BM 03-1|tuneTIME|
LOGmngr|g2|comm1 |2|BM 03-1|tuneSTEP|
It’s possible to deadlock if the parameter lists are long enough. I
haven’t managed to do it so far however. 9/1/99 rlk
libmngr(3mngr)
$Id: LOGmngr.8,v 1.6 2008/03/05 20:50:41 kitchen Exp
$
Table of Contents