| 1 |
: |
| 2 |
# Rmon History testing script |
| 3 |
# $Log$ |
| 4 |
# Revision 5.0 2002/04/20 07:30:01 hardaker |
| 5 |
# cvs file version number change |
| 6 |
# |
| 7 |
# Revision 1.1 2001/05/09 19:36:13 slif |
| 8 |
# Include Alex Rozin's Rmon. |
| 9 |
# |
| 10 |
# |
| 11 |
|
| 12 |
#Only parameter: number of interface (ifIndex) to be tested. |
| 13 |
#Default: 1 |
| 14 |
|
| 15 |
TSTIF=1 |
| 16 |
COMPAR="-m ALL localhost public" |
| 17 |
|
| 18 |
if [ "X"${1} = "X" ] ; then |
| 19 |
echo got default parameter : $TSTIF |
| 20 |
else |
| 21 |
TSTIF=$1 |
| 22 |
fi |
| 23 |
|
| 24 |
echo interface ifIndex.$TSTIF will be tested |
| 25 |
|
| 26 |
echo " " |
| 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 |
| 31 |
|
| 32 |
snmpwalk $COMPAR historyControlTable |
| 33 |
echo " " |
| 34 |
echo 2. validate it |
| 35 |
snmpset $COMPAR historyControlStatus.4 i 1 |
| 36 |
snmpwalk $COMPAR historyControlTable |
| 37 |
echo "Sleep 3, take it chance to get something" |
| 38 |
sleep 3 |
| 39 |
snmpwalk $COMPAR etherHistoryTable |
| 40 |
echo "Sleep 6, take it chance to advance" |
| 41 |
sleep 6 |
| 42 |
snmpwalk $COMPAR etherHistoryTable |
| 43 |
|
| 44 |
|
| 45 |
echo " " |
| 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" |
| 49 |
sleep 9 |
| 50 |
snmpwalk $COMPAR etherHistoryTable |
| 51 |
|
| 52 |
echo " " |
| 53 |
echo 4. invalidate it |
| 54 |
snmpset $COMPAR historyControlStatus.4 i 4 |
| 55 |
snmpwalk $COMPAR history |
| 56 |
|
| 57 |
|
| 58 |
echo " " |
| 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" |
| 67 |
sleep 12 |
| 68 |
snmpwalk $COMPAR etherHistoryTable |
| 69 |
|
| 70 |
echo " " |
| 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" |
| 75 |
sleep 61 |
| 76 |
snmptable $COMPAR historyControlTable |
| 77 |
|
| 78 |
echo " " |
| 79 |
echo 7. clean everything |
| 80 |
snmpset $COMPAR historyControlStatus.2 i 4 |
| 81 |
snmpset $COMPAR historyControlStatus.4 i 4 |
| 82 |
snmpwalk $COMPAR history |
| 83 |
|
| 84 |
|
| 85 |
echo " " |
| 86 |
echo "Goodbye, I'm a gonner" |
| 87 |
echo " " |
| 88 |
|