473,408 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Finding number of Cores of The Processor

Hi,
I am using getProcessTimes API for calculating CPU Usage
On a Multi-Core processor i have observed that the %CPU Usage that is
multiple of the number of cores of the processor
Is there any API in VC to find the number of Cores of a processor?
(PS: Without using WMI ie)

url:http://www.ureader.com/gp/1452-1.aspx
Mar 8 '08 #1
3 3834
"Akash" <a@a.comwrote in message
news:35******************************@newspe.com.. .
I am using getProcessTimes API for calculating CPU Usage
On a Multi-Core processor i have observed that the %CPU Usage that is
multiple of the number of cores of the processor
Is there any API in VC to find the number of Cores of a processor?
(PS: Without using WMI ie)
Take a look at GetSystemInfo()

http://msdn2.microsoft.com/en-us/lib...58(VS.85).aspx

to see if it provides what you need.

Regards,
Will
Mar 8 '08 #2

Yes, there are some apis.
ask on win32 api newsgroup to get them :
news://nntp.aioe.org/comp.os.ms-wind...ogrammer.win32

--
lucas69
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Mar 9 '08 #3
The NUMBER_OF_PROCESSORS environment variable tells you how many total
processors your PC has (number of CPUs times number of cores per CPU times 2
if hyperthreading is enabled)

Bob

Mar 10 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: athiane | last post by:
I want a way to parse out all function names that appear in a couple of C files. When the parsing logic finds a function name in a file, it should print out the Function name, line number and file...
5
by: raybakk | last post by:
Hi there. If I make a function in c (I acually use gnu right now), is there any way to find out how many clocksycluses that function takes? If I divide some numbers etc Var1 = Var2/Var3, is it...
14
by: prasadjoshi124 | last post by:
Hi All, I am writing a small tool which is supposed to fill the filesystem to a specified percent. For, that I need to read how much the file system is full in percent, like the output given...
2
by: Jekyll | last post by:
hi, I have two questions, 1/ is there any OS function which return me the number of core on each processor on my computer (callable from C++) 2/ is there any OS function which return me the...
11
by: John | last post by:
Is there a way to find the number of processors on a machine (on linux/ windows/macos/cygwin) using python code (using the same code/cross platform code)?
5
by: whisk3rs | last post by:
Hello, I have a conceptual question. I need to write a program that will take as input a list of images and then process each image individually (extract useful features from the image) ...
1
by: Jon Harrop | last post by:
I'd like to measure performance results as a function of the number of cores by restricting parallel FX to using only a subset of my cores. Is this possible and, if so, how? -- Dr Jon D Harrop,...
9
by: defn noob | last post by:
How can I check how many cores my computer has? Is it possible to do this in a Python-app?
9
by: Carl Johansson | last post by:
If a multithreaded .NET application is executed on a computer with a multicore processor. Will the application automatically run the threads on different processor cores? Regards Carl Johansson
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.