Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Monitor download upload traffic

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,3102
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Monitor download upload traffic
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Monitor download upload traffic - 5/24/2005 7:36:09 AM   
  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!$
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Monitor download upload traffic Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts