|
-
Oct 16th, 2002, 08:11 PM
#1
Thread Starter
Hyperactive Member
how do i find cpu usage?
how do i find the current cpu usage, ether in clock ticks or %, in windows. how do i go about doing this?
I know a lot oF Vb, expert in C++, and i think in assembly.
MSVC++6.NET
vb6
masm
Windowz Xp
I find my self using this a lot in C++
__asm {
}
-
Oct 17th, 2002, 09:10 AM
#2
In code or just for you?
For you you can do it using the Task Manager (at least in the NT family).
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 17th, 2002, 10:46 AM
#3
Frenzied Member
You have to use WMI calls - download WMI from:
www.msdn.mcirosoft.com
-
Oct 17th, 2002, 02:49 PM
#4
Thread Starter
Hyperactive Member
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).
notice that this is a programming site.
I know a lot oF Vb, expert in C++, and i think in assembly.
MSVC++6.NET
vb6
masm
Windowz Xp
I find my self using this a lot in C++
__asm {
}
-
Oct 17th, 2002, 02:52 PM
#5
Thread Starter
Hyperactive Member
i searh for wmi , is iss the thing to get the cpu usage for my program?
I know a lot oF Vb, expert in C++, and i think in assembly.
MSVC++6.NET
vb6
masm
Windowz Xp
I find my self using this a lot in C++
__asm {
}
-
Oct 17th, 2002, 03:37 PM
#6
Originally posted by Cmdr0Sunburn
notice that this is a programming site.
You might want to check if there is some CPU hog in your app.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 17th, 2002, 03:52 PM
#7
Thread Starter
Hyperactive Member
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.
I know a lot oF Vb, expert in C++, and i think in assembly.
MSVC++6.NET
vb6
masm
Windowz Xp
I find my self using this a lot in C++
__asm {
}
-
Oct 17th, 2002, 04:31 PM
#8
Okok. I didn't really look who's posting.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 17th, 2002, 04:39 PM
#9
Thread Starter
Hyperactive Member
but leads me back to my original question, how do i find the current cpu usage for the computers prossesor.
I know a lot oF Vb, expert in C++, and i think in assembly.
MSVC++6.NET
vb6
masm
Windowz Xp
I find my self using this a lot in C++
__asm {
}
-
Oct 17th, 2002, 05:51 PM
#10
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
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|