AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Sonstige Fragen zu Delphi Delphi CPU- und RAM Auslastung auch unter win 9x?
Thema durchsuchen
Ansicht
Themen-Optionen

CPU- und RAM Auslastung auch unter win 9x?

Ein Thema von Alexander · begonnen am 21. Jul 2003 · letzter Beitrag vom 27. Jul 2003
Antwort Antwort
Alexander

Registriert seit: 28. Aug 2002
Ort: Oldenburg
3.513 Beiträge
 
Turbo Delphi für .NET
 
#1

CPU- und RAM Auslastung auch unter win 9x?

  Alt 21. Jul 2003, 15:37
Hi,
habe jetzt schon einigen Source gefunden wie man die Auslastung von RAM und CPU unter NT ff ausliest. Aber wie geht das unter 9x und unter NTff?
Wäre nett, wenn mir wer weiterhelfen könnte.
Alexander
Alexander
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#2

Re: CPU- und RAM Auslastung auch unter win 9x?

  Alt 21. Jul 2003, 15:40
Für den Speicher nimm TMemoryStatus und die CPU-Auslastung bekommst du unter win9x nicht, da dies nicht unterstützt wird.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Alexander

Registriert seit: 28. Aug 2002
Ort: Oldenburg
3.513 Beiträge
 
Turbo Delphi für .NET
 
#3

Re: CPU- und RAM Auslastung auch unter win 9x?

  Alt 21. Jul 2003, 15:50
Werde ich mir ankucken...
Aber Speircherauslastung funktioniert unter 9x?
Alexander
  Mit Zitat antworten Zitat
Benutzerbild von Pseudemys Nelsoni
Pseudemys Nelsoni

Registriert seit: 24. Dez 2002
Ort: Hamburg-Harburg
3.551 Beiträge
 
#4

Re: CPU- und RAM Auslastung auch unter win 9x?

  Alt 27. Jul 2003, 17:10
Zitat:
The MEMORYSTATUS structure contains information about current memory availability. The GlobalMemoryStatus function uses this structure.

typedef struct _MEMORYSTATUS { // mst
DWORD dwLength; // sizeof(MEMORYSTATUS)
DWORD dwMemoryLoad; // percent of memory in use
DWORD dwTotalPhys; // bytes of physical memory
DWORD dwAvailPhys; // free physical memory bytes
DWORD dwTotalPageFile; // bytes of paging file
DWORD dwAvailPageFile; // free bytes of paging file
DWORD dwTotalVirtual; // user bytes of address space
DWORD dwAvailVirtual; // free user bytes

} MEMORYSTATUS, *LPMEMORYSTATUS;


Members

dwLength

Indicates the size of the structure. The calling process should set this member prior to calling GlobalMemoryStatus.

dwMemoryLoad

Specifies a number between 0 and 100 that gives a general idea of current memory utilization, in which 0 indicates no memory use and 100 indicates full memory use.

dwTotalPhys

Indicates the total number of bytes of physical memory.

dwAvailPhys

Indicates the number of bytes of physical memory available.

dwTotalPageFile

Indicates the total number of bytes that can be stored in the paging file. Note that this number does not represent the actual physical size of the paging file on disk.

dwAvailPageFile

Indicates the number of bytes available in the paging file.

dwTotalVirtual

Indicates the total number of bytes that can be described in the user mode portion of the virtual address space of the calling process.

dwAvailVirtual

Indicates the number of bytes of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling process.



See Also

GlobalMemoryStatus
das hab ich in der windows SDK gefunden...aber wie setz ich das ein? sowas (für mich) schweres hab ich noch nie gemacht...z.b soll "dwMemoryLoad" ja die % zahl die vom speicher in benutzung ist enthalten...aber wie krieg ich das z.b in eine caption? das es mit "label1.caption := dwMemoryLoad" geht ist mir schon klar (leider) (zumal er bei mir sogar sagt das "dwMemoryLoad" unbekannt ist
Mario
  Mit Zitat antworten Zitat
Benutzerbild von mirage228
mirage228

Registriert seit: 23. Mär 2003
Ort: Münster
3.750 Beiträge
 
Delphi 2010 Professional
 
#5

Re: CPU- und RAM Auslastung auch unter win 9x?

  Alt 27. Jul 2003, 17:15
var
MS: TMemoryStatus;
begin
try
GlobalMemoryStatus(MS);
Memory.Caption := 'Verfügbarer physikalischer Speicher: '+FormatFloat('#,###" KB"', MS.dwTotalPhys / 1024);
UsedMem.Caption := 'Speicher in Benutzung: '+Format('%d %%', [MS.dwMemoryLoad]);
finally
end;
end;


David F.
  Mit Zitat antworten Zitat
Benutzerbild von Pseudemys Nelsoni
Pseudemys Nelsoni

Registriert seit: 24. Dez 2002
Ort: Hamburg-Harburg
3.551 Beiträge
 
#6

Re: CPU- und RAM Auslastung auch unter win 9x?

  Alt 27. Jul 2003, 17:21
hoi

danke, das funzt super

kannst du mir noch sagen wie diese zeile funzt?...

UsedMem.Caption := 'Speicher in Benutzung: '+Format('%d %%', [MS.dwMemoryLoad]); was ist %d % % etc?

wenn man es in einaer statusbar hätte, müsste man es mit einem timer immer aktualisieren?
Mario
  Mit Zitat antworten Zitat
Benutzerbild von mirage228
mirage228

Registriert seit: 23. Mär 2003
Ort: Münster
3.750 Beiträge
 
Delphi 2010 Professional
 
#7

Re: CPU- und RAM Auslastung auch unter win 9x?

  Alt 27. Jul 2003, 17:27
Zitat von silent:
hoi

danke, das funzt super

kannst du mir noch sagen wie diese zeile funzt?...

UsedMem.Caption := 'Speicher in Benutzung: '+Format('%d %%', [MS.dwMemoryLoad]); was ist %d % % etc?

wenn man es in einaer statusbar hätte, müsste man es mit einem timer immer aktualisieren?
%d ist für Integer/Zahl und die "%%" stehen für ein "%"!

mfG
mirage228
David F.
  Mit Zitat antworten Zitat
Benutzerbild von Pseudemys Nelsoni
Pseudemys Nelsoni

Registriert seit: 24. Dez 2002
Ort: Hamburg-Harburg
3.551 Beiträge
 
#8

Re: CPU- und RAM Auslastung auch unter win 9x?

  Alt 27. Jul 2003, 17:34
danke
Mario
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:13 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz