Jump to content

Recommended Posts

Posted

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)
Posted

Have you tried

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

"be smart, drink your wine"

Posted

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?

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
×
×
  • Create New...