2 # Rmon History testing script
3 # $Log: test_hist.sh,v $
4 # Revision 5.0 2002/04/20 07:30:01 hardaker
5 # cvs file version number change
7 # Revision 1.1 2001/05/09 19:36:13 slif
8 # Include Alex Rozin's Rmon.
12 #Only parameter: number of interface (ifIndex) to be tested.
16 COMPAR="-m ALL localhost public"
18 if [ "X"${1} = "X" ] ; then
19 echo got default parameter : $TSTIF
24 echo interface ifIndex.$TSTIF will be tested
27 echo 1. create control entry
28 snmpset $COMPAR historyControlBucketsRequested.4 i 4 historyControlInterval.4 i 3 \
29 historyControlDataSource.4 o interfaces.ifTable.ifEntry.ifIndex.$TSTIF \
30 historyControlStatus.4 i 2
32 snmpwalk $COMPAR historyControlTable
35 snmpset $COMPAR historyControlStatus.4 i 1
36 snmpwalk $COMPAR historyControlTable
37 echo "Sleep 3, take it chance to get something"
39 snmpwalk $COMPAR etherHistoryTable
40 echo "Sleep 6, take it chance to advance"
42 snmpwalk $COMPAR etherHistoryTable
46 echo 3. change requested number of buckets
47 snmpset $COMPAR historyControlBucketsRequested.4 i 2
48 echo "Sleep 9, take it chance to get something"
50 snmpwalk $COMPAR etherHistoryTable
54 snmpset $COMPAR historyControlStatus.4 i 4
55 snmpwalk $COMPAR history
59 echo 5. create and validate 2 control entries
60 snmpset $COMPAR historyControlBucketsRequested.4 i 3 historyControlInterval.4 i 2 \
61 historyControlDataSource.4 o interfaces.ifTable.ifEntry.ifIndex.$TSTIF \
62 historyControlStatus.4 i 1
63 snmpset $COMPAR historyControlBucketsRequested.2 i 2 historyControlInterval.2 i 4 \
64 historyControlStatus.2 i 1
65 snmptable $COMPAR historyControlTable
66 echo "Sleep 12, take them chance to get something"
68 snmpwalk $COMPAR etherHistoryTable
71 echo 6. create entry and let it to be aged
72 snmpset $COMPAR historyControlStatus.3 i 2
73 snmptable $COMPAR historyControlTable
74 echo "Sleep 61, take it chance to be aged"
76 snmptable $COMPAR historyControlTable
79 echo 7. clean everything
80 snmpset $COMPAR historyControlStatus.2 i 4
81 snmpset $COMPAR historyControlStatus.4 i 4
82 snmpwalk $COMPAR history
86 echo "Goodbye, I'm a gonner"