相关疑难解决方法(0)

如何在远程设备/交换机/服务器上收集带宽利用率数据?

如何在设备/交换机上收集带宽使用/利用率.根据我的理解,有些系统可以做这样的事情.他们似乎都有共鸣.

我正在寻找关于可能滚动我自己的系统来收集这些数据的信息,这些数据将在以后用于基于Web的前端.对于一个现实世界,但也许有点过于复杂的例子,我正在谈论的是看看ubersmith de.其中大部分将在LAMP环境中.谢谢.

php networking snmp bandwidth network-protocols

2
推荐指数
1
解决办法
5396
查看次数

C#SNMP编程

我尝试编写一些代码来检索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)

c# snmp mib

2
推荐指数
1
解决办法
2万
查看次数

c# IDE0090“新”表达式可以简化Visual Studio 2022

我正在从 stackoverflow 上的用户那里改编这个 snmp 程序。我在 Visual Studio 2022 中创建了一个新项目,添加了所有依赖项。

当我编译时,我收到 6 条 IDE0090 消息,但我看不出问题是什么。我设置LangVersion为10。

https://i.stack.imgur.com/BF5P1.jpg

谁能看出问题是什么吗?

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)

c# visual-studio

-2
推荐指数
1
解决办法
2496
查看次数

标签 统计

c# ×2

snmp ×2

bandwidth ×1

mib ×1

network-protocols ×1

networking ×1

php ×1

visual-studio ×1