Sign in to follow this  
Followers 0
RedRum42

Network Speed

6 posts in this topic

Is there a way to get the network speed of the computer? I was looking in the registry and there's not a easy value to grab.

Thanks

Share this post


Link to post
Share on other sites



Have a look at this nic thruput utility by Sulfurious

Share this post


Link to post
Share on other sites

Have a look at this nic thruput utility by Sulfurious

This might be useful. However, I think I want something even more simple. I think I want just the link speed or the max network speed of the NIC.

Thanks

Share this post


Link to post
Share on other sites

$objWMIService = ObjGet("winmgmts:\\.\root\cimv2")
$objClass = $objWMIService.ExecQuery("Select * from Win32_PerfRawData_Tcpip_NetworkInterface")

For $obj in $objClass
    msgbox(1,"","Interface: " & $obj.Name & @CRLF & _
                "Bytes Received/sec: " & $obj.BytesReceivedPerSec & @CRLF & _
                "Bytes Sent/sec: " & $obj.BytesSentPerSec & @CRLF & _
                "Bytes Total/sec: " & $obj.BytesTotalPerSec & @CRLF & _
                "Network rate: " & $obj.CurrentBandwidth)
Next

Share this post


Link to post
Share on other sites

$objWMIService = ObjGet("winmgmts:\\.\root\cimv2")
$objClass = $objWMIService.ExecQuery("Select * from Win32_PerfRawData_Tcpip_NetworkInterface")

For $obj in $objClass
    msgbox(1,"","Interface: " & $obj.Name & @CRLF & _
                "Bytes Received/sec: " & $obj.BytesReceivedPerSec & @CRLF & _
                "Bytes Sent/sec: " & $obj.BytesSentPerSec & @CRLF & _
                "Bytes Total/sec: " & $obj.BytesTotalPerSec & @CRLF & _
                "Network rate: " & $obj.CurrentBandwidth)
Next

I don't understand what the units of the CurrentBandwidth are? My NIC is at 1 Gbps speed but the result from this example gives "10000000"

Share this post


Link to post
Share on other sites

I don't understand what the units of the CurrentBandwidth are? My NIC is at 1 Gbps speed but the result from this example gives "10000000"

As you might get if your GigE port was plugged into a 10Base-T device, like a cable modem...? What speed is it actually connected at, vice capable of?

:)


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

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