> Anyone have any guidance on how to determine the numbers of 
> network (TCP) bytes and/or packets sent / received over a TCP 
> interface from a Perl script (AS 5.8.8 build 817)?  Is there 
> some method to get this information from WMI (?) or some 
> other internal / system level Windows XP interface? 
> 
> I've written a perl script that use OLE automation to drive 
> Internet Explorer to access a website and follow a couple of 
> links.  I'd like to be able to capture the number of network 
> bytes sent / received (and packets too) that occur while IE 
> is executing under the Perl script's control.    I know I 
> could get the length of the "outerHTML" from the IE document 
> ($IE->{Document}->body->{outerHTML}) which approximates the 
> number of bytes received... but I'm looking for something better. 
> 
> Working code snippets are always greatly appreciated but even 
> the basics on how to go about getting this information from a 
> perl script would be great... 

Hey,

The WMI performance counters will do the job for you. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/
wmi/performance_counter_classes.asp, and in particular
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/
wmi/win32_perfformatteddata_tcpip_networkinterface.asp

Hope that gives you some pointers - there are sample scripts on the site
which should be easily convertable to perl.

Good luck!

Cheers,
Paul

----
Gloucester Research Limited believes the information provided herein is 
reliable. While every care has been taken to ensure accuracy, the information 
is furnished to the recipients with no warranty as to the completeness and 
accuracy of its contents and on condition that any errors or omissions shall 
not be made the basis for any claim, demand or cause for action.
The information in this email is intended only for the named recipient.  If you 
are not the intended recipient please notify us immediately and do not copy, 
distribute or take action based on this e-mail.
Gloucester Research Limited, 5th Floor, Whittington House, 19-30 Alfred Place, 
London WC1E 7EA.
----


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to