| |
didorno
Posts: 361
Score: 0
Joined: 2/12/2005
From:
Status: offline
|
Which parameters are the best choice for monitoring the in and out bound traffic ? Now I'm experimenting with the next code : strComputer = "." Set WshShell = WScript.CreateObject("WScript.Shell") Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") set objRefresher = CreateObject("WbemScripting.SWbemRefresher") Set colItems = objRefresher.AddEnum _ (objWMIService, "Win32_PerfFormattedData_TCPIP_NetworkInterface").objectSet objRefresher.Refresh Do For Each objItem in colItems WScript.Echo "Aantal Items : " & colItems.Count & " naam : " & objItem.Name Wscript.Echo "Bytes Received Per Second : " & objItem.BytesReceivedPersec Wscript.Echo "Bytes Sent Per Second : " & objItem.BytesSentPersec Wscript.Echo "Bytes Total Per Second : " & objItem.BytesTotalPersec Wscript.Echo "Packets Per Second : " & objItem.PacketsPersec Wscript.Echo "Packets Received Per Second: " & objItem.PacketsReceivedPersec Wscript.Echo "Packets Sent Per Second : " & objItem.PacketsSentPersec & vbCrLf objRefresher.Refresh ..................etcetera but I'm not satisfied with this. B.t.w., I intend to convert the bytes/interval to sounds (inbound, sound1, from one speaker, outbound ,sound2, from the other), but thats an other issue.
< Message edited by didorno -- 7/20/2005 7:06:07 AM >
_____________________________
Regular Expression ? I (L+o{1,}v{1,3}e\s)+[iI]t!$
|
|