snmpwalk 命令

SNMP protocol provides useful features to monitor and configure network and server systems remotely. Monitoring features are much popular than configuration. snmpwalk is a function provided by SNMP protocol to get metrics of remote system in bulk.

SNMP协议提供了有用的功能,可以远程监视和配置网络和服务器系统。 监视功能比配置功能流行得多。 snmpwalk是SNMP协议提供的一项功能,用于批量获取远程系统的指标。

获取所有OIDS (Get All OIDS)

We will first look the simplest usage of the snmpwalk command. We just provide minimum options to the snmpwalk. We will provide following options as minimum

我们首先来看一下snmpwalk命令的最简单用法。 我们仅提供snmpwalk最少选项。 我们将至少提供以下选项

  • `-v 2c` version information 2 community`-v 2c`版本信息2社区
  • `-c`the public or private secret-c公共或私人秘密
  • `IP ADDRESS`IP地址
$ snmpwalk -v 2c -c public localhost

Get All OIDS
获取所有OIDS

获取特定的OIDS (Get Specific OIDS)

In previous example we have listed all existing and configured OIDs. But this is not useful for all cases. We may need to filter and specify only OIDS we need. We will add to the end of the command the OIDs we want to get. In this example we only want OID of contact information.

在前面的示例中,我们列出了所有现有的和配置的OID。 但这并不是对所有情况都有用。 我们可能只需要过滤和指定我们需要的OIDS。 我们将在命令末尾添加我们要获取的OID。 在此示例中,我们仅需要联系信息的OID。

$ snmpwalk -v 2c -c public localhost iso.3.6.1.2.1.1.6.0

Get Specific OIDS
获取特定的OIDS

为外部MIB指定MIB库路径 (Specify MIB Library Path For External MIBs)

Normally Linux provide a lot of default MIBs but in some cases the remote system vendor may provide 3rd party MIBs. We can use these MIBs in order to get OIDs of remote system. We will specify the MIBs location with -M option.

通常,Linux提供许多默认的MIB,但在某些情况下,远程系统供应商可能会提供第三方MIB。 我们可以使用这些MIB来获取远程系统的OID。 我们将使用-M选项指定MIB的位置。

$ snmpwalk -v 2c -c public -M /root/ismail/ciscoMIB localhost iso.3.6.1.2.1.1.6.0

更改默认超时或设置新超时 (Change Default Timeout or Set New Timeout)

While running snmpwalk there is default timeout where the command will wait for a response from remote systems. We can change this default timeout value and set whatever we want the -t option by providing the value of timeout. In this example we will set timeout as 10 seconds.

在运行snmpwalk存在默认超时,该命令将等待远程系统的响应。 我们可以更改此默认超时值,并通过提供超时值来设置-t选项。 在此示例中,我们将超时设置为10秒。

$ snmpwalk -t 10 -v 2c -c public -M /root/ismail/ciscoMIB localhost iso.3.6.1.2.1.1.6.0

设置默认重试计数 (Set Default Retry Count)

If there are network related problem and packet loss we may require to retry snmpwalk command. This will resend request after specified timout value. We will use -r option in order to set retry count. In this example we will retry 1 time. So the total timeout for single host will be 20 seconds .

如果存在与网络相关的问题和数据包丢失,我们可能需要重试snmpwalk命令。 指定的超时值后,它将重新发送请求。 我们将使用-r选项来设置重试计数。 在此示例中,我们将重试1次。 因此,单个主机的总超时将为20秒。

$ snmpwalk -r 1 -t 10 -v 2c -c public -M /root/ismail/ciscoMIB localhost iso.3.6.1.2.1.1.6.0
.u4ad075197fc929f2b0c409aa69b78cef , .u4ad075197fc929f2b0c409aa69b78cef .postImageUrl , .u4ad075197fc929f2b0c409aa69b78cef .centered-text-area { min-height: 80px; position: relative; } .u4ad075197fc929f2b0c409aa69b78cef , .u4ad075197fc929f2b0c409aa69b78cef:hover , .u4ad075197fc929f2b0c409aa69b78cef:visited , .u4ad075197fc929f2b0c409aa69b78cef:active { border:0!important; } .u4ad075197fc929f2b0c409aa69b78cef .clearfix:after { content: ""; display: table; clear: both; } .u4ad075197fc929f2b0c409aa69b78cef { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u4ad075197fc929f2b0c409aa69b78cef:active , .u4ad075197fc929f2b0c409aa69b78cef:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u4ad075197fc929f2b0c409aa69b78cef .centered-text-area { width: 100%; position: relative; } .u4ad075197fc929f2b0c409aa69b78cef .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u4ad075197fc929f2b0c409aa69b78cef .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u4ad075197fc929f2b0c409aa69b78cef .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u4ad075197fc929f2b0c409aa69b78cef:hover .ctaButton { background-color: #E67E22!important; } .u4ad075197fc929f2b0c409aa69b78cef .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u4ad075197fc929f2b0c409aa69b78cef .u4ad075197fc929f2b0c409aa69b78cef-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u4ad075197fc929f2b0c409aa69b78cef:after { content: ""; display: block; clear: both; }

LEARN MORE  Linux ps Command Tutorial

.u4ad075197fc929f2b0c409aa69b78cef , .u4ad075197fc929f2b0c409aa69b78cef .postImageUrl , .u4ad075197fc929f2b0c409aa69b78cef .centered-text-area { min-height: 80px; position: relative; } .u4ad075197fc929f2b0c409aa69b78cef , .u4ad075197fc929f2b0c409aa69b78cef:hover , .u4ad075197fc929f2b0c409aa69b78cef:visited , .u4ad075197fc929f2b0c409aa69b78cef:active { border:0!important; } .u4ad075197fc929f2b0c409aa69b78cef .clearfix:after { content: ""; display: table; clear: both; } .u4ad075197fc929f2b0c409aa69b78cef { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u4ad075197fc929f2b0c409aa69b78cef:active , .u4ad075197fc929f2b0c409aa69b78cef:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u4ad075197fc929f2b0c409aa69b78cef .centered-text-area { width: 100%; position: relative; } .u4ad075197fc929f2b0c409aa69b78cef .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u4ad075197fc929f2b0c409aa69b78cef .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u4ad075197fc929f2b0c409aa69b78cef .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u4ad075197fc929f2b0c409aa69b78cef:hover .ctaButton { background-color: #E67E22!important; } .u4ad075197fc929f2b0c409aa69b78cef .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u4ad075197fc929f2b0c409aa69b78cef .u4ad075197fc929f2b0c409aa69b78cef-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u4ad075197fc929f2b0c409aa69b78cef:after { content: ""; display: block; clear: both; }

了解更多Linux ps命令教程

翻译自: https://www.poftut.com/snmpwalk-command-line-examples/

snmpwalk 命令

snmpwalk 命令_Snmpwalk命令行示例相关推荐

  1. 浅显易懂 Makefile 入门 (08)— 默认 shell (/bin/sh)、命令回显、make参数(-n 只显示命令但不执行,-s 禁止所有回显)、单行命令、多行命令、并发执行

    1. shell 相关 1.1 默认 shell Makefile 所使用的命令是由 shell 命令行组成,他们是一条一条执行的. 多个命令之间要使用分号隔开,Makefile 中的任何命令都要以 ...

  2. linux bash命令_Linux命令-您应该知道的基本Bash命令行技巧

    linux bash命令 Linux has a ton of commands, but most people only use a fraction of them. Here are some ...

  3. R语言基本介绍 | 数据科学、Rstudio介绍、快捷键操作、R代码常见命令、数据类型、示例代码等等

    一.数据科学 数据科学:计算和统计技术的综合应用,用于解决一些真实世界中的问题. 计算:获得结果 统计:分析和建模 真实世界:机器学习.AI 数据科学Data Science = 统计+数据处理+机器 ...

  4. linux命令统计文件行数据库,wc命令--Linux统计文件行数

    语法:wc [选项] 文件- 说明:该命令统计给定文件中的字节数.字数.行数.如果没有给出文件名,则从标准输入读取.wc同时也给出所有指定文件的总统计数.字是由空格字符区分开的最大字符串. 该命令各选 ...

  5. linux ar指令,Linux ar命令介绍 和常用示例

    制作静态库要用到ar命令,命令格式: ar [-]{dmpqrtx}[abcfilNoPsSuvV] [membername] [count] archive files... {dmpqrtx}中的 ...

  6. bat脚本常用命令及亲测示例代码超详细讲解

    这篇文章主要介绍了bat脚本常用命令及亲测示例代码超详细讲解,在这里需要注意编辑bat文件请使用ANSI编码,不然容易出现中文乱码,需要的朋友可以参考下 目录一 1.语句注释 2.暂停 3.输出和换行 ...

  7. Linux mkfifo初学者命令教程(带示例)

    如果你甚至是一个温和的Linux命令行用户,你必须知道管道,这是一个允许进程进行通信的基本命令行功能. 然后有一个命名管道的概念(是的,有名字的管道,所以你可以用管道做更多的事情). 使用mkfifo ...

  8. Redis 笔记(13)— scan 和 keys 寻找特定前缀key 字段(命令格式、使用示例、定位大key)

    1. keys Redis 提供了一个简单暴力的指令 keys 用来列出所有满足特定正则字符串规则的 key. 127.0.0.1:6379> keys * (empty array) 127. ...

  9. linux sed命令 删除指定行

    sed命令常用到的两个选项: -i : 直接在文件上编辑 (edit files in place) -e[默认选项]:只在命令行输出,而文件不改变 (add the script to the co ...

  10. Shell:用sed命令删除特定行

    一.sed命令 Linux sed 命令是利用脚本来处理文本文件. sed 可依照脚本的指令来处理.编辑文本文件. 此处用-i参数实现 -i : 直接在文件上编辑 (edit files in pla ...

最新文章

  1. 机器学习笔记七:损失函数与风险函数
  2. git reset --hard xxxxxxx
  3. unity3d shader编程中GrabPass 在某些android手机上失效的解决方案
  4. linux C语言 socket编程教程(附两个例子)(socket教程)
  5. 金山称清理专家遭微软误杀:正积极协商解决
  6. 【Java】二十一点小游戏
  7. 订单编号的数据类型是什么_领域模型与代数数据类型(第三期)
  8. MySql单表的curd-02
  9. C++和Java函数传递数组参数比较
  10. vue 一直显示数据加载中的解决方案之一
  11. 【百度网盘】电脑版百度网盘二维码无法加载的问题
  12. 迅雷php源码,PHP生成迅雷、快车、旋风等软件的下载链接代码实例
  13. 学习笔记:多目标跟踪对车辆进行测速
  14. 遍历指定文件夹下的所有文件名
  15. 操作系统常用缩写总结
  16. linux 文件唯一标识符,详解Linux中获取全球唯一标示符UUID的方法
  17. 浅谈数据中心主备电并网运行方式
  18. 14.JavaScript循环while、for、dowhile、break、continue、跳转标签
  19. 计算机应用 高职教案,关于高职院校计算机应用论文
  20. python中一切内容都可以称为_创业基础答案黑龙江大学

热门文章

  1. 2021年危险化学品经营单位安全管理人员考试报名及危险化学品经营单位安全管理人员作业考试题库
  2. Hibernate下载地址
  3. pe制作linux硬盘的镜像文件_制作一个64M的U盘启动盘(mini linux + winpe +dos toolbox)
  4. 2月第4周网络安全报告:境内69.1万主机感染病毒
  5. 快解析:管家婆辉煌II TOP+异地访问解决方案
  6. 管家婆普及版安装问题
  7. Convert excel format exception.You can try specifying the ‘excelType‘ yourse-----EasyExcel导入
  8. 产品读书《交互设计沉思录》
  9. 网络编程——TCP编程及UDP编程
  10. ActiveReport报表模板库新增21张报表模板,加入报表导出功能!