Get CPUusage ASP code

Hi everyone,

Now I am trying to find out an ASP code can get the CpuUsage of my server (win2000 server). It looks like that:

<%
Set CpuInfo = Server.CreateObject("CpuDll.CpuUsage")
a = CpuInfo.CPU_Usage_Percent

Response.Write(a)
%>

I used Visual Basic to compile a DLL file to run above script, I did it from this script: CS_CPU_Monitor.zip (attach file below) and run regsvr32 CpuDll.dll to register it to my server.

But when I run above script, Response.Write(a) always returns: 100 , even at that time my server CPU is much lower than 100 percent.

Anybody had any experience in this or had any other methods to get the cpu usage in ASP code.

Looking forward to hearing from you

Thanks in advance.

 

 

 

 

Top