how do i find the current cpu usage, ether in clock ticks or %, in windows. how do i go about doing this?
Printable View
how do i find the current cpu usage, ether in clock ticks or %, in windows. how do i go about doing this?
In code or just for you?
For you you can do it using the Task Manager (at least in the NT family).
You have to use WMI calls - download WMI from:
www.msdn.mcirosoft.com
notice that this is a programming site.Quote:
Originally posted by CornedBee
In code or just for you?
For you you can do it using the Task Manager (at least in the NT family).
i searh for wmi , is iss the thing to get the cpu usage for my program?Quote:
Originally posted by jim mcnamara
You have to use WMI calls - download WMI from:
www.msdn.mcirosoft.com
You might want to check if there is some CPU hog in your app.Quote:
Originally posted by Cmdr0Sunburn
notice that this is a programming site.
good point, but most programmers with my experience(Posts: 445) will know how to find that out. especially with my assembly knowledge, you get to know several opcodes that can find that out for you as well as taskmanager.
Okok. I didn't really look who's posting.
but leads me back to my original question, how do i find the current cpu usage for the computers prossesor.
No idea what they all do:
Code:Performance Monitoring Functions
The following functions are supported for working with performance data.
CounterPathCallBack
LoadPerfCounterTextStrings
PdhAddCounter
PdhBindInputDataSource
PdhBrowseCounters
PdhBrowseCountersH
PdhCalculateCounterFromRawValue
PdhCloseLog
PdhCloseQuery
PdhCollectQueryData
PdhCollectQueryDataEx
PdhComputeCounterStatistics
PdhConnectMachine
PdhCreateSQLTables
PdhEnumLogSetNames
PdhEnumMachines
PdhEnumMachinesH
PdhEnumObjectItems
PdhEnumObjectItemsH
PdhEnumObjects
PdhEnumObjectsH
PdhExpandCounterPath
PdhExpandWildCardPath
PdhExpandWildCardPathH
PdhFormatFromRawValue
PdhGetCounterInfo
PdhGetCounterTimeBase
PdhGetDataSourceTimeRange
PdhGetDataSourceTimeRangeH
PdhGetDefaultPerfCounter
PdhGetDefaultPerfCounterH
PdhGetDefaultPerfObject
PdhGetDefaultPerfObjectH
PdhGetDllVersion
PdhGetFormattedCounterArray
PdhGetFormattedCounterValue
PdhGetLogFileSize
PdhGetLogSetGUID
PdhGetRawCounterArray
PdhGetRawCounterValue
PdhIsRealTimeQuery
PdhLookupPerfIndexByName
PdhLookupPerfNameByIndex
PdhMakeCounterPath
PdhOpenLog
PdhOpenQuery
PdhOpenQueryH
PdhParseCounterPath
PdhParseInstanceName
PdhReadRawLogRecord
PdhRemoveCounter
PdhSelectDataSource
PdhSetCounterScaleFactor
PdhSetDefaultRealTimeDataSource
PdhSetLogSetRunID
PdhSetQueryTimeRange
PdhUpdateLog
PdhUpdateLogFileCatalog
PdhValidatePath
PdhVerifySQLDB
UnloadPerfCounterTextStrings