How to determine the download from the Internet per second?

Just starting out? Need help? Post your questions and find answers here.
AZJIO
Addict
Addict
Posts: 1316
Joined: Sun May 14, 2017 1:48 am

How to determine the download from the Internet per second?

Post by AZJIO »

How to determine how much data is downloaded from the Internet per second? There is a desire to write a program similar to DU_Meter, NetWorx. That is, make a window and draw a graph of the download speed.
There used to be a knemo program in Linux, but now I'm running into trouble installing it on some Linuxes. And also often these programs contain things that are unnecessary for me, such as tariffs, excess reminders, etc. I am only interested in a chart that monitors how much I give or how much I receive. For example, when you start a program, it starts downloading updates, virus databases, or Windows updates or torrents.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: How to determine the download from the Internet per second?

Post by BarryG »

Different downloads can have vastly different speeds, depending on their source. For example, when I download PureBasic from my account, I get a rate of about 3 MB/sec (according to Firefox). But I'm also downloading a torrent at a rate of about 12 KB/sec. So you'd need to know literally everything that is being downloaded and average them. I have no idea how we do this.

My approach would be to see if there's some built-in DOS command or API call that knows this info, and then call and parse it. Start here:

https://superuser.com/questions/1430230 ... mmand-line

Looks like the "typeperf" DOS command is what you want?
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: How to determine the download from the Internet per second?

Post by infratec »

The main problem is:

You need a reliable server that works always on the same highspeed connection.

Then you can download a defined large file from this (your) server.
Simply meassure the times with async download.

If the server varies, you can not rely on the results.
And highspeed means your server should be connected at least with 1G (better 10G) to the net.

My problem, is that we have a very very highspeed connection to the internet and most of the speedtests can not deliver as fast as we can receive.
So most of the results are nonsense for us.
AZJIO
Addict
Addict
Posts: 1316
Joined: Sun May 14, 2017 1:48 am

Re: How to determine the download from the Internet per second?

Post by AZJIO »

I do not need Internet speed, but surveillance that someone is downloading quietly. Somewhere on the AutoIt3 forum there was a topic I can't find. In the properties of the network, it was indicated how much was downloaded per session from the moment the OS was loaded. And if you receive this data every second, then you can determine the data rate per second.

NetWorx (version 5.5.5 is free)
Image

Googled it
User_Russian
Addict
Addict
Posts: 1443
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: How to determine the download from the Internet per second?

Post by User_Russian »

AZJIO
Addict
Addict
Posts: 1316
Joined: Sun May 14, 2017 1:48 am

Re: How to determine the download from the Internet per second?

Post by AZJIO »

Thanks!

I added EnableExplicit and declared variables. Now I need to adapt to do a shorthand function and get only download and upload data. I need to add polling of network cards only when changing equipment, so that each time I do not ask which network cards are available. I need to check the network disconnect flag.

Download
Image
User_Russian
Addict
Addict
Posts: 1443
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: How to determine the download from the Internet per second?

Post by User_Russian »

The application does not work properly if many network cards are installed.
In TextGadget only the latest network card information is displayed.

Here is the result with only one card.

Image
AZJIO
Addict
Addict
Posts: 1316
Joined: Sun May 14, 2017 1:48 am

Re: How to determine the download from the Internet per second?

Post by AZJIO »

User_Russian wrote: Thu Jul 21, 2022 2:50 pm The application does not work properly if many network cards are installed.
In TextGadget only the latest network card information is displayed.
Summarizing the data into some variable from each card is not difficult. I did the first step. I have one card, so I made an effort in other directions. I also want to resize the window, make the graph smooth, draw it as a graph, not a histogram. In general, there are many ideas.
AZJIO
Addict
Addict
Posts: 1316
Joined: Sun May 14, 2017 1:48 am

Re: How to determine the download from the Internet per second?

Post by AZJIO »

Added for Linux
Post Reply