Set rate at which hp Procurve Ports for sFLOW polling are sampled

| | TrackBacks (0)

# Set rate of hp Procurve Ports for sFLOW polling
# Script will query the user for starting port
# and ending port.
# requires snmpset be installed.
# reuse allowed with attribution
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Kenneth Hunt
# Version 0.03
# 4:30 PM 5/30/2008
echo "This script sets the interval for sflow packet sampling for a range of ports..."
read -p "What is the IP of your sFlow Switch? " sflowswitch ; echo "$sflowswitch"
read -p "What is the snmp community of your sFlow Switch? " snmpsflowswitch ; echo "$snmpsflowswitch"
read -p "Start With Which Port? " portstart ; echo "$portstart"
read -p "End With Which Port? " portend ; echo "$portend"
read -p "Sample every x Packet? " packetrate ; echo "$packetrate"

for (( i=$portstart ; i <= $portend; i++ ))
do /usr/bin/snmpset -v1 -c $snmpsflowswitch $sflowswitch 1.3.6.1.4.1.14706.1.1.5.1.4.11.1.3.6.1.2.1.2.2.1.1.$i.1 i: $packetrate
done

0 TrackBacks

Listed below are links to blogs that reference this entry: Set rate at which hp Procurve Ports for sFLOW polling are sampled.

TrackBack URL for this entry: http://kennethhunt.com/mt/mt-tb.cgi/1896

About this Entry

This page contains a single entry by klsh published on October 10, 2008 12:18 PM.

Set Range of hp Procurve Ports for sFLOW polling was the previous entry in this blog.

grep for ip address in text file is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.