Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win32::OLE - Display network card performance

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
HI,

On windows I use the following code to Display my network card performance:

my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or die "WMI connection failed.\n";
my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_PerfRawData_Tcpip_NetworkInterface", "WQL",
wbemFlagReturnImmediately | wbemFlagForwardOnly);

The problem is that the number is very different from the real bytes/sec displayed by the Network monitor .

Is there a better method to aquire the above from script ?
Thanks

Long live king Moshiach !
 
Maybe its returning bits instead of bytes (or vice versa).
 
or packets?

You making any progress with this Mosi?

Mike

The options are: fast, cheap and right - pick any two.. [orientalbow] & [anakin]

Want great answers to your Tek-Tips questions? Have a look at faq219-2884
 
No,No progress.

It does returns bytes ,but the total bytes/sec number varies from the real one shown by task manager by around 50% plus minus.

Long live king Moshiach !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top