get Network bandwidth

B

bzh_29

Hi,

In order to detect the occupation of the network I need to know how
much of the bandwith is used.
(More simple, I want to get the percent you can have in the window
task manager when you choose netwrok tab).

In order to get the info, I was using Performance counter :
Bytes Received/sec, Bytes Sent/sec and Bytes Total/sec.

I compare to the Current Bandwidth in order to get a percent :
Two ways :
(Bytes Received/sec + Bytes Sent/sec) * 100 / Current Bandwidth

Or

(Bytes Total/sec * 100) / Current Bandwidth

But I never get the same result as the task manager ... It's always
divide by 10 ...

I wondering if someone could help by giving a way to acheive this ...

Ps : I d not want tomultiply by 10 :blush:)
 
B

bzh_29

Hi,

In order to detect the occupation of the network I need to know how
much of the bandwith is used.
(More simple, I want to get the percent you can have in the window
task manager when you choose netwrok tab).

In order to get the info, I was using Performance counter :
Bytes Received/sec, Bytes Sent/sec and Bytes Total/sec.

I compare to the Current Bandwidth in order to get a percent :
Two ways :
(Bytes Received/sec + Bytes Sent/sec) * 100 / Current Bandwidth

Or

(Bytes Total/sec * 100) / Current Bandwidth

But I never get the same result as the task manager ... It's always
divide by 10 ...

I wondering if someone could help by giving a way to acheive this ...

Ps : I d not want tomultiply by 10 :blush:)


Argh ... It's a shame ... Current Bandwidth in BIT not in BYTES ... My
bloody english ...

So divide by 8 the Bandwith make thing better !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top