Index: ossp-pkg/snmpdx/snmpdx.d/sysVM.pm
RCS File: /v/ossp/cvs/ossp-pkg/snmpdx/snmpdx.d/sysVM.pm,v
co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/snmpdx/snmpdx.d/sysVM.pm,v' | diff -u /dev/null - -L'ossp-pkg/snmpdx/snmpdx.d/sysVM.pm' 2>/dev/null
--- ossp-pkg/snmpdx/snmpdx.d/sysVM.pm
+++ - 2024-11-01 01:19:37.540748093 +0100
@@ -0,0 +1,56 @@
+##
+## snmpdx -- SNMP Daemon Extension
+## Copyright (c) 2003 The OSSP Project
+## Copyright (c) 2003 Ralf S. Engelschall
+## Copyright (c) 2003 Cable & Wireless
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+## sysVM: System Vritual Memory
+##
+
+package My::Probe::sysVM;
+our @ISA = qw(My::Probe);
+
+sub oids ($) {
+ my ($self) = @_;
+ return $self->{-ctx}->{-mib}->oids("*.snmpdx.host.system.sysVM.*");
+}
+
+sub probe ($$) {
+ my ($self, $obj) = @_;
+
+ # FreeBSD Linux Solaris
+ #Mem Total sysctl -n hw.physmem /proc/meminfo:MemTotal /usr/platform/`uname -i`/sbin/prtdiag:Memory size
+ #Mem Used vmstat: avm /proc/meminfo:MemTotal-Buffers-Cached-MemFree "total" - "free"
+ #Mem Free "total"-"used" "total"-"used" sar -r 1 1: freemem * `pagesize`
+ #Mem Status N.A. N.A. /usr/platform/`uname -i`/sbin/prtdiag:Status col.
+ #
+ #Swap Total swapinfo -k | tail -1 /proc/meminfo:SwapTotal swap -l: blocks * 512 (accumulate)
+ #Swap Used swapinfo -k | tail -1 "total" - "free" "total"-"free"
+ #Swap Free "total"-"used" /proc/meminfo:SwapFree swap -l: free * 512 (accumulate)
+ #
+ #Mem/Swap vmstat: pi+po vmstat: si+so vmstat: sr
+ #Page Activity
+
+ return;
+}
+
+1;
+
Index: ossp-pkg/snmpdx/snmpdx.mib/snmpdx.mib
RCS File: /v/ossp/cvs/ossp-pkg/snmpdx/snmpdx.mib/snmpdx.mib,v
co -q -kk -p'1.2' '/v/ossp/cvs/ossp-pkg/snmpdx/snmpdx.mib/snmpdx.mib,v' | diff -u /dev/null - -L'ossp-pkg/snmpdx/snmpdx.mib/snmpdx.mib' 2>/dev/null
--- ossp-pkg/snmpdx/snmpdx.mib/snmpdx.mib
+++ - 2024-11-01 01:19:37.543752327 +0100
@@ -0,0 +1,441 @@
+snmpdx DEFINITIONS ::= BEGIN
+
+IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
+ Integer32, Counter32, Gauge32, TimeTicks
+ FROM SNMPv2-SMI
+
+ TEXTUAL-CONVENTION, DisplayString, DateAndTime
+ FROM SNMPv2-TC
+
+ MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
+ FROM SNMPv2-CONF;
+
+org OBJECT IDENTIFIER ::= { iso 3 } -- iso = 1
+dod OBJECT IDENTIFIER ::= { org 6 }
+internet OBJECT IDENTIFIER ::= { dod 1 }
+private OBJECT IDENTIFIER ::= { internet 4 }
+enterprises OBJECT IDENTIFIER ::= { private 1 }
+
+cw OBJECT IDENTIFIER ::= { enterprises 4007 }
+snmpdx OBJECT IDENTIFIER ::= { cw 42 }
+
+host OBJECT IDENTIFIER ::= { snmpdx 1 }
+hardware OBJECT IDENTIFIER ::= { host 1 }
+system OBJECT IDENTIFIER ::= { host 2 }
+software OBJECT IDENTIFIER ::= { host 3 }
+
+--
+-- System Identification
+--
+
+sysId OBJECT IDENTIFIER
+ ::= { system 1 }
+
+sysIdHostid OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "unique host identification of system"
+ ::= { sysId 1 }
+
+sysIdHostname OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "fully qualified host name of system"
+ ::= { sysId 2 }
+
+--
+-- System Virtual Memory
+--
+
+sysVM OBJECT IDENTIFIER
+ ::= { system 2 }
+
+sysVMRam OBJECT IDENTIFIER
+ ::= { sysVM 1 }
+
+sysVMRamMax OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "maximum available RAM in MB"
+ ::= { sysVMRam 1 }
+
+sysVMRamUsed OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "currently used RAM in MB"
+ ::= { sysVMRam 2 }
+
+sysVMRamFree OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "currently free RAM in MB"
+ ::= { sysVMRam 3 }
+
+sysVMSwap OBJECT IDENTIFIER
+ ::= { sysVM 2 }
+
+sysVMSwapMax OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "maximum available Swap in MB"
+ ::= { sysVMSwap 1 }
+
+sysVMSwapUsed OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "currently used Swap in MB"
+ ::= { sysVMSwap 2 }
+
+sysVMSwapFree OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "currently free Swap in MB"
+ ::= { sysVMSwap 3 }
+
+sysVMActivity OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "paging activity in units/time"
+ ::= { sysVM 3 }
+
+--
+-- System Load Average
+--
+
+sysLoad OBJECT IDENTIFIER
+ ::= { system 3 }
+
+sysLoad5 OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "load average during last 5 minutes"
+ ::= { sysLoad 1 }
+
+sysLoad10 OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "load average during last 10 minutes"
+ ::= { sysLoad 2 }
+
+sysLoad15 OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "load average during last 15 minutes"
+ ::= { sysLoad 3 }
+
+--
+-- System Processes
+--
+
+sysProc OBJECT IDENTIFIER
+ ::= { system 4 }
+
+sysProcMax OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "number of process contexts maximum possible"
+ ::= { sysProc 1 }
+
+sysProcActive OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "number of process contexts currently active"
+ ::= { sysProc 2 }
+
+--
+-- System Users
+--
+
+sysUser OBJECT IDENTIFIER
+ ::= { system 5 }
+
+sysUserMax OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "number of logged in users maximum possible"
+ ::= { sysUser 1 }
+
+sysUserLoggedIn OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "number of currently logged in users"
+ ::= { sysUser 2 }
+
+--
+-- System Uptime
+--
+
+sysUptime OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "time (in hundrets of a second) since the system was booted"
+ ::= { system 6 }
+
+--
+-- Hardware: Product
+--
+
+hwProd OBJECT IDENTIFIER
+ ::= { hardware 1 }
+
+hwProdArch OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "name of hardware architecture"
+ ::= { hwProd 1 }
+
+hwProdName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "name of hardware product"
+ ::= { hwProd 2 }
+
+--
+-- Hardware: CPU
+--
+
+hwCpu OBJECT IDENTIFIER
+ ::= { hardware 2 }
+
+hwCpuNum OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "number of CPUs"
+ ::= { hwCpu 1 }
+
+hwCpuSpeed OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "number of CPUs"
+ ::= { hwCpu 2 }
+
+hwCpuTemp OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "temperature of CPU"
+ ::= { hwCpu 3 }
+
+--
+-- Hardware: RAM
+--
+
+hwRam OBJECT IDENTIFIER
+ ::= { hardware 3 }
+
+hwRamStatus OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "boolean status of RAM banks"
+ ::= { hwRam 3 }
+
+--
+-- Hardware: Disk Space
+--
+
+hwDisk OBJECT IDENTIFIER
+ ::= { hardware 4 }
+
+hwDiskMax OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "maximum available Disk space in MB"
+ ::= { hwDisk 1 }
+
+hwDiskUsed OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "currently used Disk space in MB"
+ ::= { hwDisk 2 }
+
+hwDiskTemp OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "temperature of Disks"
+ ::= { hwDisk 3 }
+
+hwDiskStatus OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "boolean status of Disks"
+ ::= { hwDisk 4 }
+
+--
+-- Hardware: Power Supply
+--
+
+hwPS OBJECT IDENTIFIER
+ ::= { hardware 5 }
+
+hwPSNum OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "number of power supplies"
+ ::= { hwPS 1 }
+
+hwPSTemp OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "temperature of Power Supply"
+ ::= { hwPS 2 }
+
+hwPSStatus OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "boolean status of Power Supply (0:shutdown, 1:operating: 2:error)"
+ ::= { hwPS 3 }
+
+--
+-- Hardware: Chassis
+--
+
+hwChassis OBJECT IDENTIFIER
+ ::= { hardware 6 }
+
+hwChassisOpen OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "boolean open/close status of Chassis"
+ ::= { hwChassis 1 }
+
+hwChassisTemp OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "temperature inside Chassis"
+ ::= { hwChassis 2 }
+
+--
+-- Software: Operating System
+--
+
+swOs OBJECT IDENTIFIER
+ ::= { software 1 }
+
+swOsName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "name of operating system"
+ ::= { swOs 1 }
+
+swOsVersion OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "version of operating system"
+ ::= { swOs 2 }
+
+--
+-- Software: OpenPKG Instances
+--
+
+swOp OBJECT IDENTIFIER
+ ::= { software 2 }
+
+swOpVersion OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "OpenPKG instance version"
+ ::= { swOp 1 }
+
+swOpPkgTABLE OBJECT-TYPE
+ SYNTAX SEQUENCE OF SwOpPkgENTRY
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION "OpenPKG package table"
+ ::= { swOp 2 }
+
+swOpPkgENTRY OBJECT-TYPE
+ SYNTAX SwOpPkgENTRY
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION "An entry containing a load average and its values."
+ INDEX { swOpPkgIndex }
+ ::= { swOpPkgTABLE 1 }
+
+SwOpPkgENTRY ::= SEQUENCE {
+ swOpPkgIndex Integer32,
+ swOpPkgName DisplayString,
+ swOpPkgVersion DisplayString,
+ swOpPkgRelease DisplayString,
+ swOpPkgBuilt DateAndTime,
+ swOpPkgInstalled DateAndTime,
+}
+
+swOpPkgIndex OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "reference index/row number for each package"
+ ::= { swOpPkgENTRY 1 }
+
+swOpPkgName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "name of package"
+ ::= { swOpPkgENTRY 2 }
+
+swOpPkgVersion OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "vendor version of package"
+ ::= { swOpPkgENTRY 3 }
+
+swOpPkgRelease OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "OpenPKG release of package"
+ ::= { swOpPkgENTRY 4 }
+
+swOpPkgBuilt OBJECT-TYPE
+ SYNTAX DateAndTime
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "time package was built"
+ ::= { swOpPkgENTRY 5 }
+
+swOpPkgInstalled OBJECT-TYPE
+ SYNTAX DateAndTime
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "time package was installed"
+ ::= { swOpPkgENTRY 6 }
+
+END
+