Performance Counter Question

Discussion in 'ASP .Net' started by Chortler, Apr 22, 2005.

  1. Chortler

    Chortler Guest

    When I debug the following code, the label1.text holds a valid value
    for the machines CPU. However, the string 's' holds a zero??
    Any ideas??


    Dim x As New System.Diagnostics.PerformanceCounter
    Dim s As String
    x.MachineName = "xp-ts01"
    x.CategoryName = "Processor"
    x.CounterName = "% Processor Time"
    x.InstanceName = 0
    s = x.NextValue
    Me.Label1.Text = x.NextValue
    Chortler, Apr 22, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. The Eeediot
    Replies:
    3
    Views:
    2,225
    =?Utf-8?B?UnVsaW4gSG9uZw==?=
    Dec 22, 2004
  2. =?Utf-8?B?amltaXo=?=

    vb.net - performance counter raw data

    =?Utf-8?B?amltaXo=?=, Jan 24, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    764
    =?Utf-8?B?amltaXo=?=
    Jan 24, 2005
  3. Replies:
    0
    Views:
    310
  4. Eternal Vigilance

    Re: High Performance Counter.

    Eternal Vigilance, Jul 9, 2003, in forum: C Programming
    Replies:
    1
    Views:
    386
    Skybuck Flying
    Jul 9, 2003
  5. George2
    Replies:
    1
    Views:
    792
    Alf P. Steinbach
    Jan 31, 2008
Loading...

Share This Page