Autor Beitrag
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 07.07.02 08:02 
Hallo !!!

Wie kann ich die CPU Auslastung und den freien RAM auslesen ???
Gibts da ne Kompo für sowas oder wie mach ich sowas ??


Moderiert von user profile iconChristian S.: Topic aus VCL (Visual Component Library) verschoben am Mi 17.01.2007 um 16:43
Chris1308
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: So 07.07.02 10:13 
Im Komponenten-Package "X2000" gibt es eine solche Komponente, die funktioniert bei mir (Windows XP Home Edition :evil: ) nicht.
Falls du es trotzdem versuchen willst, findest du die Kompo auf www.ensacom.de.

Chris1308
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 07.07.02 12:29 
geht das auch ohne die kompo ??

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Chris1308
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: So 07.07.02 12:33 
Ja (die Kompo muss das ja auch irgendwie machen).
Weiß aber nicht wie...

Chris1308
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 07.07.02 12:37 
na gut, dann werd ich die kompo mal testen !!!!

_________________
In the beginning was the word.
And the word was content-type: text/plain.
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 07.07.02 13:33 
so jetzt hab ich die installiert.

:arrow: Frage:
Wo kann ich die Prozessor auslastung anschauen ??? Die RAM Auslastung hab ich schon gefunden !!!
Und wei kann ich das umgehen, dass die Kompo sich beim Start der App die SystemInfos holt ?? Deswegen dauert das starten der App so lange !!! Wie kann ich des abstellen ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Chris1308
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: So 07.07.02 14:48 
Gar nicht... Doch: schnelleren Rechner kaufen :mrgreen:

Chris1308
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 07.07.02 17:42 
Zitat:
Wo kann ich die Prozessor auslastung anschauen ??? Die RAM Auslastung hab ich schon gefunden !!!

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: So 09.07.06 15:51 
Willst n Tip?
www.dsdt.info/tipps/?id=136
So, hoffe du kannst das Problem nun lösen
MfG Fighter#1

_________________
Wer andere beherrscht ist stark,
wer sich selbst beherrscht ist mächtig. Lao Tse
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 09.07.06 17:39 
Danke für die Antwort, aber meine frage war aus dem jahr 2002 !!
Es hat sich inzwischen erledigt :-)

Aber trotzdem Danke für deine Hilfe !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Mi 17.01.07 12:37 
wie hast dus erledigt?? aufgegeben, komponente benutzt, code gefunden?

lg el

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 18.01.07 16:07 
Ich glaube ich hatte damals was bei Torry gefunden. Aber ich weiß es nicht mehr, ob ich dann aufgegeben habe oder was brauchbares gefunden habe. Ich weiß auch gar nicht mehr, was ich damit eigentlich wollte.
daPimP
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 54
Erhaltene Danke: 1

Win XP
D6, D7
BeitragVerfasst: Mo 22.01.07 21:18 
Frage ist zwar alt - aber die Antwort fehlt ja trotzdem:

Um den RAM (Arbeitsspeicher auslesen zu können:


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
function MEM(hProc:cardinal; OUT PeakRAM:integer):integer;
var
  pmc : PPROCESS_MEMORY_COUNTERS;
  cb  : Integer;
  wert: cardinal;
begin
  cb:= SizeOf(_PROCESS_MEMORY_COUNTERS);
  GetMem(pmc, cb);
  pmc^.cb:= cb;
  (*Statt den ProzessHandle von irgendeinem Programm zu nehmen,
    GetCurrentProcess einsetzen - gilt dann nur für den eigenen Prozess!*)

  if GetProcessMemoryInfo(hProc, pmc, cb) then  begin
//Virtueller Speicher wert := pmc^.PagefileUsage div 1024 ;
//Seitenfehler wert := pmc^.PageFaultCount;
//max RAM wert := pmc^.PeakWorkingSetSize div 1024 ;
//aktueller RAM
   wert   := pmc^.WorkingSetSize div 1024;
   PeakRAM:= pmc^.PeakWorkingSetSize div 1024 ;
   result:= wert;
  end
  else
   result:= 0;
  FreeMem(pmc);
end;




Aufrufen mit:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
                                                               //ProzessID
     HPROC    := OpenProcess(PROCESS_QUERY_INFORMATION, false, PROCS.th32ProcessID);
     PeakRAM  := 0;
     ProcMem  := MEM(hProc, PeakRAM);

_________________
watch out ... SySSnapper... coming soon
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: Mo 22.01.07 21:20 
Interessant eine Frage die beinahe 5 Jahre alt ist wieder auszugraben :-)
Mannoman, gibt schon sachen :-D
Poste den COde lieber noch in den OpenSource Units ... ham alle mehr davon

MfG Fighter#1

_________________
Wer andere beherrscht ist stark,
wer sich selbst beherrscht ist mächtig. Lao Tse
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Mo 22.01.07 21:20 
irgendwie check ich die antwort nicht ganz. Wie soll mir der Code helfen die CPU auslastung herauszufinden??

lg el

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
daPimP
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 54
Erhaltene Danke: 1

Win XP
D6, D7
BeitragVerfasst: Mo 22.01.07 21:59 
Um die CPU Auslastung einzelner Prozesse anzeigen lassen zu können!

Beschreibung:
Zitat:

Tool zeigt die laufenden Prozesse an und wann welche Prozesse gestartet oder beendet
wurden. Zur Probe einfach mal den Texteditor öffnen/beenden!

Desweiteren zeigt es basierend auf die Prozessliste die einzelne Prozessauslastung an.
speicherleck beseitigt: die snapshot funktion kann noch viel mehr - threads/module ließt es auch aus!

Das Problem, das nicht ALLE Rechte gesetzt sind, müsste noch behoben werden.
So zeigt es NICHT den Pfad von ZoneAlarm oder IceSword an,
da diese nicht im UserMode sind.

(c) daPimP 2007


Lösung hier

Dort ist es als opensource (freeware) von mir downloadbar.
www.delphi-forum.de/....php?p=415310#415310
Einloggen, um Attachments anzusehen!
_________________
watch out ... SySSnapper... coming soon
daPimP
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 54
Erhaltene Danke: 1

Win XP
D6, D7
BeitragVerfasst: Mo 22.01.07 22:03 
Ich denke jetzt kann matze die Frage als erledigt markieren.

_________________
watch out ... SySSnapper... coming soon