Jump to content

Trafic measurement - Internet


 Share

Recommended Posts

Hi!

I would like to measure the upload trafic in a internet server, probably the logic is from time to time get the uploaded bytes transfered at that interval?

If not possible to separate what's upload Internet trafic from other network trafics, at least is possible to get from time to time the upload total network traffic?

Thanks

Jose

Link to comment
Share on other sites

up to now no answers.... Posted Image ... is so hard to get received bytes / sent bytes from / to internet in Au3?

See, this small freeware program ( analogx) does it... http://www.analogx.com/contents/download/Network/nsl/Freeware.htm

see at this snapshot http://www.analogx.com/contents/graphics/screenshot/nsl3.gif

on it's "current" columns at income and outgoing boxes , is exactly the information about uploaded/downloaded bytes/second, ....but unfortunatedly AU3Info can't read anything from it's screen....

I believe there is a API call, or whatever, where I can get some kind of information about sent/received TCP (internet) bytes. But have no idea where...

Thanks

Jose

Edited by joseLB
Link to comment
Share on other sites

thanks MonoCeres, I will try to use that msdn information. By the way, I call it as an DLL, or as API? If DLL, do yo think that your DLL tutorial will help me?

Thanks

Jose

The api function resides inside the dll. But the code is so simple I'll do it for you.

$MIB_TCPSTATS=DllStructCreate("dword[15]")
DllCall("Iphlpapi.dll","int","GetTcpStatistics","ptr",DllStructGetPtr($MIB_TCPSTATS))

$sent=DllStructGetData($MIB_TCPSTATS,1,11) ; dwOutSegs
$resent=DllStructGetData($MIB_TCPSTATS,1,12) ;dwRetransSegs

MsgBox(0,"Total uploaded",$sent+$resent&" packets.")

Edit: I don't know how large the packet size is, but I think it's ~1500 bytes. You'll better look into it.

Edited by monoceres

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

....the code is so simple I'll do it for you....

THANK YOU!!!!! Posted Image

As I get success, I will post the result code here, as I think it could be others interest too ( a upload/download trafic monitor routines/program).

Jose

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...