linux notes – mrtg apc temperature

[root@mrtg ~]# snmpwalk -v 1 -c public 192.168.1.x
SNMPv2-MIB::sysDescr.0 = STRING: APC Web/SNMP Management Card (MB:v3.6.4 PF:v2.5.0 PN:apc_hw02_aos_250.bin AF1:v2.5.1 AN1:apc_hw02_sumx_251.bin MN:AP9619 HR:A10 SN: ZA0453000299 MD:12/28/2004) (Embedded PowerNet SNMP Agent SW v2.2 compatible)
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.318.1.3.2.15
SNMPv2-MIB::sysUpTime.0 = Timeticks: (73191) 0:12:11.91
SNMPv2-MIB::sysContact.0 = STRING: SYSMAN
SNMPv2-MIB::sysName.0 = STRING: APC for XX
SNMPv2-MIB::sysLocation.0 = STRING: RXXX
SNMPv2-MIB::sysServices.0 = INTEGER: 72
IF-MIB::ifNumber.0 = INTEGER: 1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifDescr.1 = STRING: lance
IF-MIB::ifType.1 = INTEGER: iso88023Csmacd(7)
IF-MIB::ifMtu.1 = INTEGER: 1500
IF-MIB::ifSpeed.1 = Gauge32: 100000000
IF-MIB::ifPhysAddress.1 = STRING: xx:xx:xx:xx:xx:xx
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00
IF-MIB::ifInOctets.1 = Counter32: 37399
IF-MIB::ifInUcastPkts.1 = Counter32: 90
IF-MIB::ifInNUcastPkts.1 = Counter32: 118
IF-MIB::ifInDiscards.1 = Counter32: 0
IF-MIB::ifInErrors.1 = Counter32: 0
IF-MIB::ifInUnknownProtos.1 = Counter32: 0
IF-MIB::ifOutOctets.1 = Counter32: 32369
IF-MIB::ifOutUcastPkts.1 = Counter32: 106
IF-MIB::ifOutNUcastPkts.1 = Counter32: 33
IF-MIB::ifOutDiscards.1 = Counter32: 0
IF-MIB::ifOutErrors.1 = Counter32: 0
IF-MIB::ifOutQLen.1 = Gauge32: 1
IF-MIB::ifSpecific.1 = OID: SNMPv2-SMI::zeroDotZero
RFC1213-MIB::atIfIndex.1.1.192.168.1.x = INTEGER: 1
RFC1213-MIB::atPhysAddress.1.1.192.168.1.x = Hex-STRING: XX XX XX XX XX XX
RFC1213-MIB::atNetAddress.1.1.192.168.1.x = Network Address: XX:XX:XX:XX
IP-MIB::ipForwarding.0 = INTEGER: 0
IP-MIB::ipDefaultTTL.0 = INTEGER: 64
IP-MIB::ipInReceives.0 = Counter32: 217
IP-MIB::ipInHdrErrors.0 = Counter32: 0
IP-MIB::ipInAddrErrors.0 = Counter32: 81
IP-MIB::ipForwDatagrams.0 = Counter32: 0
IP-MIB::ipInUnknownProtos.0 = Counter32: 0
IP-MIB::ipInDiscards.0 = Counter32: 0
IP-MIB::ipInDelivers.0 = Counter32: 142
IP-MIB::ipOutRequests.0 = Counter32: 146
IP-MIB::ipOutDiscards.0 = Counter32: 0
IP-MIB::ipOutNoRoutes.0 = Counter32: 0
IP-MIB::ipReasmTimeout.0 = INTEGER: 0
IP-MIB::ipReasmReqds.0 = Counter32: 0
IP-MIB::ipReasmOKs.0 = Counter32: 0
IP-MIB::ipReasmFails.0 = Counter32: 0
IP-MIB::ipFragOKs.0 = Counter32: 0
IP-MIB::ipFragFails.0 = Counter32: 0
IP-MIB::ipFragCreates.0 = Counter32: 0
IP-MIB::ipAdEntAddr.192.168.1.x = IpAddress: 192.168.1.x
IP-MIB::ipAdEntIfIndex.192.168.1.x = INTEGER: 1
IP-MIB::ipAdEntNetMask.192.168.1.x = IpAddress: 255.255.255.0
IP-MIB::ipAdEntBcastAddr.192.168.1.x = INTEGER: 1
IP-MIB::ipAdEntReasmMaxSize.192.168.1.x = INTEGER: 0
RFC1213-MIB::ipRouteDest.0.0.0.0 = IpAddress: 0.0.0.0
RFC1213-MIB::ipRouteIfIndex.0.0.0.0 = INTEGER: 1
truncating integer value to 32 bits
RFC1213-MIB::ipRouteMetric1.0.0.0.0 = INTEGER: 4294967295
truncating integer value to 32 bits
RFC1213-MIB::ipRouteMetric2.0.0.0.0 = INTEGER: 4294967295
truncating integer value to 32 bits
RFC1213-MIB::ipRouteMetric3.0.0.0.0 = INTEGER: 4294967295
truncating integer value to 32 bits
RFC1213-MIB::ipRouteMetric4.0.0.0.0 = INTEGER: 4294967295
RFC1213-MIB::ipRouteNextHop.0.0.0.0 = IpAddress: 192.168.1.x
RFC1213-MIB::ipRouteType.0.0.0.0 = INTEGER: other(1)
RFC1213-MIB::ipRouteProto.0.0.0.0 = INTEGER: local(2)
RFC1213-MIB::ipRouteMask.0.0.0.0 = IpAddress: 0.0.0.0
truncating integer value to 32 bits
RFC1213-MIB::ipRouteMetric5.0.0.0.0 = INTEGER: 4294967295
RFC1213-MIB::ipRouteInfo.0.0.0.0 = OID: SNMPv2-SMI::zeroDotZero
IP-MIB::ipNetToMediaIfIndex.1.192.168.1.x = INTEGER: 1
IP-MIB::ipNetToMediaPhysAddress.1.192.168.1.x = STRING: xx:xx:xx:xx:xx:xx
IP-MIB::ipNetToMediaNetAddress.1.192.168.1.x = IpAddress: 192.168.1.1
IP-MIB::ipNetToMediaType.1.192.168.1.x = INTEGER: dynamic(3)
IP-MIB::ipRoutingDiscards.0 = Counter32: 0
IP-MIB::icmpInMsgs.0 = Counter32: 2
IP-MIB::icmpInErrors.0 = Counter32: 0
IP-MIB::icmpInDestUnreachs.0 = Counter32: 0
IP-MIB::icmpInTimeExcds.0 = Counter32: 0
IP-MIB::icmpInParmProbs.0 = Counter32: 0
IP-MIB::icmpInSrcQuenchs.0 = Counter32: 0
IP-MIB::icmpInRedirects.0 = Counter32: 0
IP-MIB::icmpInEchos.0 = Counter32: 0
IP-MIB::icmpInEchoReps.0 = Counter32: 2
IP-MIB::icmpInTimestamps.0 = Counter32: 0
IP-MIB::icmpInTimestampReps.0 = Counter32: 0
IP-MIB::icmpInAddrMasks.0 = Counter32: 0
IP-MIB::icmpInAddrMaskReps.0 = Counter32: 0
IP-MIB::icmpOutMsgs.0 = Counter32: 2
IP-MIB::icmpOutErrors.0 = Counter32: 0
IP-MIB::icmpOutDestUnreachs.0 = Counter32: 0
IP-MIB::icmpOutTimeExcds.0 = Counter32: 0
IP-MIB::icmpOutParmProbs.0 = Counter32: 0
IP-MIB::icmpOutSrcQuenchs.0 = Counter32: 0
IP-MIB::icmpOutRedirects.0 = Counter32: 0
IP-MIB::icmpOutEchos.0 = Counter32: 2
IP-MIB::icmpOutEchoReps.0 = Counter32: 0
IP-MIB::icmpOutTimestamps.0 = Counter32: 0
IP-MIB::icmpOutTimestampReps.0 = Counter32: 0
IP-MIB::icmpOutAddrMasks.0 = Counter32: 0
IP-MIB::icmpOutAddrMaskReps.0 = Counter32: 0
TCP-MIB::tcpRtoAlgorithm.0 = INTEGER: vanj(4)
TCP-MIB::tcpRtoMin.0 = INTEGER: 100 milliseconds
TCP-MIB::tcpRtoMax.0 = INTEGER: 64000 milliseconds
TCP-MIB::tcpMaxConn.0 = INTEGER: 32
TCP-MIB::tcpActiveOpens.0 = Counter32: 0
TCP-MIB::tcpPassiveOpens.0 = Counter32: 6
TCP-MIB::tcpAttemptFails.0 = Counter32: 0
TCP-MIB::tcpEstabResets.0 = Counter32: 6
TCP-MIB::tcpCurrEstab.0 = Gauge32: 0
TCP-MIB::tcpInSegs.0 = Counter32: 46
TCP-MIB::tcpOutSegs.0 = Counter32: 16
TCP-MIB::tcpRetransSegs.0 = Counter32: 0
TCP-MIB::tcpConnState.0.0.0.0.5632.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.20480.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.47873.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnLocalAddress.0.0.0.0.5632.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnLocalAddress.0.0.0.0.20480.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnLocalAddress.0.0.0.0.47873.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnLocalPort.0.0.0.0.5632.0.0.0.0.0 = INTEGER: 22
TCP-MIB::tcpConnLocalPort.0.0.0.0.20480.0.0.0.0.0 = INTEGER: 80
TCP-MIB::tcpConnLocalPort.0.0.0.0.47873.0.0.0.0.0 = INTEGER: 443
TCP-MIB::tcpConnRemAddress.0.0.0.0.5632.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnRemAddress.0.0.0.0.20480.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnRemAddress.0.0.0.0.47873.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnRemPort.0.0.0.0.5632.0.0.0.0.0 = INTEGER: 0
TCP-MIB::tcpConnRemPort.0.0.0.0.20480.0.0.0.0.0 = INTEGER: 0
TCP-MIB::tcpConnRemPort.0.0.0.0.47873.0.0.0.0.0 = INTEGER: 0
TCP-MIB::tcpInErrs.0 = Counter32: 0
TCP-MIB::tcpOutRsts.0 = Counter32: 0
UDP-MIB::udpInDatagrams.0 = Counter32: 34
UDP-MIB::udpNoPorts.0 = Counter32: 0
UDP-MIB::udpInErrors.0 = Counter32: 150
UDP-MIB::udpOutDatagrams.0 = Counter32: 194
UDP-MIB::udpLocalAddress.0.0.0.0.386 = IpAddress: 0.0.0.0
UDP-MIB::udpLocalAddress.0.0.0.0.11176 = IpAddress: 0.0.0.0
UDP-MIB::udpLocalAddress.0.0.0.0.20944 = IpAddress: 0.0.0.0
UDP-MIB::udpLocalAddress.0.0.0.0.22224 = IpAddress: 0.0.0.0
UDP-MIB::udpLocalAddress.0.0.0.0.41216 = IpAddress: 0.0.0.0
UDP-MIB::udpLocalAddress.192.168.1.x.56870 = IpAddress: 192.168.1.x
UDP-MIB::udpLocalPort.0.0.0.0.386 = INTEGER: 33281
UDP-MIB::udpLocalPort.0.0.0.0.11176 = INTEGER: 43051
UDP-MIB::udpLocalPort.0.0.0.0.20944 = INTEGER: 53329
UDP-MIB::udpLocalPort.0.0.0.0.22224 = INTEGER: 53334
UDP-MIB::udpLocalPort.0.0.0.0.41216 = INTEGER: 161
UDP-MIB::udpLocalPort.192.168.1.x.56870 = INTEGER: 9950
SNMPv2-MIB::snmpInPkts.0 = Counter32: 233
SNMPv2-MIB::snmpOutPkts.0 = Counter32: 164
SNMPv2-MIB::snmpInBadVersions.0 = Counter32: 0
SNMPv2-MIB::snmpInBadCommunityNames.0 = Counter32: 0
SNMPv2-MIB::snmpInBadCommunityUses.0 = Counter32: 0
SNMPv2-MIB::snmpInASNParseErrs.0 = Counter32: 0
SNMPv2-MIB::snmpInTooBigs.0 = Counter32: 0
SNMPv2-MIB::snmpInNoSuchNames.0 = Counter32: 0
SNMPv2-MIB::snmpInBadValues.0 = Counter32: 0
SNMPv2-MIB::snmpInReadOnlys.0 = Counter32: 0
SNMPv2-MIB::snmpInGenErrs.0 = Counter32: 0
SNMPv2-MIB::snmpInTotalReqVars.0 = Counter32: 228
SNMPv2-MIB::snmpInTotalSetVars.0 = Counter32: 0
SNMPv2-MIB::snmpInGetRequests.0 = Counter32: 18
SNMPv2-MIB::snmpInGetNexts.0 = Counter32: 160
SNMPv2-MIB::snmpInSetRequests.0 = Counter32: 0
SNMPv2-MIB::snmpInGetResponses.0 = Counter32: 0
SNMPv2-MIB::snmpInTraps.0 = Counter32: 0
SNMPv2-MIB::snmpOutTooBigs.0 = Counter32: 0
SNMPv2-MIB::snmpOutNoSuchNames.0 = Counter32: 0
SNMPv2-MIB::snmpOutBadValues.0 = Counter32: 0
SNMPv2-MIB::snmpOutGenErrs.0 = Counter32: 0
SNMPv2-MIB::snmpOutGetRequests.0 = Counter32: 0
SNMPv2-MIB::snmpOutGetNexts.0 = Counter32: 0
SNMPv2-MIB::snmpOutSetRequests.0 = Counter32: 0
SNMPv2-MIB::snmpOutGetResponses.0 = Counter32: 188
SNMPv2-MIB::snmpOutTraps.0 = Counter32: 0
SNMPv2-MIB::snmpEnableAuthenTraps.0 = INTEGER: 0

[root@mrtg ~]# snmpwalk -v 1 -c public 192.168.1.x 1.3.6.1.4.1.318.1.1.1.2.2.2.0
SNMPv2-SMI::enterprises.318.1.1.1.2.2.2.0 = Gauge32: 24

[root@mrtg ~]# snmpwalk -v 1 -c public 192.168.1.x 1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1
SNMPv2-SMI::enterprises.318.1.1.10.2.3.2.1.4.1 = INTEGER: 24

[root@mrtg ~]# cfgmaker –host-template=host-apc.template –global “WorkDir: /var/www/mrtg” –global “RunAsDaemon: Yes” –output=/etc/mrtg/apc1.cfg public@apc1
–base: Get Device Info on public@apc1:
–base: Vendor Id:
–base: Populating confcache
–snpo: confcache public@apc1: Descr lance –> 1
–snpo: confcache public@apc1: Type 7 –> 1
–snpo: confcache public@apc1: Ip 192.168.1.xx –> 1
–snpo: confcache public@apc1: Eth xx-xx-xx-xx-xx-xx –> 1
–base: Get Interface Info
–base: Walking ifIndex
–base: Walking ifType
–base: Walking ifAdminStatus
–base: Walking ifOperStatus
–base: Walking ifSpeed
–base: Writing /etc/mrtg/apc1_w.cfg
[root@mrtg ~]# env LANG=C /usr/bin/mrtg /etc/mrtg/apc1.cfg
Daemonizing MRTG …
[root@mrtg ~]# indexmaker –output=/home/web/mrtg/apc1.html /etc/mrtg/apc1_w.cfg