rfc2592.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,651 行 · 第 1/5 页
TXT
1,651 行
where the manager tells the distributed manager the location of the
script and the distributed manager retrieves the script itself.
Levi & Schoenwaelder Standards Track [Page 6]
RFC 2592 Script MIB May 1999
The MIB defined in this memo supports both models. The `push model'
is realized by a table which allows a manager to write scripts by
sending a sequence of SNMP set requests. The script can be split into
several fragments in order to deal with SNMP message size
limitations.
The `pull model' is realized by the use of Uniform Resource Locators
(URLs) [17] that point to the script source. The manager writes the
URL which points to the script source to the distributed manager by
sending an SNMP set request. The distributed manager is then
responsible for retrieving the document using the protocol specified
in the URL. This allows the use of protocols like FTP [18] or HTTP
[19] to transfer large management scripts efficiently.
The Script MIB also allows management scripts that are hard-wired
into the Script MIB implementation. Built-in scripts can either be
implemented in a language runtime system, or they can be built
natively into the Script MIB implementation. The implementation of
the `push model' or the `pull model' is not required.
Scripts can be stored in non-volatile storage. This allows a
distributed manager to restart scripts if it is restarted (off-line
restart). A manager is not required to push scripts back into the
distributed manager after a restart if the script is backed up in
non-volatile storage.
Every script is identified by an administratively assigned name. This
name may be used to derive the name which is used to access the
script in non-volatile storage. This mapping is implementation
specific. However, the mapping must ensure that the Script MIB
implementation can handle scripts with the same administrative name
owned by different managers. One way to achieve this is to use the
script owner in addition to the script name in order to derive the
internal name used to refer to a particular script in non-volatile
storage.
4.3. Script Execution
The Script MIB permits execution of several instances of the same or
different management scripts. Script arguments are passed as OCTET
STRING values. Scripts return a single result value which is also an
OCTET STRING value. The semantic interpretation of result values is
left to the invoking manager or other management scripts. A script
invoker must understand the format and semantics of both the
arguments and the results of the scripts that it invokes.
Levi & Schoenwaelder Standards Track [Page 7]
RFC 2592 Script MIB May 1999
Scripts can also export complex results through a MIB interface. This
allows a management application to access and use script results in
the same manner as it processes any other MIB data. However, the
Script MIB does not provide any special support for the
implementation of MIBs through scripts.
Runtime errors terminate active scripts. An exit code and a human
readable error message is left in the MIB. A notification containing
the exit code, the error message and a timestamp is generated when a
script terminates with an error exit code.
Script arguments and results do not have any size limitations other
than the limits imposed by the SMI and the SNMP protocol. However,
implementations of this MIB might have further restrictions. A script
designer might therefore choose to return the results via other
mechanisms if the script results can be very large. One possibility
is to return a URL as a script result which points to the file
containing the script output.
Executing scripts have a status object attached which allows script
execution to be suspended, resumed, or aborted. The precise
semantics of the suspend and resume operations are language and
runtime system dependent. Some runtime systems may choose to not
implement the suspend/resume operations.
A history of finished scripts is kept in the MIB. A script invoker
can collect results at a later point in time (offline operation).
Control objects can be used to control how entries in the history are
aged out if the table fills up.
5. The Structure of the MIB
This section presents the structure of the MIB. The objects are
arranged into the following groups:
o language group (smLanguageGroup)
o script group (smScriptGroup)
o script code group (smCodeGroup)
o script launch group (smLaunchGroup)
o running script group (smRunGroup)
Levi & Schoenwaelder Standards Track [Page 8]
RFC 2592 Script MIB May 1999
5.1. The smLanguageGroup
The smLanguageGroup is used to provide information about the
languages and the language extensions supported by a Script MIB
implementation. This group includes two tables. The smLangTable
lists all languages supported by a Script MIB implementation and the
smExtsnTable lists the extensions that are available for a given
language.
5.2. The smScriptGroup
The smScriptGroup consists of a single table, called the
smScriptTable. The smScriptTable lists all scripts known to a Script
MIB implementation. The smScriptTable contains objects that allow the
following operations:
o download scripts from a URL (pull model)
o read scripts from local non-volatile storage
o store scripts in local non-volatile storage
o delete scripts from local non-volatile storage
o list permanent scripts (that can not be changed or removed)
o read and modify the script status (enabled, disabled, editing)
A status object called smScriptOperStatus allows a manager to obtain
the current status of a script. It is also used to provide an error
indication if an attempt to invoke one of the operations listed above
fails. The status change of a script can be requested by modifying
the associated smScriptAdminStatus object.
The source of a script is defined by the smScriptSource object. This
object may contain a URL pointing to a remote location which provides
access to the management script. The script source is read from the
smCodeTable (described below) or from non-volatile storage if the
smScriptSource object contains an empty URL. The smScriptStorageType
object is used to distinguish between scripts read from non-volatile
storage and scripts read from the smCodeTable.
Scripts are automatically loaded once the smScriptAdminStatus object
is set to `enabled'. Loading a script includes retrieving the script
(probably from a remote location), compiling the script for languages
that require a compilation step, and making the code available to the
runtime system. The smScriptOperStatus object is used to indicate
the status of the loading process. This object will start in the
Levi & Schoenwaelder Standards Track [Page 9]
RFC 2592 Script MIB May 1999
state `retrieving', switch to the state `compiling' and finally reach
the state `enabled'. Errors during the retrieval or compilation phase
will result in an error state such as `compilationFailed'.
5.3. The smCodeGroup
The smCodeGroup consists of a single table, called the smCodeTable,
which provides the ability to transfer and modify scripts via SNMP
set requests. In particular, the smCodeTable allows the following
operations:
o download scripts via SNMP (push model)
o modify scripts via SNMP (editing)
The smCodeTable lists the code of a script. A script can be
fragmented over multiple rows of the smCodeTable in order to handle
SNMP message size limitations. Modifications of the smCodeTable are
only possible if the associated smScriptOperStatus object has the
value `editing'. The Script MIB implementation reloads the modified
script code once the smScriptOperStatus changes to `enabled' again.
The implementation of the smCodeGroup is optional.
5.4. The smLaunchGroup
The smLaunchGroup contains a single table, the smLaunchTable. An
entry in the smLaunchTable represents a launch button which can be
used to start a script. The smLaunchTable allows the following
operations:
o associate a script with an owner used during script execution
o provide arguments and parameters for script invocation
o invoke scripts with a single set operation
The smLaunchTable describes scripts and their parameters that are
ready to be launched. An entry in the smLaunchTable attaches an
argument to a script and control values which, for example, define
the maximum number of times that a script invoked from a particular
row in the smLaunchTable may be running concurrently.
An entry in the smLaunchTable also defines the owner which will be
used to associate permissions with the script execution.
Levi & Schoenwaelder Standards Track [Page 10]
RFC 2592 Script MIB May 1999
5.5. The smRunGroup
The smRunGroup contains a single table, called the smRunTable, which
lists all scripts that are currently running or have terminated
recently. The smRunTable contains objects that allow the following
operations:
o retrieve status information from running scripts
o control running scripts (suspend, resume, abort)
o retrieve results from recently terminated scripts
o control the remaining maximum lifetime of a running script
o control how long script results are accessible
Every row in the smRunTable contains the argument passed during
script invocation, the result produced by the script and the script
exit code. The smRunTable also provides information about the
current run state as well as start and end time-stamps. There are
three writable objects in the smRunTable. The smRunLifeTime object
defines the maximum time a running script may run before it is
terminated by the Script MIB implementation. The smRunExpireTime
object defines the time that a completed script can stay in the
smRunTable before it is aged out. The smRunControl object allows
running scripts to be suspended, resumed, or aborted.
6. Definitions
DISMAN-SCRIPT-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
Integer32, Unsigned32, mib-2
FROM SNMPv2-SMI
RowStatus, TimeInterval, DateAndTime, StorageType, DisplayString
FROM SNMPv2-TC
MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
FROM SNMPv2-CONF
SnmpAdminString
FROM SNMP-FRAMEWORK-MIB;
scriptMIB MODULE-IDENTITY
LAST-UPDATED "9902221800Z"
Levi & Schoenwaelder Standards Track [Page 11]
RFC 2592 Script MIB May 1999
ORGANIZATION "IETF Distributed Management Working Group"
CONTACT-INFO
"David B. Levi
Nortel Networks
4401 Great America Parkway
Santa Clara, CA 95052-8185
U.S.A.
Tel: +1 423 686 0432
E-mail: dlevi@nortelnetworks.com
Juergen Schoenwaelder
TU Braunschweig
Bueltenweg 74/75
38106 Braunschweig
Germany
Tel: +49 531 391-3283
E-mail: schoenw@ibr.cs.tu-bs.de"
DESCRIPTION
"This MIB module defines a set of objects that allow to
delegate management scripts to distributed managers."
::= { mib-2 64 }
--
-- The groups defined within this MIB module:
--
smObjects OBJECT IDENTIFIER ::= { scriptMIB 1 }
smNotifications OBJECT IDENTIFIER ::= { scriptMIB 2 }
smConformance OBJECT IDENTIFIER ::= { scriptMIB 3 }
--
-- Script language and language extensions.
--
-- This group defines tables which list the languages and the
-- language extensions supported by a script MIB implementation.
-- Languages are uniquely identified by object identifier values.
--
smLangTable OBJECT-TYPE
SYNTAX SEQUENCE OF SmLangEntry
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?