Knowledge Base directory structure


The Knowledge Base uses a defined directory structure to organize its files and executables. The Knowledge Base directories are in the following locations:

  • The Knowledge Base used by the cell during run time is located in installationDirectory\pw\server\etc_CellName_\kb on Windows platforms and in $installationDirectory/pw/server/etc/CellName/kb on UNIX platforms.
  • The template Knowledge Base resides in the installationDirectory\pw\server\etc\default \standard or $installationDirectory/pw/server/etc/default/standard directory.

Cells are created during installation of a cell or by using the mcrtcell command. For information about this command, see mcrtcell.

The following figure lists the directory structure for a Knowledge Base.

Knowledge Base directory structure 

kb
 \bin
    \A
    \h
    \l
    \p
    \s
    \w
 \classes
 \collectors
 \data
 \lib
 \records
 \rules

In the Knowledge Base, each subdirectory is labeled to indicate the type of files or programs it stores, as listed in the following table:

Knowledge Base subdirectories 

Knowledge Base subdirectory

Description

bin

Stores the external scripts that can run during rule processing and actions.
The bin directory organizes the scripts and programs in subdirectories specific to the appropriate operating system, as follows:

  • A—independent, all UNIX, or non-Windows
  • h—HP-UX
  • l—Linux
  • p—AIX
  • s—Solaris
  • w—Windows 

The .load file in the bin directory specifies the order in which external scripts or programs are presented to clients. Actions are defined in .mrl files. There is one default file, .load, in the bin directory.

classes

Stores event class, data class, and interface definitions

Classes are stored in .baroc files. The .load file in the classes directory specifies the order in which classes are loaded. Parent classes must be loaded prior to child classes.

Event and data classes are described in Event-and-data-classes.

collectors

Stores collector rule definitions

Collector definitions are used to organize the event lists that are viewed in the console. Collector rules are defined in .mrl files. Collectors and their syntax are described in Working-with-collectors.

data

Instances of dynamic data stored in files that are loaded when the cell is initialized

Dynamic data instances are stored in .baroc files. The .load file indicates the order in which the files are loaded into the cell. After the values are loaded into the cell, any changes are maintained in mcell.db. Dynamic data objects and their syntax are described in Event-rules.

lib

Stores primitives and functions used in the Knowledge Base

For example, the Knowledge Base contains the following files that cannot be modified:
sim.wic—Contains the compiled implementation of primitives and functions that are loaded by the cell at startup

  • sim_decl.wic—Contains the compiled definitions for primitives and functions; it is loaded by the compiler to compile rules that reference SIM primitives For more information about functions and primitives, see Master-Rule-Language-MRL-reference.

records

Stores global record definitions, which store dynamic information across all rule phases

A global record stores persistent dynamic information in a .baroc file. Many rule processing phases use global records for retrieving dynamic information. The .load file indicates the order in which the files are loaded into the cell. The default copy of record definitions is stored in baroc files in the records directory. After the values are loaded, they are maintained in the mcell.db. Dynamic data objects and their syntax are described in Event-rules.

rules

Stores the rule definitions for the Knowledge Base

The source for rule definitions are the files with an .mrl extension. The compiled versions of rules are contained in files with the .wic or .pkg extension. The .load file indicates the order in which the rules are loaded into the cell. Rules and their syntax are described in Event-rules.

The following table lists the file extensions and directory location for the each of the components contained in a KB.

Knowledge Base file extensions and directories

Component

File extension

Directory

Event classes

.baroc

kb\classes

Data classes

.baroc

kb\classes

Data instances

.baroc

kb\data

Global records

.baroc

kb\records

Rules

.mrl

kb\rules

Collectors

.mrl

kb\collector

Action executables

.mrl

kb\bin

Service model class definitions

.baroc

kb\classes

Interface classes

.baroc

kb\classes

Scripts and programs

Not applicable

kb\bin_platform_

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*