Probe Rules Utility
You can use the Probe Rules Utility command-line tool (nco_rules_util) to help manage probe rules files that are stored in a central repository or file system.
You can configure Probe Rules Utility by using a properties file that is read when the tool is run. Command-line options that are specified at runtime override values in the properties file. Sample properties files (nco_rules_util.props) are provided in the NCHOME/omnibus/etc/ and NCHOME/omnibus/etc/defaults directories.
Usage
The tool has the following usage:
nco_rules_util [action] [option] [path]
Where action is one of the available actions and option is one of the options for an action or one of the command-line options. The path parameter is the path to a rules file or directory. Only files with a .rules extension are listed.
- list: Lists the rules files in a specified directory.
- lstree: Lists the lookups and include files
that are referenced by a specified rules file. If you specify a directory,
details for all rules files in the directory are listed.
This action gives you increased visibility into the dependencies in a rules file and is useful for debugging problems.
The following table lists the available options for the list and lstree actions.
Option | Description |
---|---|
-checksum | Displays the SHA1 checksum of each listed
rules file. The -checksum option generates a checksum
value for a rules file that can be matched to the The checksum uniquely identifies the rules file and any referenced include and lookup files. A custom algorithm is used to generate the checksum based on the SHA1 digest of each individual file. |
-details | Displays the date and time at which a file was last modified and the size of the file in Bytes. |
-short | Displays rules file details in the following
format:
For
example:
The -short option reduces the width of the screen output and is suitable for small terminal windows. It works best when displaying details of a small number of files. The lstree action can output a lot of text that might be difficult to read when you use the -short option. If you do not specify the -details option or the -checksum option, the -short option is ignored. Note: To
display localized output, use the -short option.
|
The following table lists the available Probe Rules Utility properties and command-line options.
Property | Command-line option | Description |
---|---|---|
N/A | -dumpprops | Lists all the properties that are configured for the tool, including properties that have default values. |
N/A | -help | Displays help information about the utility. |
log.filename | -messagelog | Specifies the name of the log file. If a log file is not specified, messages are written to standard error (stderr). |
log.maxcount | N/A | Specifies the maximum number of log files that
are written. When this property is enabled, the log file is rotated when it reaches the size specified by the log.maxsize property. A suffix is appended to the log file. Each new log file is incrementally suffixed when it reaches the maximum size. For example, if the
value of log.maxcount is 2 and the log file name
is test.log, the following log files are created:
The value of this property is ignored if the log.filename property is not enabled. The default is '2'. |
log.maxsize | N/A | Specifies the maximum size of the log file in
KB. When the file reaches the maximum size, it is rotated or overwritten. The value of this property is ignored if the log.filename property is not enabled. The default is '100' KB. |
log.level | -messagelevel | Specifies one of the following message levels:
DEBUG is the most verbose and outputs all message levels. The default is 'WARN'. |
N/A | -propsfile | Specifies a properties file. If you do not specify a properties file, the following default file is used: 'NCHOME/omnibus/etc/nco_rules_util.props' |
repository.root | N/A | Specifies the top level of the rules file repository. Relative file or directory path references are relative to this value. The repository root must be an absolute path. If you do not specify a value for this property, it defaults to the value of the NC_RULES_HOME environment variable. If the NC_RULES_HOME environment variable not set, it defaults to the current directory. |
targetpath | N/A | Specifies the path of the file or directory
parameter for the list action. The value of this property is always overridden by the path command-line parameter. The default is '.'. |
N/A | -version | Displays version information about the tool. |