J
JvCoach23
I'm trying to write some that is database driven. What it does it loop
through a dataset and populate the
categoryName
CounterName
InstanceName
MachineName
properties of the performancecounter object (I think I have the speak right
there)
Anyway, when I run the console app, the values are always 0. For example,
the properties above have these values from the db.
with PerforanceCounter
..CategoryName = "Processor"
..CounterName = "% Processor Time"
..InstanceName = "0"
..MachineName = "."
beginInit()
end with
later in the code I do a performancecounter.nextvalue
it always comes back 0. If I step through it, the value is still 0, but if
I type in the command window, I get a value back.. like 3.34324. Can
anyone tell me what I'm doing wrong. I would like to keep this database
driven so I can add stuff easiser and not have to change the vb code.
Thanks
Shannon
(e-mail address removed)
through a dataset and populate the
categoryName
CounterName
InstanceName
MachineName
properties of the performancecounter object (I think I have the speak right
there)
Anyway, when I run the console app, the values are always 0. For example,
the properties above have these values from the db.
with PerforanceCounter
..CategoryName = "Processor"
..CounterName = "% Processor Time"
..InstanceName = "0"
..MachineName = "."
beginInit()
end with
later in the code I do a performancecounter.nextvalue
it always comes back 0. If I step through it, the value is still 0, but if
I type in the command window, I get a value back.. like 3.34324. Can
anyone tell me what I'm doing wrong. I would like to keep this database
driven so I can add stuff easiser and not have to change the vb code.
Thanks
Shannon
(e-mail address removed)