gib
gib

Reputation: 788

perl on win2003 (strawberry perl) - how to get current bandwidth usage?

Title pretty much tells everything. Is it possible to get current bandwidth usage in windows2003 via a perl script (using strawberry perl) ?

Upvotes: 1

Views: 276

Answers (1)

Josh Y.
Josh Y.

Reputation: 876

I rarely use Windows, and don't currently have access to a Windows machine, but you should be able to use WMI/WQL to get what you need.

This distribution provides a DBI interface to WMI:

https://metacpan.org/release/DBD-WMI

The correct query would be along the lines of

Select Name, currentbandwidth
  FROM Win32_PerfFormattedData_Tcpip_NetworkInterface

More about that class from MSDN.

Upvotes: 2

Related Questions