View topic - CPU utilization for a multiple cpu computer and calculating
CPU utilization for a multiple cpu computer and calculating
5 posts
• Page 1 of 1
CPU utilization for a multiple cpu computer and calculating
Hello,
I am writing a c++ program for calculating CPU utilization of a
computer that has multiple CPUs. If anyone knows of a API or library
call,please inform me.
Also, what is the quickest way to find the amount of free space on a mount
point for a c++ program.
Thanks,
Sabtain
I am writing a c++ program for calculating CPU utilization of a
computer that has multiple CPUs. If anyone knows of a API or library
call,please inform me.
Also, what is the quickest way to find the amount of free space on a mount
point for a c++ program.
Thanks,
Sabtain
- sabtain
Re: CPU utilization for a multiple cpu computer and calculat
Hi Sabtain,
Use ClockTime() to generate a clock id for the first <ncpu> threads of procnto (pid 1).
They are the idle threads for each processor.
You can then poll them at regular intervals to gauge how long they have been running.
The processor usage can be determined by the ratio of interval to nsecs executed.
Regards,
Colin
sabtain wrote:
--
cburgess@qnx.com
Use ClockTime() to generate a clock id for the first <ncpu> threads of procnto (pid 1).
They are the idle threads for each processor.
You can then poll them at regular intervals to gauge how long they have been running.
The processor usage can be determined by the ratio of interval to nsecs executed.
Regards,
Colin
sabtain wrote:
Hello,
I am writing a c++ program for calculating CPU utilization of a
computer that has multiple CPUs. If anyone knows of a API or library
call,please inform me.
Also, what is the quickest way to find the amount of free space on a mount
point for a c++ program.
Thanks,
Sabtain
--
cburgess@qnx.com
- Colin Burgess
Re: CPU utilization for a multiple cpu computer and calculat
Thanks for replying but I have a further quesiton. Even on a single
processor PC, the procnto has 11 threads running. what does that mean?
"Colin Burgess" <cburgess@qnx.com> wrote in message
news:fgqr9o$o8e$1@inn.qnx.com...
processor PC, the procnto has 11 threads running. what does that mean?
"Colin Burgess" <cburgess@qnx.com> wrote in message
news:fgqr9o$o8e$1@inn.qnx.com...
Hi Sabtain,
Use ClockTime() to generate a clock id for the first <ncpu> threads of
procnto (pid 1).
They are the idle threads for each processor.
You can then poll them at regular intervals to gauge how long they have
been running.
The processor usage can be determined by the ratio of interval to nsecs
executed.
Regards,
Colin
sabtain wrote:
Hello,
I am writing a c++ program for calculating CPU utilization of a
computer that has multiple CPUs. If anyone knows of a API or library
call,please inform me.
Also, what is the quickest way to find the amount of free space on a
mount point for a c++ program.
Thanks,
Sabtain
--
cburgess@qnx.com
- sabtain
Re: CPU utilization for a multiple cpu computer and calculat
procnto starts a threadpool to handle it's resource managers. In a normal scenario they are pretty much all idle,
awaiting messages.
sabtain wrote:
--
cburgess@qnx.com
awaiting messages.
sabtain wrote:
Thanks for replying but I have a further quesiton. Even on a single
processor PC, the procnto has 11 threads running. what does that mean?
"Colin Burgess" <cburgess@qnx.com> wrote in message
news:fgqr9o$o8e$1@inn.qnx.com...
Hi Sabtain,
Use ClockTime() to generate a clock id for the first <ncpu> threads of
procnto (pid 1).
They are the idle threads for each processor.
You can then poll them at regular intervals to gauge how long they have
been running.
The processor usage can be determined by the ratio of interval to nsecs
executed.
Regards,
Colin
sabtain wrote:
Hello,
I am writing a c++ program for calculating CPU utilization of a
computer that has multiple CPUs. If anyone knows of a API or library
call,please inform me.
Also, what is the quickest way to find the amount of free space on a
mount point for a c++ program.
Thanks,
Sabtain
--
cburgess@qnx.com
--
cburgess@qnx.com
- Colin Burgess
Re: CPU utilization for a multiple cpu computer and calculat
sabtain wrote:
Look at the statvfs() function ...
Also, what is the quickest way to find the amount of free space on a mount
point for a c++ program.
Look at the statvfs() function ...
- John Garvey
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests