[python-win32] Getting Network Information/Statistics

Tim Golden mail at timgolden.me.uk
Wed Jan 23 11:08:20 CET 2008


 >.> wrote:
> I got the interface name from win32util.browse() in Vista and XP. I think XP
> is Giving me the wrong number because it differs from what I'm reading in
> perfmon everytime and it seems to be counting down from that number after
> every subsequent call.
> ex: perfmon will give me a last of 0.0 and
>  win32pdhutil.GetPerformanceAttributes('Network Interface','Bytes
> Received/sec','Intel[R] PRO_100 VE Network Connection - Packet Scheduler
> Miniport')
> 
> Will return something like 12107 and will go down every subsequent call.
> 
> Is there another way to get this information?

The likelihood is that WMI exposes this kind of thing, but I don't
have time to look into it at the moment. If you can find a WMI-based
solution (say in VBS) somewhere online, I'm happy to help translating
it into Python.

TJG

(BTW, what is win32util.browse ? It doesn't look like part of pywin32)


More information about the python-win32 mailing list