?
Solved

determining the cpu-load

Posted on 1998-10-01
10
Medium Priority
?
296 Views
Last Modified: 2010-04-06
how can i determine the cpu-load in percent
(like taskmanager does?)
0
Comment
Question by:manolis_afentakis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 3

Expert Comment

by:KE
ID: 1341459
On Windows NT, use the PDH (Performance Data Helper) API.
On Windows 95, your'e on your own ;-)

0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1341460
if you've got time until monday, i'll post you some code fragments i don't have here at work.

regs,

Black Death.
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1341461
Hi guys, I think there was even a way to determine the CPU load that some particular thread causes, or am I wrong here? That might be encouraging, but I'm afraid that's all I can help with :) BTW you saw Billy's "System Monitor", right?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Accepted Solution

by:
ZifNab earned 300 total points
ID: 1341462
Hi,

[ Win95 and NT store bunches of performance data in a special "virtual" branch of the registry, HKEY_PERFORMANCE_DATA (NT)
or HKEY_DYN_DATA (Win95). The format is different for NT and Win95 and sparsely documented. You can find something in the win32.hlp file if you search the index for things that start with PERF. ] from Peter Below.

Luckely for you, there exists an example (for NT) :

http://www.wilsonc.demon.co.uk/Delphi%20Components/pviewer/pviewer.zip (D4)

http://www.wilsonc.demon.co.uk/Delphi%20Components/pviewer/D3/pviewer.zip (D3)

Matvey, what is Billy's "System Monitor"...?

Regards, Zif.

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1341463
woops, wrong link, it should be http://www.wilsonc.demon.co.uk/Delphi%20Components/perfmon/perfmon.zip

Regards, Zif.
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1341464
Ooh, hi Tom! Glad you're back, I'm also having a plenty of holidays here :) How was your trip?

I meant the standard windows system monitor, that should be (if you chosen to install it in the beginning) in Accessories/System Tools/System Monitor.
Found it? It's kinda` simple progy that shows different graphs of the memory usage, CPU usage HD, etc.
I also saw some programs that calculated their own CPU usage - I'm not sure how they do it though: it might be internal calculations of what it THEORETICALLY does, and how much CPU it'll take, or there might actually be a standard way to find it out for each thread how much CPU it uses.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1341465
Hi Matvey, you on holiday?

Billy, ... now I got it... :-) sghh my mind is still on vacation I guess...

Regards, Zif.
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1341466
There are lots of holidays here in september - october, so it's cool, but I'm not going on any trip right now. I'd love to hear about your vacation, how was it in Spain? (write me a note in the email maybe...).

c u, and good night! 2:10 am :)
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1341467
c.u. Matvey, I'll write you about Spain, soon. 2:30 am here :-)
good night to you too! Zif.
0
 

Author Comment

by:manolis_afentakis
ID: 1341468
hi ZifNab , this is a very good hint , but I can't found this Information

eg  CPU-load: 4%

how can I extract this Information?

thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question