Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

logDstPri command

The logDstPri command creates the shared memory containing the dynamic destinations and priorities of logging messages using the logMsg() interface.

Synopsis

logDstPri [-H {dir}] [-c] [-v] [-d] [-x {cnt}] [rules]

Description

The logDstPri command reads an ASCII rules file, and sets up a shared memory segment using the information in the rules file. This is so that any process in the system using the logMsg (), vlogMsg (), or logSysError () library calls can determine the appropriate priority and logging destinations for each message they send.

By default, the rules files are expected to appear in ${LOGROOT} /msgDst.rules, where ${LOGROOT} is /vs/spool/log. By default, the header files used to translate ASCII names of message indices into numbers are expected to appear in the directory ${LOGROOT} /head. An alternate directory for the header files can be specified on the command line via the -H option. An alternate rules file can be specified as a file name on the command line.

After changing the rules file, Avaya recommends that you check the rules before they are put into service. The -c flag causes logDstPri to read the rules file and report any rules that are misformatted or not understood. The return value from logDstPri is the number of errors detected.

To see the error complaints and install the rules all at once, specify the -v flag. This causes the verbose complaints to be generated. The -c flag implies the -v flag.

When logDstPri is resetting the values in shared memory, as opposed to creating the shared memory for the first time, you can delete the old shared memory and create a new segment by specifying the -d flag. Do not use the -d flag on a running system because any process that is already using the old shared memory continues to use it even after it is deleted. This means that two different rules files might be in force at the same time. It may be necessary to specify the -d flag if a large number of new messages have been added to the rules file. Currently, logDstPri creates the shared memory 200 entries larger than the highest logging message index found it its rule file. This means that as long and the new rules file does not go beyond 200 entries higher than the current highest entry, everything is okay. You can alter the number of extra entries by specifying the -x option.

The shared memory segment is keyed off the inode of the rules file and the define symbol LDP_KEY, defined in log/head/logDstPri.h. The library routine ftok( {file} ,LDP_KEY) is used to generate the shared memory key.

Files

The following files are associated with the logDstPri command:

See also

© 2006 Avaya Inc. All Rights Reserved.