# BRCM_VERSION=3
[bcm963xx.git] / userapps / opensource / net-snmp / agent / mibgroup / Rmon / test_hist.sh
1 :
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
6 #
7 # Revision 5.0  2002/04/20 07:30:01  hardaker
8 # cvs file version number change
9 #
10 # Revision 1.1  2001/05/09 19:36:13  slif
11 # Include Alex Rozin's Rmon.
12 #
13 #
14
15 #Only parameter: number of interface (ifIndex) to be tested.
16 #Default: 1
17
18 TSTIF=1
19 COMPAR="-m ALL localhost public"
20
21 if [ "X"${1} = "X" ] ; then
22     echo got default parameter : $TSTIF
23 else
24     TSTIF=$1
25 fi
26
27 echo interface ifIndex.$TSTIF will be tested
28
29 echo " "
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
34
35 snmpwalk $COMPAR historyControlTable
36 echo " "
37 echo 2. validate it
38 snmpset $COMPAR historyControlStatus.4 i 1
39 snmpwalk $COMPAR historyControlTable
40 echo "Sleep 3, take it chance to get something"
41 sleep 3
42 snmpwalk $COMPAR etherHistoryTable
43 echo "Sleep 6, take it chance to advance"
44 sleep 6
45 snmpwalk $COMPAR etherHistoryTable
46
47
48 echo " "
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"
52 sleep 9
53 snmpwalk $COMPAR etherHistoryTable
54
55 echo " "
56 echo 4. invalidate it
57 snmpset $COMPAR historyControlStatus.4 i 4
58 snmpwalk $COMPAR history
59
60
61 echo " "
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"
70 sleep 12
71 snmpwalk $COMPAR etherHistoryTable
72
73 echo " "
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"
78 sleep 61
79 snmptable $COMPAR historyControlTable
80
81 echo " "
82 echo 7. clean everything
83 snmpset $COMPAR historyControlStatus.2 i 4
84 snmpset $COMPAR historyControlStatus.4 i 4
85 snmpwalk $COMPAR history
86
87
88 echo " "
89 echo "Goodbye, I'm a gonner"
90 echo " "
91