Commit ebc11c12 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/snmpd: remove README file

README file was outdated. Additionally, part of this information is included
in the wrs-user-manual.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent b0fb8af6
The initial version of wrsScalar.c and wrsScalar.h is generated by running
export BUILD_DIR="$WRS_OUTPUT_DIR/build/buildroot-2011.11/output/build"
export MIBDIRS=$BUILD_DIR/netsnmp-5.6.1.1/mibs
And then this "intuitive" command:
export MIBS=./WR-SWITCH-MIB.txt
$BUILD_DIR/netsnmp-5.6.1.1/local/mib2c \
-I $BUILD_DIR/netsnmp-5.6.1.1/local \
-c mib2c.scalar.conf \
wrsScalar
Clearly, if you rename the item, the code must be completely rewritten
(and I already did it once).
Pstats code, on the other hand, is based on what ifTable does in the
real snmpd. i.e., no autogeneration was used.
This is one option I tried, but the result was too complex:
export MIBS=./WR-SWITCH-MIB.txt
$BUILD_DIR/netsnmp-5.6.1.1/local/mib2c \
-I $BUILD_DIR/netsnmp-5.6.1.1/local \
-I $BUILD_DIR/netsnmp-5.6.1.1/local/mib2c-conf.d \
-c mib2c.mfd.conf \
pstatsTable
This one spits out a single file, but again too complex for me:
export MIBS=./WR-SWITCH-MIB.txt
$BUILD_DIR/netsnmp-5.6.1.1/local/mib2c \
-I $BUILD_DIR/netsnmp-5.6.1.1/local \
-I $BUILD_DIR/netsnmp-5.6.1.1/local/mib2c-conf.d \
-c mib2c.raw-table.conf \
pstatsTable
Using "mib2c.create-dataset.conf" is even worse, becahse the dataset
is static and hidden in some obscure place, I can't change it after
creation.
With the current code base, I properly get the counters:
tornado% snmpwalk -c public -v 2c wrs SNMPv2-SMI::enterprises.96.100 | wc -l
743
The numeric OID for WRS is:
.1.3.6.1.4.1.96.100
The OID for counters is:
.1.3.6.1.4.1.96.100.2.1
Then, column 1 is the counter names, and colomn N+2 is the counters for
port wrN (0..17). Column M+1 is for port M as written on the device (1..18).
Example: get counter 18 (line 19):
snmpwalk -On -c public -v 2c wrs SNMPv2-SMI::enterprises.96.100.2.1 | \
grep '2\.1\..*\.19 ='
.1.3.6.1.4.1.96.100.2.1.1.19 = STRING: "TX Frames"
.1.3.6.1.4.1.96.100.2.1.2.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.3.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.4.19 = Counter32: 0
.1.3.6.1.4.1.96.100.2.1.5.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.6.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.7.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.8.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.9.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.10.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.11.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.12.19 = Counter32: 1057
.1.3.6.1.4.1.96.100.2.1.13.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.14.19 = Counter32: 0
.1.3.6.1.4.1.96.100.2.1.15.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.16.19 = Counter32: 1025
.1.3.6.1.4.1.96.100.2.1.17.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.18.19 = Counter32: 38
.1.3.6.1.4.1.96.100.2.1.19.19 = Counter32: 38
You can get a symbolic readout by forcing the tool to access the
local WR-SWITCH-MIB.txt. So we can get all counters for port WR14 like
this:
snmpwalk -m $WR_SWITCH_SW/userspace/snmpd/WR-SWITCH-MIB.txt \
-c public -v 2c wrs 1.3.6.1.4.1.96.100.2 | \
grep WR14
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment