java snmp walk,SNMPWALK 用法详解

java snmp walk,SNMPWALK 用法详解(1)Net-SNMPSNMPWALK(1)NAMEsnmpwalk-communicateswithanetworkentityusingSNMPGETNEXTrequests.SYNOPSISsnmpwalk[APPL…

大家好,又见面了,我是你们的朋友全栈君。

(1)                                       Net-SNMP                                       SNMPWALK(1)

NAME

snmpwalk – communicates with a network entity using SNMP GETNEXT requests.

SYNOPSIS

snmpwalk [APPLICATION OPTIONS] [COMMON OPTIONS] [OID]

DESCRIPTION

snmpwalk is an SNMP application that uses SNMP GETNEXT requests to query a network entity for a tree

of information.

An object identifier (OID) may be given on the command line. This OID specifies which portion of the

object identifier space will be searched using GETNEXT requests. All variables in the subtree below

the given OID are queried and their values presented to the user. Each variable name is given in the

format specified in variables(5).

If no OID argument is present, snmpwalk will search MIB-2. If the network entity has an error pro-

cessing the request packet, an error packet will be returned and a message will be shown, helping to

pinpoint why the request was malformed.

If the tree search causes attempts to search beyond the end of the MIB, the message “End of MIB” will

be displayed.

OPTIONS

-Cc     Do not check whether the returned OIDs are increasing. Some agents (LaserJets are an exam-

ple) return OIDs out of order, but can complete the walk anyway. Other agents return OIDs

that are out of order and can cause snmpwalk to loop indefinitely.   By default, snmpwalk

tries to detect this behavior and warns you when it hits an agent acting illegally. Use -Cc

to turn off this behaviour.

-Ci     Include the given OID in the search range. Normally snmpwalk uses GETNEXT requests starting

with the OID you specified and returns all results in the MIB tree after that OID. Some-

times, you may wish to include the OID specified on the command line in the printed results

if it is a valid OID in the tree itself. This option lets you do this.

-Cp     Upon completion of the walk, print the number of variables found.

-Ct     Upon completion of the walk, print the total wall-clock time it took to collect the data (in

seconds). Note that the timer is started just before the beginning of the data request

series and stopped just after it finishes. Most importantly, this means that it does not

include snmp library initialization, shutdown, argument processing, and any other overhead.

In addition to these options, snmpwalk takes the common options described in the snmpcmd(1) manual

page.

EXAMPLE

The command:

snmpwalk -Os -c public -v 1 zeus system

will retrieve all of the variables under system:

sysDescr.0 = STRING: “SunOS zeus.net.cmu.edu 4.1.3_U1 1 sun4m”

sysObjectID.0 = OID: enterprises.hp.nm.hpsystem.10.1.1

sysUpTime.0 = Timeticks: (155274552) 17 days, 23:19:05

sysContact.0 = STRING: “”

sysName.0 = STRING: “zeus.net.cmu.edu”

sysLocation.0 = STRING: “”

sysServices.0 = INTEGER: 72

SEE ALSO

snmpcmd(1), snmpbulkwalk(1), variables(5).

4th Berkeley Distribution                        08 Feb 2002                                     SNMPWALK(1)

—————————–

from Redhat Linux AS4 “man snmpwalk”

snmpwalk语法:

snmpwalk 交换机或路由器IP地址 -c SNMP读密码 -v 1或2(代表SNMP版本) OID(对象标示符)

用法举例:

1、snmpwalk -c public -v 1 -m ALL 192.168.30.49 .1.3.6.1.2.1.25.1    得到取得windows端的系统进程用户数等

2、snmpwalk -c public -v 1 -m ALL 192.168.30.49 .1.3.6.1.2.1.25.2.2 取得系统总内存

3、snmpwalk -c public -v 1 -m ALL 192.168.30.49 hrSystemNumUsers

4、snmpwalk -c public -v 1 -m ALL 192.168.30.49 .1.3.6.1.2.1.4.20    取得IP信息

5、snmpwalk -v 2c -c public 192.168.30.49 system   查看系统信息

6、snmpwalk -v 1 192.168.30.49 -c public ifDescr

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/147787.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • pycharm安装配置环境_如何在pycharm中配置anaconda

    pycharm安装配置环境_如何在pycharm中配置anacondapycharm安装及配置(anaconda)pycharm的下载与安装jetbrains官网开发者工具找到pycharm下载专业版等待下载完成anaconda的下载与安装anaconda官网 滑到页面最下方选择合适的版本,开始下载双击开始安装这里选择所有用户或者仅自己都行这里勾选上添加环境变量,就不用自己配置了查看开始菜单安装成功安装配置pycharm双击以后再重启,直接finish启动pycharm这里需要进行一下激活,我这里就用

    2022年8月29日
    1
  • 软件著作权说明书模板_软件设计方案怎么写

    软件著作权说明书模板_软件设计方案怎么写1.引言1.1编写目的1.2项目背景1.2项目概要总体要求2.1系统功能概述2.2系统功能要求软件开发3.1软件需求分析3.2软件的概要设计3.2.1软件概要设计说明3.2.3基本设计概念和处理流程3.3软件的详细设计3.3.1系统结构3.3.2模块设计说明3.3.3爬虫模块3.3.4日志模块3.3.5数…

    2022年9月22日
    0
  • 如何将xml转换成excel_java 解析xml

    如何将xml转换成excel_java 解析xml展开全部/****ExcelXML.java*IBM_Developer_POI(Excel,Word)*/packagecom.wds.excelxml;importjava.io.FileInputStream;importjava.io.FileNotFoundException;importjava.io.FileOutputStream;importjava.io.I…

    2022年8月22日
    3
  • 查看是否安装了webpack_webpack不是内部或外部命令

    查看是否安装了webpack_webpack不是内部或外部命令查看当前项目webpack版本在项目package.json中的scripts脚本命令中写入以下内容”webpack”:”webpack–version”然后打开终端在项目根路径下运行:npmrunwebpack

    2022年8月10日
    25
  • 【JAVA面试必会】JMM高并发详解(java内存模型、JMM三大特征、volatile关键字 )「建议收藏」

    【JAVA面试必会】JMM高并发详解(java内存模型、JMM三大特征、volatile关键字 )「建议收藏」volatile一定能保证线程安全吗?禁止指令重排序volatile禁止指令重排序的原理。JMM就是Java内存模型(javamemorymodel)。因为在不同的硬件生产商和不同的操作系统下,内存的访问有一定的差异,所以会造成相同的代码运行在不同的系统上会出现各种问题。所以java内存模型(JMM)屏蔽掉各种硬件和操作系统的内存访问差异,以实现让java程序在各种平台下都能达到……………

    2022年9月5日
    5
  • java集合系列——java集合概述(一)[通俗易懂]

    在JDK中集合是很重要的,学习java那么一定要好好的去了解一下集合的源码以及一些集合实现的思想! 一:集合的UML类图(网上下载的图片) Java集合工具包位置是java.util.*二:集合工具的分析 1:Java集合是java提供的工具包,常用的数据结构:集合、链表、队列、栈、数组、映射等 2:java集合主要划分为五个部分: List列表、Set集合、Map映射、迭代器(It

    2022年2月26日
    54

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号