locked
windows performance API CALL RRS feed

  • Question

  • Hi Friends,

    Please I want to call  windows performance monitor API  in vb.net 2012    and  specially any counter of performance monitor. please help me  thank you.


    asad


    • Edited by malikasad Thursday, May 28, 2015 5:22 PM correction
    Thursday, May 28, 2015 5:17 PM

Answers

All replies

  • some thing like this.....

    Dim PC As New PerformanceCounter()
    PC.CategoryName = "Process"
    PC.CounterName = "Private Bytes"
    PC.InstanceName = "Explorer"
    MessageBox.Show(PC.NextValue().ToString())

    More info at the following link.....

    Performance Monitor class


    sivanitha

    • Proposed as answer by Blackwood Friday, May 29, 2015 12:47 PM
    • Unproposed as answer by malikasad Friday, May 29, 2015 2:21 PM
    • Proposed as answer by Reed KimbleMVP Saturday, May 30, 2015 12:54 AM
    Thursday, May 28, 2015 5:50 PM
  • thank you for reply,  Please  i want to add sqlserver:buffer Manager (as in following snapshot) in my vb.net winforms please how it will be  thank you.regards

    asad

    Friday, May 29, 2015 12:28 PM
  • That should be the way to do it.  Just set the names according to the specific category and counter you wish to use.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Saturday, May 30, 2015 12:56 AM
  • Please I can also get the same for remote machine. thank you.

    asad

    Sunday, May 31, 2015 1:59 PM
  • Create the PerformanceCounter instance using the constructor overload that takes a remote machine name:

    https://msdn.microsoft.com/en-us/library/9ffskxdc(v=vs.110).aspx


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    • Marked as answer by Youjun Tang Friday, June 5, 2015 9:03 AM
    • Unmarked as answer by Youjun Tang Friday, June 5, 2015 9:03 AM
    • Marked as answer by Youjun Tang Tuesday, June 9, 2015 6:04 AM
    Thursday, June 4, 2015 11:13 PM