aboutsummaryrefslogtreecommitdiffstats
path: root/lib/otp_mibs
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
committerErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
commit84adefa331c4159d432d22840663c38f155cd4c1 (patch)
treebff9a9c66adda4df2106dfd0e5c053ab182a12bd /lib/otp_mibs
downloadotp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz
otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2
otp-84adefa331c4159d432d22840663c38f155cd4c1.zip
The R13B03 release.OTP_R13B03
Diffstat (limited to 'lib/otp_mibs')
-rw-r--r--lib/otp_mibs/AUTHORS8
-rw-r--r--lib/otp_mibs/Makefile36
-rw-r--r--lib/otp_mibs/doc/html/.gitignore0
-rw-r--r--lib/otp_mibs/doc/man3/.gitignore0
-rw-r--r--lib/otp_mibs/doc/pdf/.gitignore0
-rw-r--r--lib/otp_mibs/doc/src/Makefile115
-rw-r--r--lib/otp_mibs/doc/src/book.xml48
-rw-r--r--lib/otp_mibs/doc/src/fascicules.xml19
-rw-r--r--lib/otp_mibs/doc/src/introduction.xml46
-rw-r--r--lib/otp_mibs/doc/src/make.dep20
-rw-r--r--lib/otp_mibs/doc/src/mibs.xml70
-rw-r--r--lib/otp_mibs/doc/src/note.gifbin0 -> 1539 bytes
-rw-r--r--lib/otp_mibs/doc/src/notes.xml149
-rw-r--r--lib/otp_mibs/doc/src/otp_mib.xml69
-rw-r--r--lib/otp_mibs/doc/src/part.xml38
-rw-r--r--lib/otp_mibs/doc/src/part_notes.xml37
-rw-r--r--lib/otp_mibs/doc/src/ref_man.xml37
-rw-r--r--lib/otp_mibs/ebin/.gitignore0
-rw-r--r--lib/otp_mibs/include/.gitignore0
-rw-r--r--lib/otp_mibs/info2
-rw-r--r--lib/otp_mibs/mibs/Makefile88
-rw-r--r--lib/otp_mibs/mibs/OTP-EVA-MIB.mib568
-rw-r--r--lib/otp_mibs/mibs/OTP-MIB.funcs2
-rw-r--r--lib/otp_mibs/mibs/OTP-MIB.mib311
-rw-r--r--lib/otp_mibs/mibs/OTP-REG.mib102
-rw-r--r--lib/otp_mibs/mibs/OTP-TC.mib92
-rw-r--r--lib/otp_mibs/mibs/v1/.gitignore0
-rw-r--r--lib/otp_mibs/priv/bin/.gitignore0
-rw-r--r--lib/otp_mibs/priv/mibs/.gitignore0
-rw-r--r--lib/otp_mibs/priv/obj/.gitignore0
-rw-r--r--lib/otp_mibs/src/Makefile105
-rw-r--r--lib/otp_mibs/src/otp_mib.erl198
-rw-r--r--lib/otp_mibs/src/otp_mibs.app.src27
-rw-r--r--lib/otp_mibs/src/otp_mibs.appup.src20
-rw-r--r--lib/otp_mibs/vsn.mk5
35 files changed, 2212 insertions, 0 deletions
diff --git a/lib/otp_mibs/AUTHORS b/lib/otp_mibs/AUTHORS
new file mode 100644
index 0000000000..3f570082f4
--- /dev/null
+++ b/lib/otp_mibs/AUTHORS
@@ -0,0 +1,8 @@
+Original Authors and Contributors:
+
+Martin Bj�rklund
+Lars Thorsen
+Claes Wikstr�m
+Kent Boortz
+Bj�rn Gustavsson
+Ingela Anderton - Created otp_mibs app. to eliminate SASL's SNMP dependence.
diff --git a/lib/otp_mibs/Makefile b/lib/otp_mibs/Makefile
new file mode 100644
index 0000000000..a88f0fef69
--- /dev/null
+++ b/lib/otp_mibs/Makefile
@@ -0,0 +1,36 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2003-2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Macros
+# ----------------------------------------------------
+
+SUB_DIRECTORIES = src mibs doc/src
+
+include vsn.mk
+VSN = $(OTP_MIBS_VSN)
+
+SPECIAL_TARGETS =
+
+# ----------------------------------------------------
+# Default Subdir Targets
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_subdir.mk
diff --git a/lib/otp_mibs/doc/html/.gitignore b/lib/otp_mibs/doc/html/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/otp_mibs/doc/html/.gitignore
diff --git a/lib/otp_mibs/doc/man3/.gitignore b/lib/otp_mibs/doc/man3/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/otp_mibs/doc/man3/.gitignore
diff --git a/lib/otp_mibs/doc/pdf/.gitignore b/lib/otp_mibs/doc/pdf/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/otp_mibs/doc/pdf/.gitignore
diff --git a/lib/otp_mibs/doc/src/Makefile b/lib/otp_mibs/doc/src/Makefile
new file mode 100644
index 0000000000..bd2810034b
--- /dev/null
+++ b/lib/otp_mibs/doc/src/Makefile
@@ -0,0 +1,115 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2003-2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Application version
+# ----------------------------------------------------
+include ../../vsn.mk
+VSN=$(OTP_MIBS_VSN)
+APPLICATION=otp_mibs
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+XML_APPLICATION_FILES = ref_man.xml
+XML_REF3_FILES = otp_mib.xml
+
+XML_PART_FILES = part.xml part_notes.xml
+XML_CHAPTER_FILES = \
+ introduction.xml \
+ mibs.xml \
+ notes.xml
+
+BOOK_FILES = book.xml
+
+XML_FILES = \
+ $(BOOK_FILES) $(XML_CHAPTER_FILES) \
+ $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
+
+GIF_FILES = note.gif
+
+# ----------------------------------------------------
+
+HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
+ $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
+
+INFO_FILE = ../../info
+
+MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
+
+HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
+
+TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+XML_FLAGS +=
+DVIPS_FLAGS +=
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+$(HTMLDIR)/%.gif: %.gif
+ $(INSTALL_DATA) $< $@
+
+docs: pdf html man
+
+$(TOP_PDF_FILE): $(XML_FILES)
+
+pdf: $(TOP_PDF_FILE)
+
+html: gifs $(HTML_REF_MAN_FILE)
+
+man: $(MAN3_FILES)
+
+gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
+
+debug opt:
+
+clean clean_docs:
+ rm -rf $(HTMLDIR)/*
+ rm -f $(MAN3DIR)/*
+ rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
+ rm -f errs core *~
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_docs_spec: docs
+ $(INSTALL_DIR) $(RELSYSDIR)/doc/pdf
+ $(INSTALL_DATA) $(TOP_PDF_FILE) $(RELSYSDIR)/doc/pdf
+ $(INSTALL_DIR) $(RELSYSDIR)/doc/html
+ $(INSTALL_DATA) $(HTMLDIR)/* \
+ $(RELSYSDIR)/doc/html
+ $(INSTALL_DATA) $(INFO_FILE) $(RELSYSDIR)
+ $(INSTALL_DIR) $(RELEASE_PATH)/man/man3
+ $(INSTALL_DATA) $(MAN3DIR)/* $(RELEASE_PATH)/man/man3
+
+release_spec:
+
diff --git a/lib/otp_mibs/doc/src/book.xml b/lib/otp_mibs/doc/src/book.xml
new file mode 100644
index 0000000000..11d08b8a41
--- /dev/null
+++ b/lib/otp_mibs/doc/src/book.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE book SYSTEM "book.dtd">
+
+<book xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header titlestyle="normal">
+ <copyright>
+ <year>2003</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>OTP_Mibs</title>
+ <prepared>Ingela Anderton</prepared>
+ <docno></docno>
+ <date>2003-04-15</date>
+ <rev>A</rev>
+ </header>
+ <insidecover>
+ </insidecover>
+ <pagetext>OTP_Mibs application</pagetext>
+ <preamble>
+ <contents level="2"></contents>
+ </preamble>
+ <parts lift="no">
+ <xi:include href="part.xml"/>
+ </parts>
+ <applications>
+ <xi:include href="ref_man.xml"/>
+ </applications>
+ <releasenotes>
+ <xi:include href="notes.xml"/>
+ </releasenotes>
+ <index></index>
+</book>
+
+
diff --git a/lib/otp_mibs/doc/src/fascicules.xml b/lib/otp_mibs/doc/src/fascicules.xml
new file mode 100644
index 0000000000..101e745722
--- /dev/null
+++ b/lib/otp_mibs/doc/src/fascicules.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
+
+<fascicules>
+ <fascicule file="part" href="part_frame.html" entry="no">
+ User's Guide
+ </fascicule>
+ <fascicule file="ref_man" href="ref_man_frame.html" entry="yes">
+ Reference Manual
+ </fascicule>
+ <fascicule file="part_notes" href="part_notes_frame.html" entry="no">
+ Release Notes
+ </fascicule>
+ <fascicule file="" href="../../../../doc/print.html" entry="no">
+ Off-Print
+ </fascicule>
+</fascicules>
+
+
diff --git a/lib/otp_mibs/doc/src/introduction.xml b/lib/otp_mibs/doc/src/introduction.xml
new file mode 100644
index 0000000000..c1ed0fed78
--- /dev/null
+++ b/lib/otp_mibs/doc/src/introduction.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2003</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Introduction</title>
+ <prepared>Ingela Anderton</prepared>
+ <docno></docno>
+ <date>2003-05-19</date>
+ <rev>A</rev>
+ <file>introduction.xml</file>
+ </header>
+
+ <section>
+ <title>Purpose</title>
+ <p>The purpose of the OTP_Mibs application is to provide an SNMP
+ management information base for Erlang nodes.</p>
+ </section>
+
+ <section>
+ <title>Pre-requisites</title>
+ <p>It is assumed that the reader is familiar with the Erlang
+ programming language, concepts of OTP and has a basic knowledge
+ of SNMP.</p>
+ </section>
+</chapter>
+
+
diff --git a/lib/otp_mibs/doc/src/make.dep b/lib/otp_mibs/doc/src/make.dep
new file mode 100644
index 0000000000..2885155315
--- /dev/null
+++ b/lib/otp_mibs/doc/src/make.dep
@@ -0,0 +1,20 @@
+# ----------------------------------------------------
+# >>>> Do not edit this file <<<<
+# This file was automaticly generated by
+# /home/otp/bin/docdepend
+# ----------------------------------------------------
+
+
+# ----------------------------------------------------
+# TeX files that the DVI file depend on
+# ----------------------------------------------------
+
+book.dvi: book.tex introduction.tex mibs.tex otp_mib.tex \
+ part.tex ref_man.tex
+
+# ----------------------------------------------------
+# Source inlined when transforming from source to LaTeX
+# ----------------------------------------------------
+
+book.tex: ref_man.xml
+
diff --git a/lib/otp_mibs/doc/src/mibs.xml b/lib/otp_mibs/doc/src/mibs.xml
new file mode 100644
index 0000000000..16d2ac201a
--- /dev/null
+++ b/lib/otp_mibs/doc/src/mibs.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2003</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Mibs</title>
+ <prepared>Ingela Anderton</prepared>
+ <docno></docno>
+ <date>2003-05-19</date>
+ <rev>A</rev>
+ <file>mibs.xml</file>
+ </header>
+
+ <section>
+ <title>Structure</title>
+ <p>The OTP mibs are stored in the
+ <c>$OTP_ROOT/lib/otp_mibs/mibs/</c> directory. They
+ are defined in SNMPv2 SMI syntax. An SNMPv1 version of the mib is
+ delivered in the <c>mibs/v1</c> directory. The compiled MIB is
+ located under <c>priv/mibs</c>, and the generated <c>.hrl</c>
+ file under the <c>include</c> directory. To compile a MIB that
+ IMPORTS a MIB in the OTP_Mibs application, give the option
+ <c>{il, ["otp_mibs/priv/mibs"]}</c> to the MIB compiler.</p>
+ </section>
+
+ <section>
+ <title>OTP-MIB</title>
+ <p>The OTP-MIB mib represents information about Erlang nodes such as
+ node name, number of running processes, virtual machine version
+ etc. If the MIB should be used in a system, it should be
+ loaded into an SNMP agent by using the API function
+ <c>otp_mib:load/1</c>.</p>
+ </section>
+
+ <section>
+ <title>OTP-REG</title>
+ <p>The OTP-REG mib defines the unique OTP subtree of object
+ identifiers under the Ericsson subtree. Under the OTP subtree
+ several object identifiers are defined. This module is typically
+ included by OTP applications defining their own mibs, or ASN.1
+ modules in general, that require unique object identifiers under
+ the OTP subtree.</p>
+ </section>
+
+ <section>
+ <title>OTP-TC</title>
+ <p>The OTP-TC mib provides the textual convention datatype
+ <c>OwnerString</c>.</p>
+ </section>
+</chapter>
+
+
diff --git a/lib/otp_mibs/doc/src/note.gif b/lib/otp_mibs/doc/src/note.gif
new file mode 100644
index 0000000000..6fffe30419
--- /dev/null
+++ b/lib/otp_mibs/doc/src/note.gif
Binary files differ
diff --git a/lib/otp_mibs/doc/src/notes.xml b/lib/otp_mibs/doc/src/notes.xml
new file mode 100644
index 0000000000..94c1dd4228
--- /dev/null
+++ b/lib/otp_mibs/doc/src/notes.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2004</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>OTP_Mibs Release Notes</title>
+ <prepared>otp_appnotes</prepared>
+ <docno>nil</docno>
+ <date>nil</date>
+ <rev>nil</rev>
+ <file>notes.xml</file>
+ </header>
+ <p>This document describes the changes made to the OTP_Mibs
+ application.</p>
+
+<section><title>Otp_Mibs 1.0.6</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ The documentation is now built with open source tools
+ (xsltproc and fop) that exists on most platforms. One
+ visible change is that the frames are removed.</p>
+ <p>
+ Own Id: OTP-8201</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Otp_Mibs 1.0.5</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>The copyright notices have been updated.</p>
+ <p>
+ Own Id: OTP-7851</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+ <section>
+ <title>Otp_Mibs 1.0.4.1</title>
+
+ <section>
+ <title>Improvements and New Features</title>
+ <list type="bulleted">
+ <item>
+ <p>Minor Makefile changes.</p>
+ <p>Own Id: OTP-6689</p>
+ </item>
+ </list>
+ </section>
+ </section>
+
+ <section>
+ <title>OTP_Mibs 1.0.4</title>
+
+ <section>
+ <title>Improvements and New Features</title>
+ <list type="bulleted">
+ <item>
+ <p>Replaced calls to deprecated functions in <c>snmp</c>
+ with calls to the equivalent functions in <c>snmpa</c>.</p>
+ <p>Own Id: OTP-6112</p>
+ </item>
+ </list>
+ </section>
+ </section>
+
+ <section>
+ <title>OTP_Mibs 1.0.3</title>
+
+ <section>
+ <title>Improvements and New Features</title>
+ <list type="bulleted">
+ <item>
+ <p>The <c>otp_mib</c> module has been cleaned up to improve the
+ maintainability. It should have no effect on the
+ functionality of the OTP_Mibs application.</p>
+ <p>Own Id: OTP-4982</p>
+ </item>
+ </list>
+ </section>
+ </section>
+
+ <section>
+ <title>OTP_Mibs 1.0.2</title>
+
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <list type="bulleted">
+ <item>
+ <p>Incorrect <c>.app</c> file (missing mandatory
+ <c>registered</c>).</p>
+ <p>Own Id: OTP-4823 Aux Id: Seq8145, OTP-4801 </p>
+ </item>
+ </list>
+ </section>
+ </section>
+
+ <section>
+ <title>OTP_Mibs 1.0.1</title>
+
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <list type="bulleted">
+ <item>
+ <p>Missing <c>.app</c> and <c>appup</c> files in <c>ebin</c>.</p>
+ <p>Own Id: OTP-4801 Aux Id: Seq8145 </p>
+ </item>
+ </list>
+ </section>
+ </section>
+
+ <section>
+ <title>OTP_Mibs 1.0</title>
+ <p>The OTP mibs that where included in the SASL application
+ have been moved to this new application OTP_Mibs. The OTP
+ mibs had no real connection to SASL and it is desirable that
+ the core of Erlang/OTP is not dependent on SNMP.</p>
+ <p>Own Id: OTP-4686</p>
+ </section>
+</chapter>
+
+
diff --git a/lib/otp_mibs/doc/src/otp_mib.xml b/lib/otp_mibs/doc/src/otp_mib.xml
new file mode 100644
index 0000000000..c96b31a1d4
--- /dev/null
+++ b/lib/otp_mibs/doc/src/otp_mib.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+
+<erlref>
+ <header>
+ <copyright>
+ <year>2003</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>otp_mib</title>
+ <prepared>Ingela Anderton</prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+ <module>otp_mib</module>
+ <modulesummary>Handles the OTP-MIB</modulesummary>
+ <description>
+ <p>The SNMP application should be used to start an SNMP agent. Then
+ the API functions below can be used to load/unload the OTP-MIB
+ into/from the agent. The instrumentation of the OTP-MIB uses
+ Mnesia, hence Mnesia must be started prior to loading the OTP-MIB.</p>
+ </description>
+ <funcs>
+ <func>
+ <name>load(Agent) -> ok | {error, Reason}</name>
+ <fsummary>Load the OTP-MIB</fsummary>
+ <type>
+ <v>Agent = pid() | atom()</v>
+ <v>Reason = term()</v>
+ </type>
+ <desc>
+ <p>Loads the OTP-MIB.</p>
+ </desc>
+ </func>
+ <func>
+ <name>unload(Agent) -> ok | {error, Reason}</name>
+ <fsummary>Unload the OTP-MIB</fsummary>
+ <type>
+ <v>Agent = pid() | atom()</v>
+ <v>Reason = term()</v>
+ </type>
+ <desc>
+ <p>Unloads the OTP-MIB.</p>
+ </desc>
+ </func>
+ </funcs>
+
+ <section>
+ <title>See Also</title>
+ <p>snmp(3)</p>
+ </section>
+</erlref>
+
+
diff --git a/lib/otp_mibs/doc/src/part.xml b/lib/otp_mibs/doc/src/part.xml
new file mode 100644
index 0000000000..40988fda69
--- /dev/null
+++ b/lib/otp_mibs/doc/src/part.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE part SYSTEM "part.dtd">
+
+<part xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>2003</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>OTP_Mibs User's Guide</title>
+ <prepared>Ingela Anderton</prepared>
+ <docno></docno>
+ <date>2002-09-17</date>
+ <rev>A</rev>
+ </header>
+ <description>
+ <p>The <em>OTP_Mibs</em> application provides an SNMP management
+ information base for Erlang nodes.</p>
+ </description>
+ <xi:include href="introduction.xml"/>
+ <xi:include href="mibs.xml"/>
+</part>
+
+
diff --git a/lib/otp_mibs/doc/src/part_notes.xml b/lib/otp_mibs/doc/src/part_notes.xml
new file mode 100644
index 0000000000..a7bdde9b64
--- /dev/null
+++ b/lib/otp_mibs/doc/src/part_notes.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE part SYSTEM "part.dtd">
+
+<part xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>2004</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>OTP_Mibs Release Notes</title>
+ <prepared>Ingela Anderton Andin</prepared>
+ <docno></docno>
+ <date>2004-09-07</date>
+ <rev></rev>
+ </header>
+ <description>
+ <p>The <em>OTP_Mibs</em> application provides an SNMP management
+ information base for Erlang nodes.</p>
+ </description>
+ <xi:include href="notes.xml"/>
+</part>
+
+
diff --git a/lib/otp_mibs/doc/src/ref_man.xml b/lib/otp_mibs/doc/src/ref_man.xml
new file mode 100644
index 0000000000..1b5d91e9db
--- /dev/null
+++ b/lib/otp_mibs/doc/src/ref_man.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE application SYSTEM "application.dtd">
+
+<application xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>2003</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>OTP_Mibs Reference Manual</title>
+ <prepared>Ingela Anderton</prepared>
+ <docno></docno>
+ <date>2002-09-13</date>
+ <rev>A</rev>
+ </header>
+ <description>
+ <p>The <em>OTP_Mibs</em> application provides an SNMP management
+ information base for Erlang nodes.</p>
+ </description>
+ <xi:include href="otp_mib.xml"/>
+</application>
+
+
diff --git a/lib/otp_mibs/ebin/.gitignore b/lib/otp_mibs/ebin/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/otp_mibs/ebin/.gitignore
diff --git a/lib/otp_mibs/include/.gitignore b/lib/otp_mibs/include/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/otp_mibs/include/.gitignore
diff --git a/lib/otp_mibs/info b/lib/otp_mibs/info
new file mode 100644
index 0000000000..aedd1c883b
--- /dev/null
+++ b/lib/otp_mibs/info
@@ -0,0 +1,2 @@
+group: oam Operation & Maintenance Applications
+short: SNMP management information base for Erlang/OTP nodes.
diff --git a/lib/otp_mibs/mibs/Makefile b/lib/otp_mibs/mibs/Makefile
new file mode 100644
index 0000000000..5e59824d3f
--- /dev/null
+++ b/lib/otp_mibs/mibs/Makefile
@@ -0,0 +1,88 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 1997-2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Application version
+# Release directory specification
+# ----------------------------------------------------
+include ../vsn.mk
+ifdef SASL_VSN
+VSN=$(SASL_VSN)
+RELSYSDIR = $(RELEASE_PATH)/lib/sasl-$(VSN)
+else
+VSN=$(OTP_MIBS_VSN)
+RELSYSDIR = $(RELEASE_PATH)/lib/otp_mibs-$(VSN)
+endif
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MIB_FILES= OTP-REG.mib OTP-TC.mib OTP-MIB.mib
+FUNCS_FILES = OTP-MIB.funcs
+
+BIN_TARGETS= $(MIB_FILES:%.mib=$(SNMP_BIN_TARGET_DIR)/%.bin)
+HRL_TARGETS= $(MIB_FILES:%.mib=$(SNMP_HRL_TARGET_DIR)/%.hrl)
+V1_MIB_FILES= $(MIB_FILES:%.mib=v1/%.mib.v1)
+
+TARGET_FILES= $(BIN_TARGETS) $(HRL_TARGETS) $(V1_MIB_FILES)
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+SNMP_FLAGS = -I ../priv/mibs
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+debug opt: $(TARGET_FILES)
+
+clean:
+ rm -f $(TARGET_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Special Build Targets
+# ----------------------------------------------------
+
+v1/%.mib.v1: %.mib
+ $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1 -o $@ $<
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/mibs
+ $(INSTALL_DIR) $(RELSYSDIR)/mibs/v1
+ $(INSTALL_DATA) $(MIB_FILES) $(FUNCS_FILES) $(RELSYSDIR)/mibs
+ $(INSTALL_DATA) $(V1_MIB_FILES) $(RELSYSDIR)/mibs/v1
+ $(INSTALL_DIR) $(RELSYSDIR)/include
+ $(INSTALL_DATA) $(HRL_TARGETS) $(RELSYSDIR)/include
+ $(INSTALL_DIR) $(RELSYSDIR)/priv/mibs
+ $(INSTALL_DATA) $(BIN_TARGETS) $(RELSYSDIR)/priv/mibs
+
+release_docs_spec:
diff --git a/lib/otp_mibs/mibs/OTP-EVA-MIB.mib b/lib/otp_mibs/mibs/OTP-EVA-MIB.mib
new file mode 100644
index 0000000000..6fbb8ef073
--- /dev/null
+++ b/lib/otp_mibs/mibs/OTP-EVA-MIB.mib
@@ -0,0 +1,568 @@
+--
+-- %CopyrightBegin%
+--
+-- Copyright Ericsson AB 2004-2009. All Rights Reserved.
+--
+-- The contents of this file are subject to the Erlang Public License,
+-- Version 1.1, (the "License"); you may not use this file except in
+-- compliance with the License. You should have received a copy of the
+-- Erlang Public License along with this software. If not, it can be
+-- retrieved online at http://www.erlang.org/.
+--
+-- Software distributed under the License is distributed on an "AS IS"
+-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+-- the License for the specific language governing rights and limitations
+-- under the License.
+--
+-- %CopyrightEnd%
+--
+
+OTP-EVA-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
+ Counter32, Gauge32, Integer32
+ FROM SNMPv2-SMI
+ TEXTUAL-CONVENTION, DisplayString, DateAndTime
+ FROM SNMPv2-TC
+ MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
+ FROM SNMPv2-CONF
+ otpModules, otpApplications
+ FROM OTP-REG
+ OwnerString
+ FROM OTP-TC
+ ;
+
+otpEvaModule MODULE-IDENTITY
+ LAST-UPDATED "0305090900Z"
+ ORGANIZATION "Ericsson"
+ CONTACT-INFO
+ "Contact: Erlang Support see license agreement for Erlang/OTP."
+ DESCRIPTION
+ "This MIB is part of the OTP MIB. It defines MIB objects
+ for the eva application in OTP."
+
+ REVISION "0305090900Z"
+ DESCRIPTION
+ "Changed CONTACT-INFO as it was outdated, made it more generic
+ to avoid such changes in the future."
+
+ REVISION "9801270900Z"
+ DESCRIPTION
+ "Changed erroneous defintion of alarmCleared notification.
+ Changed erroneous name of this module to otpEvaModule."
+ REVISION "9712010900Z"
+ DESCRIPTION
+ "Converted to v2 SMI and placed in the OTP tree."
+ REVISION "9705020900Z"
+ DESCRIPTION
+ "The initial version of this MIB module. It is very much
+ inspired by the ANS-ALM-MIB and Axd301Eva-OMS mibs."
+ ::= { otpModules 6 }
+
+otpEvaMIB OBJECT IDENTIFIER ::= { otpApplications 4 }
+otpEvaMIBConformance
+ OBJECT IDENTIFIER ::= { otpEvaMIB 1 }
+otpEvaMIBObjects
+ OBJECT IDENTIFIER ::= { otpEvaMIB 2 }
+otpEvaMIBEvents OBJECT IDENTIFIER ::= { otpEvaMIB 3 }
+otpEvaMIBEventsV2
+ OBJECT IDENTIFIER ::= { otpEvaMIBEvents 0 }
+
+
+-- Datatypes
+
+AlarmSeverity ::= TEXTUAL-CONVENTION
+ STATUS current
+ DESCRIPTION
+ "The AlarmSeverity defines six severity levels,
+ which provide an indication of how it is perceived that the
+ capability of the managed object has been affected. Those
+ severity levels which represent service affecting conditions
+ ordered from most severe to least severe are critical,
+ major, minor and warning. The levels used are as defined
+ in X.733, ITU Alarm Reporting Function:
+
+ o The Indeterminate severity level indicates that the
+ severity level cannot be determined.
+
+ o The Critical severity level indicates that a service
+ affecting condition has occurred and an immediate
+ corrective action is required. Such a severity can be
+ reported, for example, when a managed object becomes
+ totally out of service and its capability must be restored.
+
+ o The Major severity level indicates that a service
+ affecting condition has developed and an urgent corrective
+ action is required. Such a severity can be reported, for
+ example, when there is a severe degradation in the
+ capability of the managed object and its full capability
+ must be restored.
+
+ o The Minor severity level indicates the existence of a
+ non-service affecting fault condition and that corrective
+ action should be taken in order to prevent a more serious
+ (for example, service affecting) fault. Such a severity
+ can be reported, for example, when the detected alarm
+ condition is not currently degrading the capacity of the
+ managed object.
+
+ o The Warning severity level indicates the detection of a
+ potential or impending service affecting fault, before any
+ significant effects have been felt. Action should be taken
+ to further diagnose (if necessary) and correct the problem
+ in order to prevent it from becoming a more serious service
+ affecting fault.
+
+ When an alarm is cleared, an alarmCleared event is generated.
+ This event clears the alarm with the currentAlarmFaultId
+ contained in the event. It is not required that the clearing
+ of previously reported alarms are reported. Therefore, a managing
+ system cannot assume that the absence of an alarmedCleared event
+ for a fault means that the condition that caused the generation
+ of previous alarms is still present. Managed object definers
+ shall state if, and under which conditions, the alarmedCleared
+ event is used.
+
+ The clear value of AlarmSeverity is an action which is used when
+ a management station wants to clear an active alarm. This is not
+ possible on all systems, and thus an agent does not have support
+ write access for this value."
+ REFERENCE
+ "X.733, ITU Alarm Reporting Function"
+ SYNTAX INTEGER {
+ indeterminate (0),
+ critical (1),
+ major (2),
+ minor (3),
+ warning (4),
+ clear (5) -- Written, not read
+ }
+
+AlarmClass ::= TEXTUAL-CONVENTION
+ STATUS current
+ DESCRIPTION
+ "The AlarmClass type categorizes the alarm, and is
+ defined when the alarm is registered. It is as defined in
+ X.733, ITU Alarm Reporting Function:
+
+ o communications. An alarm of this class is principally
+ associated with the procedures or processes required
+ to convey information from one point to another.
+
+ o qos. An alarm of this class is principally associated
+ with a degradation in the quality of service.
+
+ o processing. An alarm of this class is principally
+ associated with a software or processing fault.
+
+ o equipment. An alarm of this class is principally
+ associated with an equipment fault.
+
+ o environmental. An alarm of this class is principally
+ associated with a condition relating to an enclosure in
+ with equipment resides."
+ REFERENCE
+ "X.733, ITU Alarm Reporting Function"
+ SYNTAX INTEGER {
+ unknown (0),
+ communications (1),
+ qos (2),
+ processing (3),
+ equipment (4),
+ environmental (5)
+ }
+
+
+-- Managed Objects
+
+event OBJECT IDENTIFIER ::= { otpEvaMIBObjects 1 }
+alarm OBJECT IDENTIFIER ::= { otpEvaMIBObjects 2 }
+currentAlarm OBJECT IDENTIFIER ::= { otpEvaMIBObjects 3 }
+
+-- The Event group
+--
+-- The Event group controls the generation of notifications of
+-- events from the system.
+
+eventTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EventEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of events defined by the system. This table is used
+ to control the sending of traps and to whom the traps are
+ sent."
+ ::= { event 1 }
+
+eventEntry OBJECT-TYPE
+ SYNTAX EventEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A set of parameters that describe an event to be
+ generated when certain conditions are met."
+ INDEX { eventIndex }
+ ::= { eventTable 1 }
+
+EventEntry ::= SEQUENCE {
+ eventIndex Integer32 (1..2147483647),
+ eventTrapName DisplayString,
+ eventTreatment INTEGER,
+ eventCommunity OCTET STRING (SIZE (0..127)),
+ eventSentTraps Counter32,
+ eventOwner OwnerString
+ }
+
+eventIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..2147483647)
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry in the
+ event table. Each such entry defines one event that
+ is to be generated when the appropriate conditions
+ occur. The value for each eventIndex must remain
+ constant, at least from one re-initialization of the
+ entity's network management system to the next
+ re-initialization."
+ ::= { eventEntry 1 }
+
+eventTrapName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The identifier of the corresponding trap.
+ NOTE: this should be an OID in SNMPv2, but must be
+ a string in v1."
+ ::= { eventEntry 2 }
+
+eventTreatment OBJECT-TYPE
+ SYNTAX INTEGER {
+ none(1),
+ log(2),
+ snmpTrap(3),
+ logAndTrap(4)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Defines how the system shall treat this event. In the
+ case of snmpTrap, an SNMP trap is sent to one or more
+ management stations. In the case of log, the event is
+ guaranteed to be logged in a log according to some log
+ strategy. Each such log strategy may define a MIB module
+ for control and examination of logs."
+ ::= { eventEntry 3 }
+
+eventCommunity OBJECT-TYPE
+ SYNTAX OCTET STRING (SIZE (0..127))
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "If an SNMP trap is to be sent, it will be sent to
+ the SNMP community specified by this octet string."
+ ::= { eventEntry 4 }
+
+eventSentTraps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of times this event has been sent as a trap."
+ ::= { eventEntry 5 }
+
+eventOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The manager entity that 'owns' this event entry, and is
+ therefore responsible for its contents."
+ ::= { eventEntry 6 }
+
+eventTime OBJECT-TYPE
+ SYNTAX DateAndTime
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "This object may be included in a trap definition for an event.
+ It specifies the time the event was generated."
+ ::= { event 2 }
+
+
+-- The Alarm group
+--
+-- The Alarm group extends the Event group with objects for alarms.
+
+alarmTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "Contains additional information for alarm events."
+ ::= { alarm 1 }
+
+alarmEntry OBJECT-TYPE
+ SYNTAX AlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A set of parameters for alarms."
+ INDEX { eventIndex }
+ ::= { alarmTable 1 }
+
+AlarmEntry ::= SEQUENCE {
+ alarmClass AlarmClass,
+ alarmSeverity AlarmSeverity
+ }
+
+alarmClass OBJECT-TYPE
+ SYNTAX AlarmClass
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The class of this alarm."
+ ::= { alarmEntry 1 }
+
+alarmSeverity OBJECT-TYPE
+ SYNTAX AlarmSeverity
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The perceived severity that shall apply to the
+ associated alarms."
+ ::= { alarmEntry 2 }
+
+
+-- The CurrentAlarm group
+--
+-- The CurrentAlarm group is a collection of objects for monitoring of
+-- active alarms in the system.
+
+numberOfCurrentAlarms OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of currently active alarms in the system."
+ ::= { currentAlarm 1 }
+
+currentAlarmLastTimeChanged OBJECT-TYPE
+ SYNTAX DateAndTime
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The time an entry in the currentAlarmTable was changed.
+ It may be used by a management station as a value to
+ poll. If the value is changed, the management station
+ knows that the currentAlarmTable has been updated."
+ ::= { currentAlarm 2 }
+
+currentAlarmTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF CurrentAlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of currently active alarms in the system."
+ ::= { currentAlarm 3 }
+
+currentAlarmEntry OBJECT-TYPE
+ SYNTAX CurrentAlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A set of parameters that describe a currently active
+ alarm."
+ INDEX { currentAlarmFaultId }
+ ::= { currentAlarmTable 1 }
+
+CurrentAlarmEntry ::= SEQUENCE {
+ currentAlarmFaultId Integer32 (1..2147483647),
+ currentAlarmEventIndex Integer32 (1..2147483647),
+ currentAlarmObject OBJECT IDENTIFIER,
+ currentAlarmCause OBJECT IDENTIFIER,
+ currentAlarmSeverity AlarmSeverity,
+ currentAlarmTime DateAndTime,
+ currentAlarmInformation DisplayString,
+ currentAlarmExtra1 OBJECT IDENTIFIER,
+ currentAlarmExtra2 OBJECT IDENTIFIER
+ }
+
+currentAlarmFaultId OBJECT-TYPE
+ SYNTAX Integer32 (1..2147483647)
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "An id that uniquely identifies a fault. Each fault is
+ represented as one an entry in the currentAlarmTable."
+ ::= { currentAlarmEntry 1 }
+
+currentAlarmEventIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..2147483647)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "A pointer into the eventTable. Points to the event
+ corresponding to this alarm."
+ ::= { currentAlarmEntry 2 }
+
+currentAlarmObject OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The alarming object."
+ ::= { currentAlarmEntry 3 }
+
+currentAlarmCause OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The probable cause of the alarm."
+ ::= { currentAlarmEntry 4 }
+
+currentAlarmSeverity OBJECT-TYPE
+ SYNTAX AlarmSeverity
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The perceived severity of the fault. A manager can set
+ this value to clear only. When set to clear, the alarm
+ is removed from this table, and a 'clearAlarm' event is
+ generated."
+ ::= { currentAlarmEntry 5 }
+
+currentAlarmTime OBJECT-TYPE
+ SYNTAX DateAndTime
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The time the fault was detected."
+ ::= { currentAlarmEntry 6 }
+
+currentAlarmInformation OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Additional information pin-pointing the problem."
+ ::= { currentAlarmEntry 7 }
+
+currentAlarmExtra1 OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An extra parameter used for some alarms at their own
+ discretion. Can be used for example to identify
+ additional objects in the alarm, or instead of
+ currentAlarmInformation to pin-point the problem, if the
+ additional information is defined in some MIB."
+ ::= { currentAlarmEntry 8 }
+
+currentAlarmExtra2 OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An extra parameter used for some alarms at their own
+ discretion. Can be used for example to identify
+ additional objects in the alarm, or instead of
+ currentAlarmInformation to pin-point the problem, if the
+ additional information is defined in some MIB."
+ ::= { currentAlarmEntry 9 }
+
+
+-- Events
+
+alarmCleared NOTIFICATION-TYPE
+ OBJECTS {
+ currentAlarmEventIndex,
+ eventTime
+ }
+ STATUS current
+ DESCRIPTION
+ "This event is sent when an alarm has been cleared,
+ either by the application or by an operator. Note that the
+ currentAlarmFaultId is implicitly sent as the instance identifier
+ for currentAlarmEventIndex."
+ ::= { otpEvaMIBEventsV2 1 }
+
+
+-- conformance information
+
+otpEvaMIBCompliances
+ OBJECT IDENTIFIER ::= { otpEvaMIBConformance 1 }
+otpEvaMIBGroups
+ OBJECT IDENTIFIER ::= { otpEvaMIBConformance 2 }
+
+
+-- compliance statements
+
+otpEvaBasicCompliance MODULE-COMPLIANCE
+ STATUS current
+ DESCRIPTION
+ "The compliance statement for SNMPv2 entities which
+ implement the OTP-EVA-MIB."
+ MODULE -- this module
+ MANDATORY-GROUPS { eventGroup,
+ alarmGroup,
+ currentAlarmGroup,
+ evaEventsGroup }
+
+ ::= { otpEvaMIBCompliances 1 }
+
+
+-- units of conformance
+
+eventGroup OBJECT-GROUP
+ OBJECTS { eventTrapName,
+ eventTreatment,
+ eventCommunity,
+ eventSentTraps,
+ eventOwner,
+ eventTime }
+ STATUS current
+ DESCRIPTION
+ "A collection of objects providing basic instrumentation
+ and control of the events defined in the OTP system."
+ ::= { otpEvaMIBGroups 1 }
+
+alarmGroup OBJECT-GROUP
+ OBJECTS { alarmClass,
+ alarmSeverity }
+ STATUS current
+ DESCRIPTION
+ "A collection of objects providing basic instrumentation
+ and control of the alarms defined the OTP system."
+ ::= { otpEvaMIBGroups 2 }
+
+currentAlarmGroup OBJECT-GROUP
+ OBJECTS { numberOfCurrentAlarms,
+ currentAlarmLastTimeChanged,
+ currentAlarmEventIndex,
+ currentAlarmObject,
+ currentAlarmCause,
+ currentAlarmSeverity,
+ currentAlarmTime,
+ currentAlarmInformation,
+ currentAlarmExtra1,
+ currentAlarmExtra2 }
+ STATUS current
+ DESCRIPTION
+ "A collection of objects providing basic instrumentation
+ of the activa alarm list in the OTP system."
+ ::= { otpEvaMIBGroups 3 }
+
+evaEventsGroup NOTIFICATION-GROUP
+ NOTIFICATIONS { alarmCleared }
+ STATUS current
+ DESCRIPTION
+ "The notification which is generated from EVA."
+ ::= { otpEvaMIBGroups 4 }
+
+
+END
diff --git a/lib/otp_mibs/mibs/OTP-MIB.funcs b/lib/otp_mibs/mibs/OTP-MIB.funcs
new file mode 100644
index 0000000000..9f9d69c3d1
--- /dev/null
+++ b/lib/otp_mibs/mibs/OTP-MIB.funcs
@@ -0,0 +1,2 @@
+{erlNodeTable, {otp_mib, erl_node_table, []}}.
+{applTable, {otp_mib, appl_table, []}}.
diff --git a/lib/otp_mibs/mibs/OTP-MIB.mib b/lib/otp_mibs/mibs/OTP-MIB.mib
new file mode 100644
index 0000000000..2d4c286bc7
--- /dev/null
+++ b/lib/otp_mibs/mibs/OTP-MIB.mib
@@ -0,0 +1,311 @@
+--
+-- %CopyrightBegin%
+--
+-- Copyright Ericsson AB 1996-2009. All Rights Reserved.
+--
+-- The contents of this file are subject to the Erlang Public License,
+-- Version 1.1, (the "License"); you may not use this file except in
+-- compliance with the License. You should have received a copy of the
+-- Erlang Public License along with this software. If not, it can be
+-- retrieved online at http://www.erlang.org/.
+--
+-- Software distributed under the License is distributed on an "AS IS"
+-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+-- the License for the specific language governing rights and limitations
+-- under the License.
+--
+-- %CopyrightEnd%
+--
+
+OTP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE,
+ Counter32, Gauge32, Integer32
+ FROM SNMPv2-SMI
+ TEXTUAL-CONVENTION, DisplayString
+ FROM SNMPv2-TC
+ MODULE-COMPLIANCE, OBJECT-GROUP
+ FROM SNMPv2-CONF
+ otpModules, otpApplications
+ FROM OTP-REG
+ ;
+
+otpModule MODULE-IDENTITY
+ LAST-UPDATED "0305090900Z"
+ ORGANIZATION "Ericsson"
+ CONTACT-INFO
+ "Contact: Erlang Support see license agreement for Erlang/OTP."
+ DESCRIPTION
+ "This is a MIB for a distributed OTP system, with one SNMP
+ agent executing at one node only. Each Erlang node in the
+ OTP system is represented by one row in the erlNodeTable."
+
+ REVISION "0305090900Z"
+ DESCRIPTION
+ "Changed CONTACT-INFO as it was outdated, made it more generic
+ to avoid such changes in the future."
+
+ REVISION "9712010900Z"
+ DESCRIPTION
+ "Converted to v2 SMI and placed in the OTP tree."
+
+ REVISION "9608191700Z"
+ DESCRIPTION
+ "The initial revision of MIB module OTP-MIB."
+
+ ::= { otpModules 3 }
+
+otpMIB OBJECT IDENTIFIER ::= { otpApplications 1 }
+otpMIBConformance
+ OBJECT IDENTIFIER ::= { otpMIB 1 }
+otpMIBObjects OBJECT IDENTIFIER ::= { otpMIB 2 }
+
+-- Datatypes
+
+MilliSeconds ::= TEXTUAL-CONVENTION
+ STATUS current
+ DESCRIPTION
+ "The MilliSeconds type represents a Counter which represents
+ the time, in milliseconds between two epochs. When objects
+ are defined which use this type, the description of the object
+ identifies both of the reference epochs."
+ SYNTAX Counter32
+
+
+-- Managed Objects
+
+erlang OBJECT IDENTIFIER ::= { otpMIBObjects 1 }
+appls OBJECT IDENTIFIER ::= { otpMIBObjects 2 }
+
+erlNodeTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ErlNodeEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A table with info on each erlang node in the system."
+ ::= { erlang 1 }
+
+erlNodeEntry OBJECT-TYPE
+ SYNTAX ErlNodeEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A conceptual row in the erlNodeTable."
+ INDEX { erlNodeId }
+ ::= { erlNodeTable 1 }
+
+ErlNodeEntry ::= SEQUENCE {
+ erlNodeId Integer32,
+ erlNodeName DisplayString,
+ erlNodeMachine DisplayString,
+ erlNodeVersion DisplayString,
+ erlNodeRunQueue Gauge32,
+ erlNodeRunTime MilliSeconds,
+ erlNodeWallClock MilliSeconds,
+ erlNodeReductions Counter32,
+ erlNodeProcesses Gauge32,
+ erlNodeInBytes Counter32,
+ erlNodeOutBytes Counter32
+}
+
+erlNodeId OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "An integer that uniquely identifies the erlang node."
+ ::= { erlNodeEntry 1 }
+
+erlNodeName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The symbolic name of the erlang node."
+ ::= { erlNodeEntry 2 }
+
+erlNodeMachine OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The virtual machine executing the erlang node"
+ ::= { erlNodeEntry 3 }
+
+erlNodeVersion OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The version number of the virtual machine"
+ ::= { erlNodeEntry 4 }
+
+erlNodeRunQueue OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of processes scheduled to run"
+ ::= { erlNodeEntry 5 }
+
+erlNodeRunTime OBJECT-TYPE
+ SYNTAX MilliSeconds
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Total cpu time in milliseconds since the
+ system started"
+ ::= { erlNodeEntry 6 }
+
+erlNodeWallClock OBJECT-TYPE
+ SYNTAX MilliSeconds
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Total real time in milliseconds since the
+ system started"
+ ::= { erlNodeEntry 7 }
+
+erlNodeReductions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of function calls since the system started"
+ ::= { erlNodeEntry 8 }
+
+erlNodeProcesses OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of running processes in the system."
+ ::= { erlNodeEntry 9 }
+
+erlNodeInBytes OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of bytes delivered to the system"
+ ::= { erlNodeEntry 10 }
+
+erlNodeOutBytes OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of bytes delivered from the system"
+ ::= { erlNodeEntry 11 }
+
+
+applTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ApplEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A table with all currently running applications
+ for each node."
+ ::= { appls 1 }
+
+applEntry OBJECT-TYPE
+ SYNTAX ApplEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A conceptual row in the applTable."
+ INDEX { erlNodeId, applId }
+ ::= { applTable 1 }
+
+ApplEntry ::= SEQUENCE {
+ applId Integer32,
+ applName DisplayString,
+ applDescr DisplayString,
+ applVsn DisplayString
+}
+
+applId OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "An integer that uniquely identifies the application."
+ ::= { applEntry 1 }
+
+applName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The name of the application."
+ ::= { applEntry 2 }
+
+applDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "A short description of the application."
+ ::= { applEntry 3 }
+
+applVsn OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The version of the application."
+ ::= { applEntry 4 }
+
+
+-- conformance information
+
+otpMIBCompliances
+ OBJECT IDENTIFIER ::= { otpMIBConformance 1 }
+otpMIBGroups OBJECT IDENTIFIER ::= { otpMIBConformance 2 }
+
+
+-- compliance statements
+
+otpBasicCompliance MODULE-COMPLIANCE
+ STATUS current
+ DESCRIPTION
+ "The compliance statement for SNMPv2 entities which
+ implement the OTP-MIB."
+ MODULE -- this module
+ MANDATORY-GROUPS { erlGroup, applGroup }
+
+ ::= { otpMIBCompliances 1 }
+
+
+-- units of conformance
+
+erlGroup OBJECT-GROUP
+ OBJECTS { erlNodeName,
+ erlNodeMachine,
+ erlNodeVersion,
+ erlNodeRunQueue,
+ erlNodeRunTime,
+ erlNodeWallClock,
+ erlNodeReductions,
+ erlNodeProcesses,
+ erlNodeInBytes,
+ erlNodeOutBytes }
+ STATUS current
+ DESCRIPTION
+ "A collection of objects providing basic instrumentation
+ of the Erlang runtime system."
+ ::= { otpMIBGroups 1 }
+
+applGroup OBJECT-GROUP
+ OBJECTS { applName,
+ applDescr,
+ applVsn }
+ STATUS current
+ DESCRIPTION
+ "A collection of objects providing basic instrumentation
+ of the applications in the OTP system."
+ ::= { otpMIBGroups 2 }
+
+
+END
diff --git a/lib/otp_mibs/mibs/OTP-REG.mib b/lib/otp_mibs/mibs/OTP-REG.mib
new file mode 100644
index 0000000000..c6ef2c67e5
--- /dev/null
+++ b/lib/otp_mibs/mibs/OTP-REG.mib
@@ -0,0 +1,102 @@
+--
+-- %CopyrightBegin%
+--
+-- Copyright Ericsson AB 1997-2009. All Rights Reserved.
+--
+-- The contents of this file are subject to the Erlang Public License,
+-- Version 1.1, (the "License"); you may not use this file except in
+-- compliance with the License. You should have received a copy of the
+-- Erlang Public License along with this software. If not, it can be
+-- retrieved online at http://www.erlang.org/.
+--
+-- Software distributed under the License is distributed on an "AS IS"
+-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+-- the License for the specific language governing rights and limitations
+-- under the License.
+--
+-- %CopyrightEnd%
+--
+
+OTP-REG DEFINITIONS ::= BEGIN
+
+IMPORTS
+ MODULE-IDENTITY, enterprises
+ FROM SNMPv2-SMI
+ ;
+
+otpRegModule MODULE-IDENTITY
+ LAST-UPDATED "0305090900Z"
+ ORGANIZATION "Ericsson"
+ CONTACT-INFO
+ "Contact: Erlang Support see license agreement for Erlang/OTP."
+ DESCRIPTION
+ "The root MIB module for OTP."
+
+ REVISION "0305090900Z"
+ DESCRIPTION
+ "Changed CONTACT-INFO as it was outdated, made it more generic
+ to avoid such changes in the future."
+
+ REVISION "9902020900Z"
+ DESCRIPTION
+ "Cleaned up OBJECT IDENTIFIER registration. Changed the name
+ of the MODULE-IDENTITY of this module to non-conflicting name
+ otpRegModule."
+
+ REVISION "9712010900Z"
+ DESCRIPTION
+ "The initial revision of MIB module OTP-REG."
+ ::= { otpModules 1 }
+
+ericsson OBJECT IDENTIFIER ::= {enterprises 193}
+otp OBJECT IDENTIFIER ::= {ericsson 19}
+
+-- sub-tree for registraions, including Modules
+otpReg OBJECT IDENTIFIER ::= {otp 1}
+otpModules OBJECT IDENTIFIER ::= {otpReg 1}
+-- otpTcModule 2
+-- otpModule 3
+-- otpOsMonModule 4
+-- otpSnmpeaModule 5
+-- otpEvaModule 6
+-- otpLogModule 7
+-- otpEvaLogModule 8
+-- otpSnmpeaLogModule 9
+-- otpMeshModule 10
+
+
+-- sub-tree for OTP-wide objects and events
+otpGeneric OBJECT IDENTIFIER ::= {otp 2}
+
+-- sub-tree for product specific objects and events
+otpApplications
+ OBJECT IDENTIFIER ::= {otp 3}
+-- otpMib 1
+-- otpOsMonMib 2
+-- otpSnmpeaMib 3
+-- otpEvaMib 4
+-- otpLogMib 5
+-- otpMeshMib 6
+
+
+-- sub-tree for agent implementation capabilites
+otpCaps OBJECT IDENTIFIER ::= {otp 4}
+-- otpMibImplV10 1 (vsn of mib implementation, e.g. otp_mib)
+-- otpOsMonMibImplV10 2
+-- otpSnmpeaMibImplV10 3
+-- otpEvaMibImplV10 4
+-- otpLogMibImplV10 5
+
+
+-- sub-tree for requirement specifications
+otpReqs OBJECT IDENTIFIER ::= {otp 5}
+
+-- sub-tree for experimental modules within OTP
+otpExpr OBJECT IDENTIFIER ::= {otp 6}
+
+-- sub-tree for SSL within OTP
+-- Note that this subtree is not MIB related, but it
+-- is defined in this MIB file to avoid clashes.
+ssl OBJECT IDENTIFIER ::= {otp 10}
+
+END
diff --git a/lib/otp_mibs/mibs/OTP-TC.mib b/lib/otp_mibs/mibs/OTP-TC.mib
new file mode 100644
index 0000000000..38c4d05846
--- /dev/null
+++ b/lib/otp_mibs/mibs/OTP-TC.mib
@@ -0,0 +1,92 @@
+--
+-- %CopyrightBegin%
+--
+-- Copyright Ericsson AB 1997-2009. All Rights Reserved.
+--
+-- The contents of this file are subject to the Erlang Public License,
+-- Version 1.1, (the "License"); you may not use this file except in
+-- compliance with the License. You should have received a copy of the
+-- Erlang Public License along with this software. If not, it can be
+-- retrieved online at http://www.erlang.org/.
+--
+-- Software distributed under the License is distributed on an "AS IS"
+-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+-- the License for the specific language governing rights and limitations
+-- under the License.
+--
+-- %CopyrightEnd%
+--
+
+OTP-TC DEFINITIONS ::= BEGIN
+
+IMPORTS
+ MODULE-IDENTITY
+ FROM SNMPv2-SMI
+ TEXTUAL-CONVENTION, DisplayString
+ FROM SNMPv2-TC
+ otpModules
+ FROM OTP-REG
+ ;
+
+otpTcModule MODULE-IDENTITY
+ LAST-UPDATED "0305090900Z"
+ ORGANIZATION "Ericsson"
+ CONTACT-INFO
+ "Contact: Erlang Support see license agreement for Erlang/OTP."
+ DESCRIPTION
+ "This MIB is part of the OTP MIB. It defines common
+ Textual Conventions used in other OTP mib modules."
+
+ REVISION "0305090900Z"
+ DESCRIPTION
+ "Changed CONTACT-INFO as it was outdated, made it more generic
+ to avoid such changes in the future."
+
+
+ REVISION "9712010900Z"
+ DESCRIPTION
+ "The initial version of this module."
+ ::= { otpModules 2 }
+
+OwnerString ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "255a"
+ STATUS current
+ DESCRIPTION
+ "An OwnerString identifies the initiator or owner of a row
+ in a table. This label is set by the initiator to provide
+ for the following possibilities:
+
+ o A management station may recognize resources it owns
+ and no longer needs.
+ o A network operator can find the management station that
+ owns the resource and negotiate for it to be freed.
+ o A network operator may decide to unilaterally free
+ resources another network operator has reserved.
+ o Upon initialization, a management station may recognize
+ resources it had reserved in the past. With this
+ information it may free the resources if it no longer
+ needs them.
+
+ Management stations and agent systems should support any format
+ of the OwnerString dictated by the local policy of the
+ organization. It is suggested that this name contain one or
+ more of the following: IP address, management station name,
+ network manager's name, location, or phone number. This
+ information will help users to share the resources more
+ effectively.
+
+ There is often default functionality that the device or the
+ administrator of the agent (often the network administrator) wishes
+ to set up. The resources associated with this functionality are then
+ owned by the device itself or by the network administrator, and are
+ intended to be long-lived. In this case, the device or the
+ administrator will set the relevant owner object to a string starting
+ with 'local'. Indiscriminate modification of the local
+ configuration by network management stations is discouraged. In
+ fact, a network management station should only modify these objects
+ under the direction of the administrator of the agent system."
+ REFERENCE
+ "RFC1757, RMON-MIB"
+ SYNTAX DisplayString (SIZE (0..127))
+
+END
diff --git a/lib/otp_mibs/mibs/v1/.gitignore b/lib/otp_mibs/mibs/v1/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/otp_mibs/mibs/v1/.gitignore
diff --git a/lib/otp_mibs/priv/bin/.gitignore b/lib/otp_mibs/priv/bin/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/otp_mibs/priv/bin/.gitignore
diff --git a/lib/otp_mibs/priv/mibs/.gitignore b/lib/otp_mibs/priv/mibs/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/otp_mibs/priv/mibs/.gitignore
diff --git a/lib/otp_mibs/priv/obj/.gitignore b/lib/otp_mibs/priv/obj/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/otp_mibs/priv/obj/.gitignore
diff --git a/lib/otp_mibs/src/Makefile b/lib/otp_mibs/src/Makefile
new file mode 100644
index 0000000000..833a439adb
--- /dev/null
+++ b/lib/otp_mibs/src/Makefile
@@ -0,0 +1,105 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2003-2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+include $(ERL_TOP)/make/target.mk
+
+ifeq ($(TYPE),debug)
+ERL_COMPILE_FLAGS += -Ddebug -W
+endif
+
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Application version
+# ----------------------------------------------------
+include ../vsn.mk
+VSN=$(OTP_MIBS_VSN)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/lib/otp_mibs-$(VSN)
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+MODULES = \
+ otp_mib
+
+INCLUDE=../include
+
+HRL_FILES =
+
+INTERNAL_HRL_FILES =
+
+ERL_FILES = $(MODULES:%=%.erl)
+
+APP_FILE = otp_mibs.app
+APP_SRC = $(APP_FILE).src
+APP_TARGET = $(EBIN)/$(APP_FILE)
+
+APPUP_FILE = otp_mibs.appup
+APPUP_SRC = $(APPUP_FILE).src
+APPUP_TARGET = $(EBIN)/$(APPUP_FILE)
+
+TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+
+TARGETS = $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET)
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+ERL_COMPILE_FLAGS += -I$(INCLUDE) +warn_obsolete_guard
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+debug opt: $(TARGETS)
+
+clean:
+ rm -f $(TARGETS_FILES)
+ rm -f $(APP_TARGET)
+ rm -f $(APPUP_TARGET)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Special Build Targets
+# ----------------------------------------------------
+
+$(APP_TARGET): $(APP_SRC) ../vsn.mk
+ sed -e 's;%VSN%;$(VSN);' $< > $@
+
+$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+ sed -e 's;%VSN%;$(VSN);' $< > $@
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/src
+ $(INSTALL_DATA) $(ERL_FILES) $(RELSYSDIR)/src
+ $(INSTALL_DIR) $(RELSYSDIR)/ebin
+ $(INSTALL_DATA) $(TARGETS) $(RELSYSDIR)/ebin
+
+release_docs_spec:
+
+
diff --git a/lib/otp_mibs/src/otp_mib.erl b/lib/otp_mibs/src/otp_mib.erl
new file mode 100644
index 0000000000..e8b0e51b91
--- /dev/null
+++ b/lib/otp_mibs/src/otp_mib.erl
@@ -0,0 +1,198 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(otp_mib).
+%%%-----------------------------------------------------------------
+%%% Description: This module implements the OTP-MIB.
+%%% The tables are implemented as shadow tables with the module
+%%% snmp_shadow_table.
+%%%-----------------------------------------------------------------
+
+%% API
+-export([load/1, unload/1]).
+
+%% SNMP instrumentation
+-export([erl_node_table/1, erl_node_table/3, appl_table/1, appl_table/3]).
+
+%% SNMP shadow functions
+-export([update_erl_node_table/0, update_appl_table/0]).
+
+%% Exported for internal use via rpc
+-export([get_erl_node/1, get_appls/1]).
+
+%% Shadow tables
+-record(erlNodeTable,
+ {erlNodeId, erlNodeName, erlNodeMachine, erlNodeVersion,
+ erlNodeRunQueue,
+ erlNodeRunTime, erlNodeWallClock, erlNodeReductions,
+ erlNodeProcesses, erlNodeInBytes, erlNodeOutBytes}).
+
+-record(applTable, {key = '_', applName = '_', applDescr = '_',
+ applVsn = '_'}).
+
+%% Shadow argument macros
+-define(erlNodeShadowArgs,
+ {erlNodeTable, integer, record_info(fields, erlNodeTable), 5000,
+ {otp_mib, update_erl_node_table}}).
+
+-define(applShadowArgs,
+ {applTable, {integer, integer}, record_info(fields, applTable),
+ 5000, {otp_mib, update_appl_table}}).
+
+%% Misc
+-record(erlNodeAlloc, {nodeName, nodeId}).
+
+%%%=========================================================================
+%%% API
+%%%=========================================================================
+
+%%-------------------------------------------------------------------------
+%% load(Agent) -> ok | {error, Reason}
+%% Agent - pid() | atom()
+%% Reason - term()
+%% Description: Loads the OTP-MIB
+%%-------------------------------------------------------------------------
+load(Agent) ->
+ MibDir = code:priv_dir(otp_mibs) ++ "/mibs",
+ snmpa:load_mibs(Agent, [MibDir ++ "/OTP-MIB"]).
+
+%%-------------------------------------------------------------------------
+%% unload(Agent) -> ok | {error, Reason}
+%% Agent - pid() | atom()
+%% Reason - term()
+%% Description: Loads the OTP-MIB
+%%-------------------------------------------------------------------------
+unload(Agent) ->
+ snmpa:unload_mibs(Agent, ["OTP-MIB"]).
+
+
+%%%=========================================================================
+%%% SNMP instrumentation
+%%%=========================================================================
+erl_node_table(new) ->
+ Tab = erlNodeAlloc,
+ Storage = ram_copies,
+ case lists:member(Tab, mnesia:system_info(tables)) of
+ true ->
+ case mnesia:table_info(Tab, storage_type) of
+ unknown ->
+ {atomic, ok} = mnesia:add_table_copy(Tab, node(), Storage);
+ Storage ->
+ catch delete_all(Tab)
+ end;
+ false ->
+ Nodes = [node()],
+ Props = [{type, set},
+ {attributes, record_info(fields, erlNodeAlloc)},
+ {local_content, true},
+ {Storage, Nodes}],
+ {atomic, ok} = mnesia:create_table(Tab, Props)
+ end,
+ ok = mnesia:dirty_write({erlNodeAlloc, next_index, 1}),
+ update_node_alloc([node() | nodes()]),
+ snmp_shadow_table:table_func(new, ?erlNodeShadowArgs).
+
+erl_node_table(Op, RowIndex, Cols) ->
+ snmp_shadow_table:table_func(Op, RowIndex, Cols, ?erlNodeShadowArgs).
+
+
+appl_table(Op) ->
+ snmp_shadow_table:table_func(Op, ?applShadowArgs).
+appl_table(Op, RowIndex, Cols) ->
+ snmp_shadow_table:table_func(Op, RowIndex, Cols, ?applShadowArgs).
+
+
+%%%=========================================================================
+%%% SNMP shadow functions
+%%%=========================================================================
+update_erl_node_table() ->
+ delete_all(erlNodeTable),
+ Nodes = [node() | nodes()],
+ update_node_alloc(Nodes),
+ lists:foreach(
+ fun(Node) ->
+ [{_,_,Idx}] = mnesia:dirty_read({erlNodeAlloc, Node}),
+ ErlNode = rpc:call(Node, otp_mib, get_erl_node, [Idx]),
+ ok = mnesia:dirty_write(ErlNode)
+ end, Nodes).
+
+update_appl_table() ->
+ delete_all(applTable),
+ Nodes = [node() | nodes()],
+ update_node_alloc(Nodes),
+ lists:foreach(
+ fun(Node) ->
+ [{_,_,Idx}] = mnesia:dirty_read({erlNodeAlloc, Node}),
+ Appls = rpc:call(Node, otp_mib, get_appls, [Idx]),
+ lists:foreach(fun(Appl) ->
+ ok = mnesia:dirty_write(Appl)
+ end, Appls)
+ end, Nodes).
+
+%%%========================================================================
+%%% Exported for internal use via rpc
+%%%========================================================================
+get_erl_node(Id) ->
+ IO = erlang:statistics(io),
+ #erlNodeTable{erlNodeId = Id,
+ erlNodeName = atom_to_list(node()),
+ erlNodeVersion = erlang:system_info(version),
+ erlNodeMachine = erlang:system_info(machine),
+ erlNodeRunQueue = erlang:statistics(run_queue),
+ erlNodeRunTime = element(1, erlang:statistics(runtime)),
+ erlNodeWallClock =
+ element(1, erlang:statistics(wall_clock)),
+ erlNodeReductions =
+ element(1, erlang:statistics(reductions)),
+ erlNodeProcesses = length(processes()),
+ erlNodeInBytes = element(2, element(1, IO)),
+ erlNodeOutBytes = element(2, element(2, IO))}.
+
+get_appls(NodeId) ->
+ element(1,
+ lists:mapfoldl(
+ fun({ApplName, ApplDescr, ApplVsn}, ApplId) ->
+ {#applTable{key = {NodeId, ApplId},
+ applName = atom_to_list(ApplName),
+ applDescr = ApplDescr,
+ applVsn = ApplVsn},
+ ApplId + 1}
+ end, 1, application:which_applications())).
+
+%%%========================================================================
+%%% Internal functions
+%%%========================================================================
+update_node_alloc([Node | T]) ->
+ case mnesia:dirty_read({erlNodeAlloc, Node}) of
+ [] ->
+ [{_, _, Idx}] = mnesia:dirty_read({erlNodeAlloc, next_index}),
+ ok = mnesia:dirty_write(#erlNodeAlloc{nodeName = Node,
+ nodeId = Idx}),
+ ok = mnesia:dirty_write({erlNodeAlloc, next_index, Idx + 1});
+ _ ->
+ ok
+ end,
+ update_node_alloc(T);
+update_node_alloc([]) -> ok.
+
+delete_all(Name) -> delete_all(mnesia:dirty_first(Name), Name).
+delete_all('$end_of_table', _Name) -> done;
+delete_all(Key, Name) ->
+ Next = mnesia:dirty_next(Name, Key),
+ ok = mnesia:dirty_delete({Name, Key}),
+ delete_all(Next, Name).
diff --git a/lib/otp_mibs/src/otp_mibs.app.src b/lib/otp_mibs/src/otp_mibs.app.src
new file mode 100644
index 0000000000..b177af0709
--- /dev/null
+++ b/lib/otp_mibs/src/otp_mibs.app.src
@@ -0,0 +1,27 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+{application, otp_mibs,
+ [{description, "SNMP managment information base for Erlang/OTP nodes."},
+ {vsn, "%VSN%"},
+ {modules, [otp_mib]},
+ {registered, []},
+ {applications, [kernel, stdlib, snmp]},
+ {env,[]}]}.
+
diff --git a/lib/otp_mibs/src/otp_mibs.appup.src b/lib/otp_mibs/src/otp_mibs.appup.src
new file mode 100644
index 0000000000..5e99dfe325
--- /dev/null
+++ b/lib/otp_mibs/src/otp_mibs.appup.src
@@ -0,0 +1,20 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+{"%VSN%",[],[]}.
diff --git a/lib/otp_mibs/vsn.mk b/lib/otp_mibs/vsn.mk
new file mode 100644
index 0000000000..c2fa7c9474
--- /dev/null
+++ b/lib/otp_mibs/vsn.mk
@@ -0,0 +1,5 @@
+OTP_MIBS_VSN = 1.0.6
+
+# Note: The branch 'otp_mibs' is defunct as of otp_mibs-1.0.4 and
+# should NOT be used again.
+