joseLB Posted August 20, 2009 Posted August 20, 2009 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?ThanksJose
joseLB Posted August 20, 2009 Author Posted August 20, 2009 ...or, you can think as an internet bandwidth monitor... I just need how to get the internet sent bytes... probably this s not hard to get, but I can't devise how to get these numbers. Thanks Jose
joseLB Posted August 23, 2009 Author Posted August 23, 2009 (edited) up to now no answers.... ... 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.htmsee at this snapshot http://www.analogx.com/contents/graphics/screenshot/nsl3.gifon 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...ThanksJose Edited August 23, 2009 by joseLB
monoceres Posted August 23, 2009 Posted August 23, 2009 GetTcpStatistics>_< Broken link? PM me and I'll send you the file!
joseLB Posted August 23, 2009 Author Posted August 23, 2009 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
monoceres Posted August 23, 2009 Posted August 23, 2009 (edited) 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 August 23, 2009 by monoceres Broken link? PM me and I'll send you the file!
joseLB Posted August 23, 2009 Author Posted August 23, 2009 ....the code is so simple I'll do it for you....THANK YOU!!!!! 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now