Problem
Is the SNMP Host Resources MIB implemented in SCO OpenServer 5?
Solution
The IETF RFC1514 defines a Host Resources MIB for use with managing host systems with SNMP. By default, this is not enabled in SCO OpenServer 5. The following example details how to activate it.
First, log in to the system as the "root" user.
(1) Associate the MIB system names with their numeric object identifier/ASN notation:
# cd /etc/sysadm.d
# post_mosy -i hostmib.defs -o hostmib.dfn(2) Run "mkdev hostmib" (which calls "/etc/init.d/hostmib"):
# mkdev hostmibSNMP Host Resources MIB Initialization1. Install Host Resources MIB 2. Remove Host Resources MIB
Select an option or enter q to quit: Starting Host Resources MIB peer Loading Host Resources MIB..........done
(3) Restart the system networking by fully rebooting ("/etc/rc2.d/ S89hostmib" stops/starts the hostmib), or stop/start the "/etc/snmpd" daemon by sending a "-9" kill signal to the process, or force it to to reread its configuration files with a "-1" kill, for example:
# ps -ef |grep snmpd
root 1875 1 0 Mar-15 ? 00:00:03 /etc/snmpd
# kill -1 1875The shipping "/etc/snmpd.peers" file contains an entry for the "hostmib" as:
"hostmib" 1.3.6.1.4.1.32.99.1 "aintNoThing"This is incorrect. It will function, but it should be:
"hostmib" 1.3.6.1.2.1.25 "aintNoThing"Edit the "/etc/snmpd.peers" file to correct it.
You can check if the hostmib is set up and running with:
# ps -ef |grep smux
root 628 1 0 09:33:36 ? 00:00:01
/etc/smuxtcl /etc/sysadm.d/hostmib.tclYou can also check the state of SNMP with:
# snmpstat -s <yourhostname>(4) The "getone" or "getmany" commands should now be able to obtain the system MIB information, for example:
# getmany -f /etc/sysadm.d/hostmib.dfn localhost public
hrSystemName: hrSystemUptime.0
Value: 118356496Name: hrSystemDate.0
Value: 07 d0 03 0d 09 06 17 00 2d 00 00etc.
etc.You can also use the OID number as set in the .dfn file above:
# getmany -f /etc/sysadm.d/hostmib.dfn localhost public
1.3.6.1.2.1.25.1You can also pick out one particular value using "getone" in various forms:
# getone -f /etc/sysadm.d/hostmib.dfn localhost public
hrSystemProcesses.0
# getone -f /etc/sysadm.d/hostmib.dfn localhost public
mib-2.25.1.6.0
# getone -f /etc/sysadm.d/hostmib.dfn localhost public
1.3.6.1.2.1.25.1.6.0 See also
Manual pages: post_mosy(ADMN), getmany(ADMN), getone(ADMN),
snmpstat(ADMN).