Network interface instance vs link speed

Source: Internet
Author: User

Recently I encountered a very troublesome problem and I have never found a good solution.
Problem:
You must obtain both the NIC utilization and the NIC connection speed.

Solution:
You can use the PDH library to obtain the network adapter's transmission rate and other information.

Obtain the network adapter connection speed
1. Use WMI to query
2. Use the IP helper Interface
3. Use the NetMonitor Interface
4. Check the Registry

The trouble here is that if we get the utilization through PDH, we can only get the static information of the network interface instance only by the name of the network interface instance. However, we cannot use this name for ing. For example, the NIC name is Intel (r) 100/1000, but the Instance name obtained from PDH is Intel [R] 100_1000.

I have a trouble in using NetMonitor to calculate the utilization. I don't know if there is any better way.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.