The SNMP compiler runs as a single executable file in the command-line mode. The compiler accepts one SNMP information module as input, and accepts any additional modules necessary to resolve external references. Use one of the following command-line syntax examples.
For more information about when this compiler is used, see Setting up the WMI SNMP Environment.
smi2smir [<DiagnosticArgs>] [<VersionArgs>] <CommandArgs> <MIB file> [<Import Files>] smi2smir [<DiagnosticArgs>] <RegistryArgs> [<Directory>] smi2smir <ModuleInfoArgs> <MIB file> smi2smir <HelpArgs>
The compiler accepts the following diagnostic arguments.
- /m <diagnostic-level>
Type of diagnostics to display. The default is 2.
The following is a list of the diagnostic level values that can be set:
- 0 = Silent
- 1 = Fatal
- 2 = Fatal and warning
- 3 = Fatal, warning, and information messages
- /c <count>
Maximum number of fatal and warning messages to display; count must be a positive decimal integer. If /c is not specified, there is no limit to the number of errors that can be reported.
The compiler accepts the following version arguments.
The compiler accepts the following command arguments.
Deletes the specified module from the SMIR.
Deletes all modules in the SMIR.
Lists all modules in the SMIR.
Performs a local syntax check on the module.
- /ec [<CommandModifier>]
Performs local and external checks on the module.
Performs local and external checks and loads the module into the SMIR.
Same as /a, but works silently.
Generates a SMIR .mof file that you can later load into WMI using the MOF compiler. Used by the SNMP class provider to provide classes dynamically to one or more namespaces. Use this option when you do not know which MIBs are supported by the SNMP devices being managed. The SNMP class provider checks the device at runtime for the presence of this MIB and supplies the classes dynamically to the namespace.
Generates a static .mof file that can be loaded later into WMI as static classes for a particular namespace. Use this option when you know which MIBs are supported by the SNMP devices being managed. You can define the .mof file to be generated by directing the output of your command to a specified file. Do not use with /ext/o.
The compiler accepts the following command modifiers.
Specifies a directory to be searched for dependent MIB modules. Use with /a, /ec, /g, /gc, and /sa. The /i option can appear multiple times in the command; directories are searched in the order specified in the command.
Generates context information, such as the date, time, host, or user, in the MOF file header. Use with /g and /gc.
Generates SnmpNotification classes. Use with /a, /g, and /sa.
Generates SnmpExtendedNotification classes. Use with /a, /g, and /sa.
Generates only SnmpNotification classes. Use with /a, /g, and /sa.
Generates only SnmpExtendedNotification classes. Use with /a, /g, and /sa.
Does not map the text of the DESCRIPTION clause. Use with /a, /g, /gc, and /sa. Use this option when you want to minimize storage requirements.
Rebuilds the MIB lookup table before completing the <CommandArg> switch. Use with /a, /ec, /g, and /gc.
The compiler accepts the following registry arguments.
The compiler accepts the following module information arguments.
The compiler accepts the following help arguments.
SNMP information modules are written in a subset of the Abstract Syntax Notation One (ASN.1) The compiler performs the following functions:
- Loads the data from the SNMP information module.
- Performs checking operations on the information module. For example, it checks the local syntax and it checks external references against information in the subsidiary modules.
- Removes all previously loaded data from the SMIR, or removes data loaded from one information module.
- Returns the ASN.1 module name of a specified file or returns the ASN.1 module names of all imported modules in a specified file.
- Returns the ASN.1 module names of all SNMP information modules currently loaded in the SMIR.
- Performs automatic resolution of imported modules rather than requiring users to specify the required modules manually.
- Performs a silent-loading mode of operation that does not generate any output, but can be used to load data into the SMIR during an installation operation.
- Outputs the data from the SNMP information module into the SMIR.
- Optionally creates a static or SMIR MOF file containing the output from the information module.
If necessary, you can load the static .mof file into a WMI namespace. A SMIR .mof file contains the name of the SNMP namespace in which the classes should reside.
The following example defines the pra.mof file to be the output from the pra.mib file.
smi2smir /m 3 /v1 /gc /pra.mib > pra.mof
Minimum supported client
Minimum supported server
|Windows Server 2003|