2 # Rmon History testing script
3 # $Log: test_hist.sh,v $
4 # Revision 1.1.1.1 2005/04/29 01:45:11 echo
5 # Project for BCMDT_3.0
7 # Revision 5.0 2002/04/20 07:30:01 hardaker
8 # cvs file version number change
10 # Revision 1.1 2001/05/09 19:36:13 slif
11 # Include Alex Rozin's Rmon.
15 #Only parameter: number of interface (ifIndex) to be tested.
19 COMPAR="-m ALL localhost public"
21 if [ "X"${1} = "X" ] ; then
22 echo got default parameter : $TSTIF
27 echo interface ifIndex.$TSTIF will be tested
30 echo 1. create control entry
31 snmpset $COMPAR historyControlBucketsRequested.4 i 4 historyControlInterval.4 i 3 \
32 historyControlDataSource.4 o interfaces.ifTable.ifEntry.ifIndex.$TSTIF \
33 historyControlStatus.4 i 2
35 snmpwalk $COMPAR historyControlTable
38 snmpset $COMPAR historyControlStatus.4 i 1
39 snmpwalk $COMPAR historyControlTable
40 echo "Sleep 3, take it chance to get something"
42 snmpwalk $COMPAR etherHistoryTable
43 echo "Sleep 6, take it chance to advance"
45 snmpwalk $COMPAR etherHistoryTable
49 echo 3. change requested number of buckets
50 snmpset $COMPAR historyControlBucketsRequested.4 i 2
51 echo "Sleep 9, take it chance to get something"
53 snmpwalk $COMPAR etherHistoryTable
57 snmpset $COMPAR historyControlStatus.4 i 4
58 snmpwalk $COMPAR history
62 echo 5. create and validate 2 control entries
63 snmpset $COMPAR historyControlBucketsRequested.4 i 3 historyControlInterval.4 i 2 \
64 historyControlDataSource.4 o interfaces.ifTable.ifEntry.ifIndex.$TSTIF \
65 historyControlStatus.4 i 1
66 snmpset $COMPAR historyControlBucketsRequested.2 i 2 historyControlInterval.2 i 4 \
67 historyControlStatus.2 i 1
68 snmptable $COMPAR historyControlTable
69 echo "Sleep 12, take them chance to get something"
71 snmpwalk $COMPAR etherHistoryTable
74 echo 6. create entry and let it to be aged
75 snmpset $COMPAR historyControlStatus.3 i 2
76 snmptable $COMPAR historyControlTable
77 echo "Sleep 61, take it chance to be aged"
79 snmptable $COMPAR historyControlTable
82 echo 7. clean everything
83 snmpset $COMPAR historyControlStatus.2 i 4
84 snmpset $COMPAR historyControlStatus.4 i 4
85 snmpwalk $COMPAR history
89 echo "Goodbye, I'm a gonner"