如何在设备/交换机上收集带宽使用/利用率.根据我的理解,有些系统可以做这样的事情.他们似乎都有共鸣.
我正在寻找关于可能滚动我自己的系统来收集这些数据的信息,这些数据将在以后用于基于Web的前端.对于一个现实世界,但也许有点过于复杂的例子,我正在谈论的是看看ubersmith de.其中大部分将在LAMP环境中.谢谢.
我尝试编写一些代码来检索objectID,结果是2B-06-01-04-01-82-31-01-03-01-01.这个值不正确吗?
// Send a SysObjectId SNMP request
response = conn.get("get", argv[0], argv[1], "1.3.6.1.2.1.1.2.0");
if (response[0] == 0xff)
{
Console.WriteLine("No response from {0}", argv[0]);
return;
}
// Get the community and MIB lengths of the response
commlength = Convert.ToInt16(response[6]);
miblength = Convert.ToInt16(response[23 + commlength]);
// Extract the MIB data from the SNMp response
datatype = Convert.ToInt16(response[24 + commlength + miblength]);
datalength = Convert.ToInt16(response[25 + commlength + miblength]);
datastart = 26 + commlength + miblength;
output= BitConverter.ToString(response, datastart, datalength);
Console.WriteLine(" …Run Code Online (Sandbox Code Playgroud) 我正在从 stackoverflow 上的用户那里改编这个 snmp 程序。我在 Visual Studio 2022 中创建了一个新项目,添加了所有依赖项。
当我编译时,我收到 6 条 IDE0090 消息,但我看不出问题是什么。我设置LangVersion为10。
谁能看出问题是什么吗?
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using SnmpSharpNet;
namespace Exemple2
{
class Program
{
static void Main(string[] args)
{
/* Get an SNMP Object
*/
SimpleSnmp snmpVerb = new SimpleSnmp("192.168.1.121", 161, "public");
if (!snmpVerb.Valid)
{
Console.WriteLine("Seems that IP or comunauty is not cool");
return;
}
/* Sample of simple Get usage on ifSpeed on interface 10
* TODO …Run Code Online (Sandbox Code Playgroud)