--
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
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
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
. 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
. 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
. 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
- 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
. 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
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 =
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
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
11 matches
Mail list logo