Set Range of hp Procurve Ports for sFLOW polling
# Set Range 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
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"
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.3.11.1.3.6.1.2.1.2.2.1.1.$i.1 i: 1
done
0 TrackBacks
Listed below are links to blogs that reference this entry: Set Range of hp Procurve Ports for sFLOW polling.
TrackBack URL for this entry: http://kennethhunt.com/mt/mt-tb.cgi/1895