Jump to content
Sign in to follow this  
cmattb

Current CPU Frequency?

Recommended Posts

cmattb

So I need a way to easily get the current CPU Frequency. All the easy things Ive found so far only get the maximum core clock of the CPU. The code below is the closest I've found, but it reports the maximum clock even if the CPU is throttling down. Im not very familiar with dll calls and such, but Ive done them a little. I've also checked for small command-line programs thta I could run, but I haven't found any yet.

If you'r familiar with CoreTemp, I need what it outputs under "Frequency", not "Processor"

Any Ideas?

$colItems = ""
$strComputer = "localhost"
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL",0x10+0x20)
If IsObj($colItems) then
    For $objItem In $colItems    
    $SPEED = "MaxClockSpeed: " & $objItem.MaxClockSpeed
    Next
EndIf
MsgBox(-1,"Speed",$SPEED)

Share this post


Link to post
Share on other sites
Siao

Have you tried

$SPEED = "CurrentClockSpeed: " & $objItem.CurrentClockSpeed


"be smart, drink your wine"

Share this post


Link to post
Share on other sites
cmattb

Nope, reports the same thing. It would make sense for that to work, but for reason it doesn't. The weird thing about this is that we used to be able to get the current clock speed through the System Information program bult into windows, but it no longer reports the current speed, only what it should be running at. So an over or underclocked CPU requires a program like CPUz or Coretemp to be detected.

Vista SP1 didn't change this, did it?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×