douaipi3965 2011-03-09 23:03
浏览 76
已采纳

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

How do I collect bandwidth usage/utilzation on devices/switches. From what I understand there are systems that do something like this. They seem to all have snmp in common.

I am looking for imformation on possibly rolling my own system for collecting this data that will be later used on a web-based front-end. For a real-world but perhaps a bit over complicated example of what I'm talking about take a look at ubersmith de. Most of it will be in a LAMP environment. Thanks.

  • 写回答

1条回答 默认 最新

  • du521521521 2011-03-17 15:07
    关注

    On pure SNMP point of view, there is a Management Information Base (MIB) on your SNMP device.

    This base is a kind of tree where datas are named using Object IDentifiers (OIDs). One of these datas is a counter called "ifInOctets" in the interface group of MIBII, it represents the number of "In" octets on one of the interface of the SNMP device, another one ("ifOutOctets") represent the number of "Out" octets. You will find in your favorite language (PHP) a way to get these two counters. You also have the information of the interface speed in "ifSpeed" counter. With NET-SNMP tools installed (on Linux or Microsoft) you can get the information with "snmpget"

    enter image description here

    snmpget -v 1 -c public localhost ifInOctets.65539
    IF-MIB::ifInOctets.65539 = Counter32: 82929271

    Imagine you take 2 values of "ifInOctets" I1 and I2 with an interval of S seconds. You can compute your "In" bandith.

    "In" Bandwith usage in % = (((I2-I1) * 8)*100) / (ifSpeed * S)

    If you just want to have a nice graph of the bandwith usage of your device just try MRTG tool.

    enter image description here

    Best regards.

    JP

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的