IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage Delphi Discussion :

Commande vitesse RAM


Sujet :

Langage Delphi

  1. #1
    Membre du Club
    Homme Profil pro
    Développeur Delphi
    Inscrit en
    Janvier 2019
    Messages
    182
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Loire (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Janvier 2019
    Messages : 182
    Points : 42
    Points
    42
    Par défaut Commande vitesse RAM
    Bonjour à tous,
    Je n'ai rien trouvé permettant en, delphi, de connaître la vitesse en ms de la ram de ma machine. En fait, je peux avoir à connaître cette info sur différentes machines.
    Si quelqu'un connaissait le moyen d'obtenir cette info, je le remercierais 1000 fois de me le faire connaître.
    Pas changer assiettes pour fromage.

  2. #2
    Expert éminent sénior
    Avatar de ShaiLeTroll
    Homme Profil pro
    Développeur C++\Delphi
    Inscrit en
    Juillet 2006
    Messages
    13 459
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Développeur C++\Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2006
    Messages : 13 459
    Points : 24 873
    Points
    24 873
    Par défaut
    vitesse en ms de la ram
    Ce n'est pas une vitesse mais plutôt un débit nommé "Taux de transfert" exprimé en "octet par seconde" (même plutôt Mo/s)
    C'est issu d'un calcul en fonction de la fréquence (par exemple 400Mhz) x son facteur multiplicateur (1 .. 8) x la taille du bus (32/64bits) x simple/double débit (x1/x2)
    Aide via F1 - FAQ - Guide du développeur Delphi devant un problème - Pensez-y !
    Attention Troll Méchant !
    "Quand un homme a faim, mieux vaut lui apprendre à pêcher que de lui donner un poisson" Confucius
    Mieux vaut se taire et paraître idiot, Que l'ouvrir et de le confirmer !
    L'ignorance n'excuse pas la médiocrité !

    L'expérience, c'est le nom que chacun donne à ses erreurs. (Oscar Wilde)
    Il faut avoir le courage de se tromper et d'apprendre de ses erreurs

  3. #3
    Membre du Club
    Homme Profil pro
    Développeur Delphi
    Inscrit en
    Janvier 2019
    Messages
    182
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Loire (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Janvier 2019
    Messages : 182
    Points : 42
    Points
    42
    Par défaut
    Merci pour ces explications détaillées, ShaiLeTroll.
    Est-il possible de récupérer cette info via Delphi ?
    Pas changer assiettes pour fromage.

  4. #4
    Modérateur
    Avatar de tourlourou
    Homme Profil pro
    Biologiste ; Progr(amateur)
    Inscrit en
    Mars 2005
    Messages
    3 858
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 61
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Biologiste ; Progr(amateur)

    Informations forums :
    Inscription : Mars 2005
    Messages : 3 858
    Points : 11 301
    Points
    11 301
    Billets dans le blog
    6
    Par défaut
    Peut-être par les WMI ?
    Delphi 5 Pro - Delphi 11.3 Alexandria Community Edition - CodeTyphon 6.90 sous Windows 10 ; CT 6.40 sous Ubuntu 18.04 (VM)
    . Ignorer la FAQ Delphi et les Cours et Tutoriels Delphi nuit gravement à notre code !

  5. #5
    Membre du Club
    Homme Profil pro
    Développeur Delphi
    Inscrit en
    Janvier 2019
    Messages
    182
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Loire (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Janvier 2019
    Messages : 182
    Points : 42
    Points
    42
    Par défaut
    Ah ouai tiens, en tout cas ça a l'air très intéressant.
    Pas changer assiettes pour fromage.

  6. #6
    Rédacteur/Modérateur

    Avatar de SergioMaster
    Homme Profil pro
    Développeur informatique retraité
    Inscrit en
    Janvier 2007
    Messages
    15 043
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 67
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur informatique retraité
    Secteur : Industrie

    Informations forums :
    Inscription : Janvier 2007
    Messages : 15 043
    Points : 40 957
    Points
    40 957
    Billets dans le blog
    62
    Par défaut
    Je dirais comme tourlourou avec en plus une indication : root\CIMV2\win32_Processor

    et voilà déjà un code d'un programme console (merci wmi code creator)
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    //-----------------------------------------------------------------------------------------------------
    //     This code was generated by the Wmi Delphi Code Creator (WDCC) Version 1.9.9.350
    //     http://code.google.com/p/wmi-delphi-code-creator/
    //     Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/
    //     Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 
    //----------------------------------------------------------------------------------------------------- 
    //
    //     LIABILITY DISCLAIMER
    //     THIS GENERATED CODE IS DISTRIBUTED "AS IS". NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED.
    //     YOU USE IT AT YOUR OWN RISK. THE AUTHOR NOT WILL BE LIABLE FOR DATA LOSS,
    //     DAMAGES AND LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS CODE.
    //
    //----------------------------------------------------------------------------------------------------
    program GetWMI_Info;
     
    {$APPTYPE CONSOLE}
     
    uses
      SysUtils,
      ActiveX,
      ComObj,
      Variants;
     
     
     
    // La classe Win32_Processor représente un périphérique qui est capable 
    // d'interpréter une séquence d'instructions machine sur un système Win32. Sur un 
    // ordinateur multiprocesseurs, il existe une instance de cette classe pour chaque 
    // processeur.
     
    procedure  GetWin32_ProcessorInfo;
    const
      WbemUser            ='';
      WbemPassword        ='';
      WbemComputer        ='localhost';
      wbemFlagForwardOnly = $00000020;
    var
      FSWbemLocator : OLEVariant;
      FWMIService   : OLEVariant;
      FWbemObjectSet: OLEVariant;
      FWbemObject   : OLEVariant;
      oEnum         : IEnumvariant;
      iValue        : LongWord;
    begin;
      FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
      FWMIService   := FSWbemLocator.ConnectServer(WbemComputer, 'root\CIMV2', WbemUser, WbemPassword);
      FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM Win32_Processor','WQL',wbemFlagForwardOnly);
      oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
      while oEnum.Next(1, FWbemObject, iValue) = 0 do
      begin
        Writeln(Format('AddressWidth                   %d',[Integer(FWbemObject.AddressWidth)]));// Uint16
        Writeln(Format('Architecture                   %d',[Integer(FWbemObject.Architecture)]));// Uint16
        Writeln(Format('Availability                   %d',[Integer(FWbemObject.Availability)]));// Uint16
        Writeln(Format('Caption                        %s',[String(FWbemObject.Caption)]));// String
        Writeln(Format('ConfigManagerErrorCode         %d',[Integer(FWbemObject.ConfigManagerErrorCode)]));// Uint32
        Writeln(Format('ConfigManagerUserConfig        %s',[String(FWbemObject.ConfigManagerUserConfig)]));// Boolean
        Writeln(Format('CpuStatus                      %d',[Integer(FWbemObject.CpuStatus)]));// Uint16
        Writeln(Format('CreationClassName              %s',[String(FWbemObject.CreationClassName)]));// String
        Writeln(Format('CurrentClockSpeed              %d',[Integer(FWbemObject.CurrentClockSpeed)]));// Uint32
        Writeln(Format('CurrentVoltage                 %d',[Integer(FWbemObject.CurrentVoltage)]));// Uint16
        Writeln(Format('DataWidth                      %d',[Integer(FWbemObject.DataWidth)]));// Uint16
        Writeln(Format('Description                    %s',[String(FWbemObject.Description)]));// String
        Writeln(Format('DeviceID                       %s',[String(FWbemObject.DeviceID)]));// String
        Writeln(Format('ErrorCleared                   %s',[String(FWbemObject.ErrorCleared)]));// Boolean
        Writeln(Format('ErrorDescription               %s',[String(FWbemObject.ErrorDescription)]));// String
        Writeln(Format('ExtClock                       %d',[Integer(FWbemObject.ExtClock)]));// Uint32
        Writeln(Format('Family                         %d',[Integer(FWbemObject.Family)]));// Uint16
        Writeln(Format('InstallDate                    %s',[String(FWbemObject.InstallDate)]));// Datetime
        Writeln(Format('L2CacheSize                    %d',[Integer(FWbemObject.L2CacheSize)]));// Uint32
        Writeln(Format('L2CacheSpeed                   %d',[Integer(FWbemObject.L2CacheSpeed)]));// Uint32
        Writeln(Format('L3CacheSize                    %d',[Integer(FWbemObject.L3CacheSize)]));// Uint32
        Writeln(Format('L3CacheSpeed                   %d',[Integer(FWbemObject.L3CacheSpeed)]));// Uint32
        Writeln(Format('LastErrorCode                  %d',[Integer(FWbemObject.LastErrorCode)]));// Uint32
        Writeln(Format('Level                          %d',[Integer(FWbemObject.Level)]));// Uint16
        Writeln(Format('LoadPercentage                 %d',[Integer(FWbemObject.LoadPercentage)]));// Uint16
        Writeln(Format('Manufacturer                   %s',[String(FWbemObject.Manufacturer)]));// String
        Writeln(Format('MaxClockSpeed                  %d',[Integer(FWbemObject.MaxClockSpeed)]));// Uint32
        Writeln(Format('Name                           %s',[String(FWbemObject.Name)]));// String
        Writeln(Format('NumberOfCores                  %d',[Integer(FWbemObject.NumberOfCores)]));// Uint32
        Writeln(Format('NumberOfLogicalProcessors      %d',[Integer(FWbemObject.NumberOfLogicalProcessors)]));// Uint32
        Writeln(Format('OtherFamilyDescription         %s',[String(FWbemObject.OtherFamilyDescription)]));// String
        Writeln(Format('PNPDeviceID                    %s',[String(FWbemObject.PNPDeviceID)]));// String
        Writeln(Format('PowerManagementCapabilities    %d',[Integer(FWbemObject.PowerManagementCapabilities)]));// Array of Uint16
        Writeln(Format('PowerManagementSupported       %s',[String(FWbemObject.PowerManagementSupported)]));// Boolean
        Writeln(Format('ProcessorId                    %s',[String(FWbemObject.ProcessorId)]));// String
        Writeln(Format('ProcessorType                  %d',[Integer(FWbemObject.ProcessorType)]));// Uint16
        Writeln(Format('Revision                       %d',[Integer(FWbemObject.Revision)]));// Uint16
        Writeln(Format('Role                           %s',[String(FWbemObject.Role)]));// String
        Writeln(Format('SocketDesignation              %s',[String(FWbemObject.SocketDesignation)]));// String
        Writeln(Format('Status                         %s',[String(FWbemObject.Status)]));// String
        Writeln(Format('StatusInfo                     %d',[Integer(FWbemObject.StatusInfo)]));// Uint16
        Writeln(Format('Stepping                       %s',[String(FWbemObject.Stepping)]));// String
        Writeln(Format('SystemCreationClassName        %s',[String(FWbemObject.SystemCreationClassName)]));// String
        Writeln(Format('SystemName                     %s',[String(FWbemObject.SystemName)]));// String
        Writeln(Format('UniqueId                       %s',[String(FWbemObject.UniqueId)]));// String
        Writeln(Format('UpgradeMethod                  %d',[Integer(FWbemObject.UpgradeMethod)]));// Uint16
        Writeln(Format('Version                        %s',[String(FWbemObject.Version)]));// String
        Writeln(Format('VoltageCaps                    %d',[Integer(FWbemObject.VoltageCaps)]));// Uint32
     
        Writeln('');
        FWbemObject:=Unassigned;
      end;
    end;
     
     
    begin
     try
        CoInitialize(nil);
        try
          GetWin32_ProcessorInfo;
        finally
          CoUninitialize;
        end;
     except
        on E:EOleException do
            Writeln(Format('EOleException %s %x', [E.Message,E.ErrorCode])); 
        on E:Exception do
            Writeln(E.Classname, ':', E.Message);
     end;
     Writeln('Press Enter to exit');
     Readln;      
    end.
    il y a certainement beaucoup d'infos inutiles à faire : le tri des besoins.

    [Edit] OOPS j'ai sorti le processeur pas la RAM, la WMI serait plutôt root\cimv2\win32_physicalMemory
    bon, je vais pas ressortir le programme généré autant téléchargé le programme toujours utile http://code.google.com/p/wmi-delphi-code-creator/
    MVP Embarcadero
    Delphi installés : D3,D7,D2010,XE4,XE7,D10 (Rio, Sidney), D11 (Alexandria), D12 (Athènes)
    SGBD : Firebird 2.5, 3, SQLite
    générateurs États : FastReport, Rave, QuickReport
    OS : Window Vista, Windows 10, Windows 11, Ubuntu, Androïd

  7. #7
    Expert éminent sénior
    Avatar de ShaiLeTroll
    Homme Profil pro
    Développeur C++\Delphi
    Inscrit en
    Juillet 2006
    Messages
    13 459
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Développeur C++\Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2006
    Messages : 13 459
    Points : 24 873
    Points
    24 873
    Par défaut
    Aussi très basique un script
    Code cmd : Sélectionner tout - Visualiser dans une fenêtre à part
    wmic MemoryChip get Speed, DataWidth
    Speed of the physical memory—in nanoseconds ... ouais ça ressemble plus à la fréquence avec un chiffre de 2133 qui correspond pile au 2133Mhz de la fiche technique du Dell OptiPlex 7440 All-In-One au bureau
    Mémoire SDRAM DDR4 bicanale non ECC à 2133 MHz
    Aide via F1 - FAQ - Guide du développeur Delphi devant un problème - Pensez-y !
    Attention Troll Méchant !
    "Quand un homme a faim, mieux vaut lui apprendre à pêcher que de lui donner un poisson" Confucius
    Mieux vaut se taire et paraître idiot, Que l'ouvrir et de le confirmer !
    L'ignorance n'excuse pas la médiocrité !

    L'expérience, c'est le nom que chacun donne à ses erreurs. (Oscar Wilde)
    Il faut avoir le courage de se tromper et d'apprendre de ses erreurs

  8. #8
    Membre du Club
    Homme Profil pro
    Développeur Delphi
    Inscrit en
    Janvier 2019
    Messages
    182
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Loire (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Janvier 2019
    Messages : 182
    Points : 42
    Points
    42
    Par défaut
    Merci ShaiLeTroll, c'est exactement ce que je cherchais, même si ça ne résout pas mon problème
    Pas changer assiettes pour fromage.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [RAM] Référence vitesse RAM
    Par curt dans le forum Composants
    Réponses: 2
    Dernier message: 07/08/2011, 19h21
  2. vitesse RAM et processeur
    Par Titum dans le forum Composants
    Réponses: 6
    Dernier message: 02/03/2011, 10h13
  3. Intérêt de la vitesse pour de la RAM
    Par franculo_caoulene dans le forum Composants
    Réponses: 8
    Dernier message: 25/06/2006, 23h06
  4. Trouver la vitesse du processeur et la ram installe sous lin
    Par DiGiTAL_MiDWAY dans le forum Général Python
    Réponses: 4
    Dernier message: 12/09/2005, 17h28
  5. Vitesse du CPU, quantité de RAM... en C
    Par dclink dans le forum C
    Réponses: 4
    Dernier message: 07/07/2003, 20h48

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo