Skip to ContentSkip to Footer
Start of content
- Community Home
- >
- Networking
- >
- Legacy
- >
- Switches, Hubs, Modems
- >
- SNMP Walk Script Help
Switches, Hubs, and Modems
turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
-
-
Categories
- Topics
- Hybrid IT with Cloud
- Mobile & IoT
- IT for Data & Analytics
- Transformation
- Strategy and Technology
- Products
- Cloud
- Integrated Systems
- Networking
- Servers and Operating Systems
- Services
- Storage
- Company
- Events
- Partner Solutions and Certifications
- Welcome
- Welcome
- Announcements
- Tips and Tricks
- Feedback
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- Converged Data Center Infrastructure
- Digital Transformation
- Grounded in the Cloud
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- Networking
- OEM Solutions
- Servers: The Right Compute
- Telecom IQ
- Transforming IT
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Categories
-
Forums
-
Blogs
-
InformationEnglish
SNMP Walk Script Help
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-03-2004 03:55 AM
02-03-2004 03:55 AM
SNMP Walk Script Help
SNMP Walk Script Help
I'm trying to write a [simple] script and I need some help doing it. I am looking to track unused switch ports.
What I am trying to do is this:
1. snmpget sysUPtime
2. snmpwalk ifOperstatus |grep "down"
**use awk, get the ifIndex of the results from step 2, then do:
3. snmpget ifLastChange.
**This will give me the uptime which the last state transition on an interface took place.
4. DOWNTIME=(Step1 - Step3) / 8640000
Thanks for your help!
What I am trying to do is this:
1. snmpget
2. snmpwalk
**use awk, get the ifIndex of the results from step 2, then do:
3. snmpget
**This will give me the uptime which the last state transition on an interface took place.
4. DOWNTIME=(Step1 - Step3) / 8640000
Thanks for your help!
1 REPLY
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-25-2004 12:47 AM
02-25-2004 12:47 AM
Re: SNMP Walk Script Help
Re: SNMP Walk Script Help
This is tricky. I'm interested in this also, and the problems I ran into are:
1. A person leaves for vacation and, for 15 days, there will be no traffic on his/her port (ifInOctets and ifOutOctets will stay constant), and ifOperStatus is "down". If in the 10-th day I need a port in that switch - do I disconnect this port? It happened to me to disconnect TopMgmt and I've got kicked around when they returned :-)
2. When a switch restarts, it zeroes all counters, including sysUpTime and interface counters.
3. People may move from one network jack to another, leaving non-zero values of if??Octets on the old port.
4. Printers with powersave feature might appear "down".
I think than we have to think statistically. One can say, at any time, with a certain confidence level (0% to 100%) that there is a probability (0 to 1) a switch port is free, based on periodic reading and interpretation of SNMP port properties.
For example, if one port showed 0 bytes traffic variation (constant non-zero if??Octets value), and it was "down" for 50 consecutive days each time we sampled it, we can say with 100% confidence that this port has a probability of 1 of being free. The value of 50 days is based on the maximum vacation time of 35 working days (7 weeks = 49 calendar days).
But people might be gone for 60 or 90 days for some training abroad... so the criteria to decide if the port is truly free must be a compozite. We might have to wait 1/4 of a year to decide in this way that a port is 100% free.
Fluke's NetTool or LinkRunner might help to reduce this time: go to the switch, unplug the patch cable from a port with no light, plug it in NetTool and see if there is a NIC at the other end.
Interestin', huh?
1. A person leaves for vacation and, for 15 days, there will be no traffic on his/her port (ifInOctets and ifOutOctets will stay constant), and ifOperStatus is "down". If in the 10-th day I need a port in that switch - do I disconnect this port? It happened to me to disconnect TopMgmt and I've got kicked around when they returned :-)
2. When a switch restarts, it zeroes all counters, including sysUpTime and interface counters.
3. People may move from one network jack to another, leaving non-zero values of if??Octets on the old port.
4. Printers with powersave feature might appear "down".
I think than we have to think statistically. One can say, at any time, with a certain confidence level (0% to 100%) that there is a probability (0 to 1) a switch port is free, based on periodic reading and interpretation of SNMP port properties.
For example, if one port showed 0 bytes traffic variation (constant non-zero if??Octets value), and it was "down" for 50 consecutive days each time we sampled it, we can say with 100% confidence that this port has a probability of 1 of being free. The value of 50 days is based on the maximum vacation time of 35 working days (7 weeks = 49 calendar days).
But people might be gone for 60 or 90 days for some training abroad... so the criteria to decide if the port is truly free must be a compozite. We might have to wait 1/4 of a year to decide in this way that a port is 100% free.
Fluke's NetTool or LinkRunner might help to reduce this time: go to the switch, unplug the patch cable from a port with no light, plug it in NetTool and see if there is a NIC at the other end.
Interestin', huh?
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2018 Hewlett Packard Enterprise Development LP