In this example, the same dynamic model is loaded into several Domain Managers, each starting with a different --conf directory. Instead of copying the same compiled dynamic model file (.ldm) to each BASEDIR/smarts/local/model/<conf> directory, one single copy is created and compiled in BASEDIR/smarts/local/model. Each of the Domain Managers is then started with the --dynamic command line option to pull the compiled dynamic model file from BASEDIR/smarts/local/model.

To create the dynamic model:

  1. Create and edit a new file in the BASEDIR/smarts/local/model directory. Type the following at a command prompt:

                   /smarts/bin/sm_edit --create model/Example3.mdl
  2. Refine the setting class that sets the default value for the alarm threshold. Type the following lines into the Example3.mdl file:

                   refine interface NetworkAdapter_Performance_Setting
                           attribute float [0 .. 100] TS_OverrunThreshold
                           "Acceptable upper threshold for Overruned packets, "
                           "expressed as a percentage of the total number of input packets."
                           = 10;
  3. Refine the Interface_Performance_CiscoRouter_Ethernet instrumentation class that will be used to poll for the attribute. Type the following lines into the Example3.mdl file:

                   refine interface Interface_Performance_CiscoRouter_Ethernet
                   attribute float TS_OverrunThreshold
                   "The upper threshold for Overrun packet errors expressed as a percentage"
                   "of the total number of output packets."
                   = 10;
                   instrument SNMP {
                   TS_locIfInOverrun = ""
                   readonly instrumented attribute int TS_locIfInOverrun
                   "The number of overrun errors.";
                   readonly computed attribute float TS_locIfInOverrunRate
                   = rate(TS_locIfInOverrun, PollingInterval);
                   computed attribute float TS_OverrunErrorRate
                   "The rate of ignored Overrun packets expressed in packets"
                   "per second."
                   = TS_locIfInOverrunRate;
                   #pragma Uses Propagation
                   readonly computed attribute float TS_OverrunErrorPct
                   "The rate of Overruned input packets expressed as a percentage"
                   "of total input packets."
                   = (TS_OverrunErrorRate / (InputPacketRate + 0.001)) * 100;
                   event TS_HighOverrunRate
                   "Indicates that the percentage of packets with Overrun errors exceeds OverrunErrorThreshold"
                   = if NetworkAdapterOperational && (TS_OverrunThreshold < 100) && (MaxSpeed > 0)
                   check (TS_OverrunErrorPct > TS_OverrunThreshold);
                   export TS_HighOverrunRate;
    TS_OverrunErrorPct > TS_OverrunThreshold
    if NetworkAdapterOperational and (TS_OverrunThreshold < 100) and (MaxSpeed > 0)
  4. Save the Example3.mdl file.

    The file is saved in the BASEDIR/smarts/local/model directory.