Sign in to follow this  
Followers 0
AlienStar

Detect data usage ???

6 posts in this topic

#1 ·  Posted (edited)

hello everybody

as we know we can see data sent and received when we select the properties of the internet connection

how can I detect bytes of data sent and received during internet connection ?

thanks

Edited by AlienStar

Share this post


Link to post
Share on other sites



There are counters like Win32_PerfFormattedData_Tcpip_NetworkInterface in WMI that AutoIt can use via the COM interface.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Try Network Usage (bytes sent/received) using my Performance Counters UDF. Any WMI interface with Win32_Perf is probably available (in a faster form) using my UDF.

*edit: actually, that's for overall network performance. There are however Performance Counters for things like IP, TCP and UDP that could possibly be used to calculate the network performance.. though I'm not sure what 'segments/datagrams per second' means in terms of bytes

Edited by Ascend4nt

Share this post


Link to post
Share on other sites

You could also go with a loop of command lines like this:

netstat -p IP -s
and parse the outputs.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Try Network Usage (bytes sent/received) using my Performance Counters UDF. Any WMI interface with Win32_Perf is probably available (in a faster form) using my UDF.

*edit: actually, that's for overall network performance. There are however Performance Counters for things like IP, TCP and UDP that could possibly be used to calculate the network performance.. though I'm not sure what 'segments/datagrams per second' means in terms of bytes

thanks Ascend4nt for help

I test this code :

Example #5: Network Usage

but I faced a problem :

when I run the script it send Error :

Line 291 (File "C:\Program Files(x86)\Autoit3\Include\_PDH_PerformanceCounters.au3"):

OnAutoItExitRegister("_PDH_UnInit")

^ERROR

Error : Unknown function name .

Note : I use windows 7 x64 home premium

so please help me

Also PsaltyDS thanks for help

but would you explain more ;)

Edited by AlienStar

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

AlienStar,

First, please edit your post and remove my code from it. Its part of my license agreement, which brings me to my second point:

You must download the actual UDF. I posted a link to the example. The UDF is linked to in the first post in that thread (that's where you'll see the License agreement). You can simply click the link in my signature for it.

*edit: err.. it looks like you didn't extract the files properly actually. Make sure you extract them with their own subfolders.

Remember also the example is for network usage, not specifically internet usage.

thanks

Edited by Ascend4nt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0