首页 技术 正文
技术 2022年11月18日
0 收藏 927 点赞 3,218 浏览 814 个字

install

yum install python-pysnmp

yum install python-pyasn1

or

pip install pysnmp

pip install pyasn1

document

http://ports.gnu-darwin.org/net-mgmt/py-snmp4/work/pysnmp-4.1.7a/docs/pysnmp-tutorial.html

https://github.com/mfs/snmp-switch/blob/master/snmp-switch

https://github.com/oriordan/pysnmp_mibs

FAQ

cmdgen.MibVariable(‘SNMPv2-MIB’, ‘sysName’, 0)

AttributeError: ‘module’ object has no attribute ‘MibVariable’

python-pysnmp版本过低,4.2.3之后版本。

针对普通网络设备的端口,MIB的相关定义是Interface组,主要管理如下信息:
ifIndex 端口索引号
ifDescr 端口描述
ifType 端口类型
ifMtu 最大传输包字节数
ifSpeed 端口速度
ifPhysAddress 物理地址
ifOperStatus 操作状态
ifLastChange 上次状态更新时间*ifInOctets 输入字节数
*ifInUcastPkts 输入非广播包数
*ifInNUcastPkts 输入广播包数
*ifInDiscards 输入包丢弃数
*ifInErrors 输入包错误数
*ifInUnknownProtos 输入未知协议包数
*ifOutOctets 输出字节数
*ifOutUcastPkts 输出非广播包数
*ifOutNUcastPkts 输出广播包数
*ifOutDiscards 输出包丢弃数
*ifOutErrors 输出包错误数
ifOutQLen 输出队长
# *号标识的是与网络流量有关的信息。
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,492
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,907
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,740
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,493
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,132
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,295