Re: [python-win32] Getting Network Information/Statistics

2008-01-24 Thread Alexander Belyaev
-- Message: 5 Date: Wed, 23 Jan 2008 10:11:14 -0800 From: Tim Roberts [EMAIL PROTECTED] Subject: Re: [python-win32] Getting Network Information/Statistics To: Python-Win32 List python-win32@python.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO

Re: [python-win32] Getting Network Information/Statistics

2008-01-24 Thread Tim Roberts
Alexander Belyaev wrote: I am new to python and so far could not figure out what 'tp' means in the following? Thanks, Alexander tp,val = win32pdh.GetFormattedCounterValue( hc, win32pdh.PDH_FMT_LONG ) print hex(tp),val The PdhGetFormattedCounterValue API has two output

Re: [python-win32] Getting Network Information/Statistics

2008-01-24 Thread Paul Koning
Alexander == Alexander Belyaev [EMAIL PROTECTED] writes: Alexander I am new to python and so far could not figure out what Alexander 'tp' means in the following? tp,val = win32pdh.GetFormattedCounterValue( hc, win32pdh.PDH_FMT_LONG ) print hex(tp),val I don't know that specific

Re: [python-win32] Getting Network Information/Statistics

2008-01-23 Thread Tim Golden
. 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

Re: [python-win32] Getting Network Information/Statistics

2008-01-23 Thread Tim Roberts
. 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

Re: [python-win32] Getting Network Information/Statistics

2008-01-23 Thread Tim Roberts
. wrote: That works for XP but not Vista, I guess M$ changed the API in Vista. Oh by the way I mean to write win32pdhutil.browse() earlier. Thanks for the help. I didn't run it as admin in Vista before so I gave your script a try. The output from your script as run in vista by

Re: [python-win32] Getting Network Information/Statistics

2008-01-23 Thread .
- Original Message - Tim Roberts wrote: Now, you know that Current Bandwidth is not what you want, right? This just shows it is a 100Mbit connection. Yes I am, win32pdhutil.browse() won't report anything for Bytes Received, Sent, or Total so I used Current Bandwidth. It's a 32-bit

Re: [python-win32] Getting Network Information/Statistics

2008-01-23 Thread Tim Roberts
. wrote: - Original Message - Tim Roberts wrote: Now, you know that Current Bandwidth is not what you want, right? This just shows it is a 100Mbit connection. Yes I am, win32pdhutil.browse() won't report anything for Bytes Received, Sent, or Total so I used Current

[python-win32] Getting Network Information/Statistics

2008-01-22 Thread sai rabbit
I want to get bytes sent and received in total and by each application if possible. I tried winpdh and winpdhutil but it reports the wrong number for Received in XP and doesn't seem to work for network stats in Vista: [code] import win32pdh intf = 'Intel[R] PRO_100 Network Connection' hq =

Re: [python-win32] Getting Network Information/Statistics

2008-01-22 Thread Tim Roberts
sai rabbit wrote: I want to get bytes sent and received in total and by each application if possible. I tried winpdh and winpdhutil but it reports the wrong number for Received in XP and doesn't seem to work for network stats in Vista: [code] import win32pdh intf = 'Intel[R] PRO_100

[python-win32] Getting Network Information/Statistics

2008-01-22 Thread .
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