可以转载,转载请著名作者和出处,谢谢,特别鄙视转载后扣上自己名字的哥们
.net里添加snmp.dll类,图标控件使用第三方的Dundas.Chart.
'获取snmp信息
Dim mib As New RFC1157.Mgmt()
Dim sess As New Snmp.ManagerSession("IP", "信息字")
Dim mi As New ManagerItem(sess, mib.OID("OID"))
Dim y As Double
y = mi.Value.ToString()
'利用获取到的信息画出图形
Dim x As Integer
x = 200
Chart1.Series(0).Points.AddXY(DateTime.Now, y)
Chart1.ResetAutoValues()
Chart1.ChartAreas("Default").AxisX.Minimum = DateTime.Now.AddSeconds(-x).ToOADate()
Chart1.ChartAreas("Default").AxisX.Maximum = DateTime.Now.AddSeconds(x).ToOADate()
Chart1.Invalidate()
阅读(1596) | 评论(0) | 转发(0) |