Skip to content
Snippets Groups Projects
wrs-user-manual.in 82.3 KiB
Newer Older
WR-SWITCH-MIB::wrsPstatsHCTXFrames.2 = Counter64: 543
[...]
WR-SWITCH-MIB::wrsPstatsHCRXFrames.1 = Counter64: 255
WR-SWITCH-MIB::wrsPstatsHCRXFrames.2 = Counter64: 544

Another example is to print all objects exported by switch.
@smallexample
snmpwalk -c public -v 2c wrs -m all \
        -M ${WRS_OUTPUT_DIR}/build/buildroot-2016.02/output/build/netsnmp-5.7.3/mibs/\
        :${WR_SWITCH_SW}/userspace/snmpd/ \
        1
@end smallexample

@c ==========================================================================
@node show-pstats
@section show-pstats

To visualize all port statistics in a single window, this package
includes the simple tool @t{userspace/snmpd/show-pstats}.  It is
a Tk script, so you need to install @t{tk8.5} or any other version.

The script receives one or more host names (or IP addresses) on the command
line. They must refer to a switch (or switches) or the program fails like this:

@smallexample
   laptopo% ./show-pstats morgana
   Error in snmpwalk for host morgana
   No log handling enabled - using stderr logging
   .1.3.6.1.4.1.96.100.2.1.: Unknown Object Identifier (Sub-id not found: enterprises -> )
@end smallexample

If everything goes well, you'll get a window like the following one:

@center @image{show-pstats, 10cm,, show-pstats}

Command @t{snmptable} can also be used to get simillar results:

@smallexample
snmptable -Cw 80 -c public -v 2c 192.168.1.10 -m all \
-M $WRS_OUTPUT_DIR/build/buildroot-2016.02/output/build/netsnmp-5.7.3/mibs/\
:userspace/snmpd/ WR-SWITCH-MIB::wrsPstatsHCTable
@end smallexample
Output is in text form and looks like:
@smallexample
SNMP table: WR-SWITCH-MIB::wrsPstatsHCTable

 wrsPstatsHCPortName wrsPstatsHCTXUnderrun wrsPstatsHCRXOverrun
                wri1                     0                    0
                wri2                     0                    0
                wri3                     0                    0
                wri4                     0                    0
                wri5                     0                    0
                wri6                     0                    0
                wri7                     0                    0
                wri8                     0                    0
                wri9                     0                    0
               wri10                     0                    0
               wri11                     0                    0
               wri12                     0                    0
               wri13                     0                    0
               wri14                     0                    0
               wri15                     0                    0
               wri16                     0                    0
               wri17                     0                    0
               wri18                     0                    0

SNMP table WR-SWITCH-MIB::wrsPstatsHCTable, part 2

 wrsPstatsHCRXInvalidCode wrsPstatsHCRXSyncLost wrsPstatsHCRXPauseFrames
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0
                        0                     0                        0

(...)
@end smallexample
Unfortunately output due to the number of counters is very wide. Number of 
characters per line can be limited by switch @t{Cw}, in example was set to 80.

@c ##########################################################################
@node Bugs and Troubleshooting
@appendix Bugs and Troubleshooting

Even if the package is already released and used in production,
some details can be
suboptimal, while some procedures may be tricky and need more explanation.

We are collecting all those issues in the @i{wiki} page of the
project, to avoid frequent updates to this manual to just collect
those details.  So please visit
@url{www.ohwr.org/projects/wr-switch-sw/wiki/Bugs} and
@url{www.ohwr.org/projects/wr-switch-sw/wiki/Troubleshooting}
if you have any problem with this package, but feel free to reach us
on the mailing list if you don't find help there.

@c ##########################################################################
@bye


@c  LocalWords:  gnudd titlepage iftex texinfo CERN timestamping smallexample
@c  LocalWords:  LocalWords ietf timestamp misc timestamps ttstamp onestamp
@c  LocalWords:  Tomasz Wlostowski buildroot distclean defconfig wrswitch REPO
@c  LocalWords:  menuconfig config dataflash whiterabbit stdout stderr svnsync
@c  LocalWords:  filesystem diff ohwr http mkdir linux rubini itemize PTPd VHDL
@c  LocalWords:  noposix ptpd userspace libwr DataFlash NAND barebox FPGA
@c  LocalWords:  Atmel Kconfig minicom tinyserial ttyUSB bootloader logfile
Alessandro Rubini's avatar
Alessandro Rubini committed
@c  LocalWords:  nandflash gateware TFTP init wrboot wiki LEDs DHCP
@c  LocalWords:  SNMP hwinfo pathname CONFIG filename Busybox Barebox
@c  LocalWords:  rsyslog PARAMS subdirectory dhcp nand VLAN vlans
@c  LocalWords:  auxclk bitstream