-- *****************************************************************
-- RBN-MEMORY-MIB	Redback Memory Mib
--
-- Copyright (c) 2002,2004 RedBack Networks, Inc.
-- All rights reserved.
-- 
-- *****************************************************************

RBN-MEMORY-MIB DEFINITIONS ::= BEGIN

IMPORTS
	MODULE-IDENTITY, OBJECT-TYPE,
	Unsigned32
		FROM SNMPv2-SMI

	MODULE-COMPLIANCE, OBJECT-GROUP
		FROM SNMPv2-CONF

	SnmpAdminString
		FROM SNMP-FRAMEWORK-MIB

	rbnMgmt
		FROM RBN-SMI

	RbnKBytes
		FROM RBN-TC;

rbnMemoryMib MODULE-IDENTITY
	LAST-UPDATED	"200403051700Z" -- Mar 5, 2004
	ORGANIZATION	"Redback Networks, Inc."
        CONTACT-INFO
                "       RedBack Networks, Inc.

                Postal: 300 Holger Way
                        San Jose, CA  95134-1362
                        USA

                 Phone: +1 408 750 5000
                   Fax: +1 408 750 5599

                E-mail: mib-info@redback.com"
	DESCRIPTION
		"Defines the objects necessary to obtain information allowing
		monitoring of system memory usage in a Redback device."

	REVISION	"200403051700Z" -- Mar 5, 2004
	DESCRIPTION
		"Obsoleted rbnSmsMemoryTable and corresponding conformance
		information."

	REVISION	"200206260000Z" -- Jun 26, 2002
	DESCRIPTION
		"Updated CONTACT-INFO.  Added rbnMemoryTable, rbnMemoryGroup
		conformance group, and compliance statements.  Deprecated 
		rbnSmsMemoryTable and conformance information relevant to the 
		table."

	REVISION	"200201031700Z" -- Jan 3, 2002
	DESCRIPTION
		"Initial version."

	::= { rbnMgmt 16 }


rbnMemoryMIBNotifications OBJECT IDENTIFIER ::= { rbnMemoryMib 0 }

rbnMemoryMIBObjects       OBJECT IDENTIFIER ::= { rbnMemoryMib 1 }

rbnMemoryMIBConformance   OBJECT IDENTIFIER ::= { rbnMemoryMib 2 }


--
-- SMS Memory Usage Table
--

rbnSmsMemoryTable OBJECT-TYPE
	SYNTAX       SEQUENCE OF RbnSmsMemoryEntry
	MAX-ACCESS   not-accessible
	STATUS       obsolete
	DESCRIPTION
		"This table contains the objects which identify information
		about SMS memory usage.  This table has been obsoleted.  The
		new rbnMemoryTable must be used instead."
	::= { rbnMemoryMIBObjects 1 }

rbnSmsMemoryEntry OBJECT-TYPE
	SYNTAX       RbnSmsMemoryEntry
	MAX-ACCESS   not-accessible
	STATUS       obsolete
	DESCRIPTION
		"A conceptual row in the rbnSmsMemoryTable.  This Entry has
		been obsoleted.  The new rbnMemoryEntry must be used
		instead."
	INDEX        { rbnSmsMemoryIndex }
	::= { rbnSmsMemoryTable 1 }

RbnSmsMemoryEntry ::=
	SEQUENCE {
		rbnSmsMemoryIndex		Unsigned32,
		rbnSmsMemoryModule		SnmpAdminString,
		rbnSmsMemoryFreeBytes		Unsigned32,
		rbnSmsMemoryBytesInUse		Unsigned32,
		rbnSmsMemoryBlocksInUse		Unsigned32,
		rbnSmsMemoryCumulBlocks		Unsigned32
	}

rbnSmsMemoryIndex OBJECT-TYPE
	SYNTAX       Unsigned32 (1..4294967295)
	MAX-ACCESS   not-accessible
	STATUS       obsolete
	DESCRIPTION
		"A unique identifier for an entry in this table."
	::= { rbnSmsMemoryEntry 1 }

rbnSmsMemoryModule OBJECT-TYPE
	SYNTAX       SnmpAdminString (SIZE (0..32))
	MAX-ACCESS   read-only
	STATUS       obsolete
	DESCRIPTION
		"The name of the module.  This name is the same as that
		 which would be displayed via the `show memory' CLI command.
		 Examples would be CE, FE, SM 2, CM 3."
	::= { rbnSmsMemoryEntry 2 }

rbnSmsMemoryFreeBytes OBJECT-TYPE
	SYNTAX       Unsigned32 (0..4294967295)
	MAX-ACCESS   read-only
	STATUS       obsolete
	DESCRIPTION
		"The number of unused bytes of memory in this entry."
	::= { rbnSmsMemoryEntry 3 }

rbnSmsMemoryBytesInUse OBJECT-TYPE
	SYNTAX       Unsigned32 (0..4294967295)
	MAX-ACCESS   read-only
	STATUS       obsolete
	DESCRIPTION
		"The number of bytes of memory in use in this entry."
	::= { rbnSmsMemoryEntry 4 }

rbnSmsMemoryBlocksInUse OBJECT-TYPE
	SYNTAX       Unsigned32 (0..4294967295)
	MAX-ACCESS   read-only
	STATUS       obsolete
	DESCRIPTION
		"The number of blocks of memory in use in this entry.
		 A block of memory is the amount of memory returned by a
		 single call to the memory allocation routine in AOS.
		 Hence the size of a block of memory is variable.

		 This statistic can be used to check for memory leaks.
		 One possible strategy is to note the value, do some
		 operations, undo the operations, then check the value
		 again - the start and end values should match.  If they
		 do not, there may be a memory leak."
	::= { rbnSmsMemoryEntry 5 }

rbnSmsMemoryCumulBlocks OBJECT-TYPE
	SYNTAX       Unsigned32 (0..4294967295)
	MAX-ACCESS   read-only
	STATUS       obsolete
	DESCRIPTION
		"The cumulative blocks count for this entry.  It is an
		 indication of how many times the memory allocation in
		 AOS has been called since the system booted.

		 It can be used to measure the expense of an operation
		 in terms of calls to allocate memory, which are fairly
		 expensive in terms of CPU time."
	::= { rbnSmsMemoryEntry 6 }

--
-- Redback Memory Usage Table
--

rbnMemoryTable OBJECT-TYPE
        SYNTAX       SEQUENCE OF RbnMemoryEntry
        MAX-ACCESS   not-accessible
        STATUS       current
        DESCRIPTION
                "This table contains the objects which identify information
                 about memory usage."
        ::= { rbnMemoryMIBObjects 2 }

rbnMemoryEntry OBJECT-TYPE
        SYNTAX       RbnMemoryEntry
        MAX-ACCESS   not-accessible
        STATUS       current
        DESCRIPTION
                "A conceptual row in the rbnMemoryTable."
        INDEX { rbnMemoryIndex }
        ::= { rbnMemoryTable 1 }
                    
RbnMemoryEntry ::= 
        SEQUENCE {
                rbnMemoryIndex              Unsigned32,
                rbnMemoryModule             SnmpAdminString,
                rbnMemoryFreeKBytes         RbnKBytes,
                rbnMemoryKBytesInUse        RbnKBytes,
                rbnMemoryBlocksInUse        Unsigned32,
                rbnMemoryCumulBlocks        Unsigned32
        }

rbnMemoryIndex OBJECT-TYPE
        SYNTAX       Unsigned32 (1..4294967295)
        MAX-ACCESS   not-accessible
        STATUS       current
        DESCRIPTION
                "A unique identifier for an entry in this table."
        ::= { rbnMemoryEntry 1 }

rbnMemoryModule OBJECT-TYPE
        SYNTAX       SnmpAdminString (SIZE (0..32))
        MAX-ACCESS   read-only
        STATUS       current
        DESCRIPTION
                "The name of the module on which this memory resides."
        ::= { rbnMemoryEntry 2 }

rbnMemoryFreeKBytes OBJECT-TYPE
        SYNTAX       RbnKBytes
        UNITS        "KBytes"
        MAX-ACCESS   read-only
        STATUS       current
        DESCRIPTION
                "The size of unused memory in this entry."
        ::= { rbnMemoryEntry 3 }

rbnMemoryKBytesInUse OBJECT-TYPE
        SYNTAX       RbnKBytes
        UNITS        "KBytes"
        MAX-ACCESS   read-only
        STATUS       current
        DESCRIPTION
                "The size of memory in use in this entry."
        ::= { rbnMemoryEntry 4 }

rbnMemoryBlocksInUse OBJECT-TYPE
        SYNTAX       Unsigned32 (0..4294967295)
        MAX-ACCESS   read-only
        STATUS       current
        DESCRIPTION
                "The number of blocks of memory on this module which is in
                 use.  A block of memory is a unit of physical/virtual 
                 memory that can be allocated or freed by the user. This  
                 statistic can be used to check for memory leaks. One 
                 possible strategy is to note the value, do some operations, 
                 undo the operations, then check the value again - the start 
                 and end values should match.  If they do not, there may be 
                 a memory leak."
        ::= { rbnMemoryEntry 5 }

rbnMemoryCumulBlocks OBJECT-TYPE
        SYNTAX       Unsigned32 (0..4294967295)
        MAX-ACCESS   read-only
        STATUS       current
        DESCRIPTION
                "The cumulative blocks count for this entry.  For example,
                 in some systems, this indicates how many times the memory 
                 allocation routine has been called since the system booted.
                 Then, this can be used to measure the expense of an operation
                 because the calls to allocate memory are often considered to 
		 be cpu-intensive."
        ::= { rbnMemoryEntry 6 }

--
-- Compliance statements
--

rbnSmsMemoryCompliances OBJECT IDENTIFIER ::= { rbnMemoryMIBConformance 1 }
rbnSmsMemoryGroups      OBJECT IDENTIFIER ::= { rbnMemoryMIBConformance 2 }
rbnMemoryCompliances    OBJECT IDENTIFIER ::= { rbnMemoryMIBConformance 3 }
rbnMemoryGroups         OBJECT IDENTIFIER ::= { rbnMemoryMIBConformance 4 }

rbnMemoryCompliance MODULE-COMPLIANCE
        STATUS       current
        DESCRIPTION
                "The requirements for conformance to the Redback Memory
                 Usage MIB."
        MODULE      -- this module
        MANDATORY-GROUPS {
            rbnMemoryGroup
        }
        ::= { rbnMemoryCompliances 1}

-- Units of conformance

rbnMemoryGroup OBJECT-GROUP
        OBJECTS {
                rbnMemoryModule,
                rbnMemoryFreeKBytes,
                rbnMemoryKBytesInUse,
                rbnMemoryBlocksInUse,
                rbnMemoryCumulBlocks
        }
        STATUS       current
        DESCRIPTION
                "The collection of objects providing memory usage
                 information."
        ::= { rbnMemoryGroups 1}

-- Obsolete Definitions

rbnSmsMemoryGroup	OBJECT-GROUP
	OBJECTS {
		rbnSmsMemoryModule,
		rbnSmsMemoryFreeBytes,
		rbnSmsMemoryBytesInUse,
		rbnSmsMemoryBlocksInUse,
		rbnSmsMemoryCumulBlocks
	}
	STATUS	obsolete
	DESCRIPTION
		"The collection of objects providing SMS memory usage
                 information."
	::= { rbnSmsMemoryGroups 1}

rbnSmsMemoryCompliance MODULE-COMPLIANCE
	STATUS       obsolete
	DESCRIPTION
		"The compliance statement for SNMP entities which implement
		 the Redback SMS memory usage MIB."
	MODULE      -- this module
	MANDATORY-GROUPS {
		rbnSmsMemoryGroup
	}
	::= { rbnSmsMemoryCompliances 1}

END
 
