Page 1 sur 1
obtenir %cpu et mémoire utilisés par IBM Notes

Publié:
15 Mai 2014 à 17:46
par sedki
Bonjour,
Existe-t-il une fonction dans l'api C Notes ou un truc qui nous permet de donner % cpu, mémoire et mémoire virtuelle utilisés par IBM Notes/domino?
Merci d'avance.
Re: obtenir %cpu et mémoire utilisés par IBM Notes

Publié:
15 Mai 2014 à 20:19
par roubech
Client ou serveur ?
dans le client d'adm il y a un onglet stats pour afficher plein de données sur les serveurs
mais en général on préfère utiliser les mêmes outils de supervision que sur tous les autres serveurs du parc
Re: obtenir %cpu et mémoire utilisés par IBM Notes

Publié:
15 Mai 2014 à 23:58
par sedki
merci de me répondre roubech.
Pour le moment je travaille sur le client et je veux obtenir ces informations programmatically. en fait, je suis en train de développer un outil de supervision pour l'application IBM Notes et je veux contrôler l'utilisation de mémoire et de cpu.
Re: obtenir %cpu et mémoire utilisés par IBM Notes

Publié:
16 Mai 2014 à 07:59
par Jérôme Deniau
En attaquant l'OS (impératif pour le CPU) faire comme pexplorer de Microsoft pour la partie Windows.
Re: obtenir %cpu et mémoire utilisés par IBM Notes

Publié:
16 Mai 2014 à 08:27
par Michael DELIQUE
salut regarde si ça t'aide pas
- Code : Tout sélectionner
Public Function WindowsOSInfo() As Variant
Dim lstRetour List As String
Dim vrObject As Variant
Dim vrValue As Variant
Dim nbOk As Boolean
Const Computer = "."
On Error GoTo ErreurHandle
lstRetour("BOOTDEVICE") = ""
lstRetour("BUILDNUMBER") = ""
lstRetour("BUILDTYPE") = ""
lstRetour("CAPTION") = ""
lstRetour("CODESET") = ""
lstRetour("COUNTRYCODE") = ""
lstRetour("COUNTRYNAME") = ""
lstRetour("CREATIONCLASSNAME") = ""
lstRetour("CSCREATIONCLASSNAME") = ""
lstRetour("CSDVERSION") = ""
lstRetour("CSNAME") = ""
lstRetour("CURRENTTIMEZONE") = ""
lstRetour("DATAEXECUTIONPREVENTION_AVAILABLE") = ""
rem lstRetour("DATAEXECUTIONPREVENTION_32BITAPPLICATION") = ""
lstRetour("DATAEXECUTIONPREVENTION_DRIVERS") = ""
lstRetour("DATAEXECUTIONPREVENTION_SUPPORTPOLICY") = ""
lstRetour("DATAEXECUTIONPREVENTION_SUPPORTPOLICYNAME") = ""
lstRetour("DEBUG") = ""
lstRetour("DESCRIPTION") = ""
lstRetour("DISTRIBUTED") = ""
lstRetour("ENCRYPTIONLEVEL") = ""
lstRetour("FOREGROUNDAPPLICATIONBOOST") = ""
lstRetour("FOREGROUNDAPPLICATIONBOOSTNAME") = ""
lstRetour("FREEPHYSICALMEMORY") = ""
lstRetour("FREEPHYSICALMEMORYMO") = ""
lstRetour("FREEPHYSICALMEMORYGO") = ""
lstRetour("FREEPHYSICALMEMORYTO") = ""
lstRetour("FREESPACEINPAGINGFILES") = ""
lstRetour("FREESPACEINPAGINGFILESMO") = ""
lstRetour("FREESPACEINPAGINGFILESGO") = ""
lstRetour("FREESPACEINPAGINGFILESTO") = ""
lstRetour("FREEVIRTUALMEMORY") = ""
lstRetour("FREEVIRTUALMEMORYMO") = ""
lstRetour("FREEVIRTUALMEMORYGO") = ""
lstRetour("FREEVIRTUALMEMORYTO") = ""
lstRetour("INSTALLDATE") = ""
lstRetour("INSTALLDATECONVERT") = ""
lstRetour("LARGESYSTEMCACHE") = ""
lstRetour("LARGESYSTEMCACHENAME") = ""
lstRetour("LASTBOOTUPTIME") = ""
lstRetour("LASTBOOTUPTIMECONVERT") = ""
lstRetour("LOCALDATETIME") = ""
lstRetour("LOCALDATETIMECONVERT") = ""
lstRetour("LOCALE") = ""
lstRetour("MANUFACTURER") = ""
lstRetour("MAXNUMBEROFPROCESSES") = ""
lstRetour("MAXPROCESSMEMORYSIZE") = ""
lstRetour("MAXPROCESSMEMORYSIZEMO") = ""
lstRetour("MAXPROCESSMEMORYSIZEGO") = ""
lstRetour("MAXPROCESSMEMORYSIZETO") = ""
lstRetour("MUILANGUAGES") = ""
lstRetour("NAME") = ""
lstRetour("NUMBEROFLICENSEDUSERS") = ""
lstRetour("NUMBEROFPROCESSES") = ""
lstRetour("NUMBERSOFUSERS") = ""
lstRetour("OPERATINGSYSTEMSKU") = ""
lstRetour("OPERATINGSYSTEMSKUNAME") = ""
lstRetour("ORGANIZATION") = ""
lstRetour("OSARCHITECTURE") = ""
lstRetour("OSLANGUAGE") = ""
lstRetour("OSLANGUAGENAME") = ""
lstRetour("OSPRODUCTSUITE") = ""
lstRetour("OSPRODUCTSUITENAME") = ""
lstRetour("OSTYPE") = ""
lstRetour("OSTYPENAME") = ""
lstRetour("OTHERTYPEDESCRIPTION") = ""
lstRetour("PAEENABLED") = ""
lstRetour("PLUSPRODUCTID") = ""
lstRetour("PLUSVERSIONNUMBER") = ""
lstRetour("PRIMARY") = ""
lstRetour("PRODUCTTYPE") = ""
lstRetour("PRODUCTTYPENAME") = ""
lstRetour("REGISTEREDUSER") = ""
lstRetour("SERIALNUMBER") = ""
lstRetour("SERVICEPACKMAJORVERSION") = ""
lstRetour("SERVICEPACKMINORVERSION") = ""
lstRetour("SIZESTOREDINPAGINGFILES") = ""
lstRetour("SIZESTOREDINPAGINGFILESMO") = ""
lstRetour("SIZESTOREDINPAGINGFILESGO") = ""
lstRetour("SIZESTOREDINPAGINGFILESTO") = ""
lstRetour("STATUS") = ""
lstRetour("SUITEMASK") = ""
lstRetour("SUITEMASKNAME") = ""
lstRetour("SYSTEMDEVICE") = ""
lstRetour("SYSTEMDIRECTORY") = ""
lstRetour("SYSTEMDRIVE") = ""
lstRetour("TOTALSWAPSPACESIZE") = ""
lstRetour("TOTALSWAPSPACESIZEMO") = ""
lstRetour("TOTALSWAPSPACESIZEGO") = ""
lstRetour("TOTALSWAPSPACESIZETO") = ""
lstRetour("TOTALVIRTUALMEMORYSIZE") = ""
lstRetour("TOTALVIRTUALMEMORYSIZEMO") = ""
lstRetour("TOTALVIRTUALMEMORYSIZEGO") = ""
lstRetour("TOTALVIRTUALMEMORYSIZETO") = ""
lstRetour("TOTALVISIBLEMEMORYSIZE") = ""
lstRetour("TOTALVISIBLEMEMORYSIZEMO") = ""
lstRetour("TOTALVISIBLEMEMORYSIZEGO") = ""
lstRetour("TOTALVISIBLEMEMORYSIZETO") = ""
lstRetour("VERSION") = ""
lstRetour("WINDOWSDIRECTORY") = ""
Set vrObject = GetObject("WinMgmts:{impersonationLevel=impersonate, authenticationLevel=connect, (security)}!\\" +Computer + "\root\CIMv2").ExecQuery("Select * from Win32_OperatingSystem")
If IsNull(vrObject) = True Then
Error 9999,"vrObject is Null"
Exit Function
End If
nbOk = False
ForAll value In vrObject
nbOk = True
On Error Resume Next
If IsNull(value) = False Then
If IsNull(value.BootDevice) = False Then
lstRetour("BOOTDEVICE") = CStr(value.BootDevice)
End If
If IsNull(value.BuildNumber) = False Then
lstRetour("BUILDNUMBER") = CStr(value.BuildNumber)
End If
If IsNull(value.BuildType) = False Then
lstRetour("BUILDTYPE") = CStr(value.BuildType)
End If
If IsNull(value.Caption) = False Then
lstRetour("CAPTION") = CStr(value.Caption)
End If
If IsNull(value.CodeSet) = False Then
lstRetour("CODESET") = CStr(value.CodeSet)
End If
If IsNull(value.CountryCode) = False Then
lstRetour("COUNTRYCODE") = CStr(value.CountryCode)
End If
If IsNull(value.CreationClassName) = False Then
lstRetour("CREATIONCLASSNAME") = CStr(value.CreationClassName)
End If
If IsNull(value.CSCreationClassName) = False Then
lstRetour("CSCREATIONCLASSNAME") = CStr(value.CSCreationClassName)
End If
If IsNull(value.CSDVersion) = False Then
lstRetour("CSDVERSION") = CStr(value.CSDVersion)
End If
If IsNull(value.CSName) = False Then
lstRetour("CSNAME") = CStr(value.CSName)
End If
If IsNull(value.CurrentTimeZone) = False Then
lstRetour("CURRENTTIMEZONE") = CStr(value.CurrentTimeZone)
End If
If IsNull(value.DataExecutionPrevention_Available) = False Then
lstRetour("DATAEXECUTIONPREVENTION_AVAILABLE") = CStr(value.DataExecutionPrevention_Available)
End If
%rem
If IsNull(value.DataExecutionPrevention_32BitApplications) = False Then
lstRetour("DATAEXECUTIONPREVENTION_32BITAPPLICATION") = CStr(value.DataExecutionPrevention_32BitApplications)
End If
%end rem
If IsNull(value.DataExecutionPrevention_Drivers) = False Then
lstRetour("DATAEXECUTIONPREVENTION_DRIVERS") = CStr(value.DataExecutionPrevention_Drivers)
End If
If IsNull(value.DataExecutionPrevention_SupportPolicy) = False Then
lstRetour("DATAEXECUTIONPREVENTION_SUPPORTPOLICY") = CStr(value.DataExecutionPrevention_SupportPolicy)
End If
If IsNull(value.Debug) = False Then
lstRetour("DEBUG") = CStr(value.Debug)
End If
If IsNull(value.Description) = False Then
lstRetour("DESCRIPTION") = CStr(value.Description)
End If
If IsNull(value.Distributed) = False Then
lstRetour("DISTRIBUTED") = CStr(value.Distributed)
End If
If IsNull(value.EncryptionLevel) = False Then
lstRetour("ENCRYPTIONLEVEL") = CStr(value.EncryptionLevel)
End If
If IsNull(value.ForegroundApplicationBoost) = False Then
lstRetour("FOREGROUNDAPPLICATIONBOOST") = CStr(value.ForegroundApplicationBoost)
End If
If IsNull(value.FreePhysicalMemory) = False Then
lstRetour("FREEPHYSICALMEMORY") = CStr(value.FreePhysicalMemory)
If Trim(CStr(value.FreePhysicalMemory)) <> "" Then
lstRetour("FREEPHYSICALMEMORYMO") = CStr(Format((value.FreePhysicalMemory/1024/1024),"FIXED"))
End If
If Trim(CStr(value.FreePhysicalMemory)) <> "" Then
lstRetour("FREEPHYSICALMEMORYGO") = CStr(Format((value.FreePhysicalMemory/1024/1024/1024),"FIXED"))
End If
If Trim(CStr(value.FreePhysicalMemory)) <> "" Then
lstRetour("FREEPHYSICALMEMORYTO") = CStr(Format((value.FreePhysicalMemory/1024/1024/1024/1240),"FIXED"))
End If
End If
If IsNull(value.FreeSpaceInPagingFiles) = False Then
lstRetour("FREESPACEINPAGINGFILES") = CStr(value.FreeSpaceInPagingFiles)
If Trim(CStr(value.FreeSpaceInPagingFiles)) <> "" Then
lstRetour("FREESPACEINPAGINGFILESMO") = CStr(Format((value.FreeSpaceInPagingFiles/1024/1024),"FIXED"))
End If
If Trim(CStr(value.FreeSpaceInPagingFiles)) <> "" Then
lstRetour("FREESPACEINPAGINGFILESGO") = CStr(Format((value.FreeSpaceInPagingFiles/1024/1024/1024),"FIXED"))
End If
If Trim(CStr(value.FreeSpaceInPagingFiles)) <> "" Then
lstRetour("FREESPACEINPAGINGFILESTO") = CStr(Format((value.FreeSpaceInPagingFiles/1024/1024/1024/1024),"FIXED"))
End If
End If
If IsNull(value.FreeVirtualMemory) = False Then
lstRetour("FREEVIRTUALMEMORY") = CStr(value.FreeVirtualMemory)
If Trim(CStr(value.FreeVirtualMemory)) <> "" Then
lstRetour("FREEVIRTUALMEMORYMO") = CStr(Format((value.FreeVirtualMemory/1024/1024),"FIXED"))
End If
If Trim(CStr(value.FreeVirtualMemory)) <> "" Then
lstRetour("FREEVIRTUALMEMORYGO") = CStr(Format((value.FreeVirtualMemory/1024/1024/1024),"FIXED"))
End If
If Trim(CStr(value.FreeVirtualMemory)) <> "" Then
lstRetour("FREEVIRTUALMEMORYTO") = CStr(Format((value.FreeVirtualMemory/1024/1024/1024/1024),"FIXED"))
End If
End If
If IsNull(value.InstallDate) = False Then
If Trim(CStr(value.InstallDate)) <> "" Then
lstRetour("INSTALLDATE") = CStr(value.InstallDate)
lstRetour("INSTALLDATECONVERT") = WindowsDateConvert(value.InstallDate)
End If
End If
If IsNull(value.LargeSystemCache) = False Then
lstRetour("LARGESYSTEMCACHE") = CStr(value.LargeSystemCache)
End If
If IsNull(value.LastBootUpTime) = False Then
If Trim(CStr(value.LastBootUpTime)) <> "" Then
lstRetour("LASTBOOTUPTIME") = CStr(value.LastBootUpTime)
lstRetour("LASTBOOTUPTIMECONVERT") = WindowsDateConvert(value.LastBootUpTime)
End If
End If
If IsNull(value.LocalDateTime) = False Then
If Trim(CStr(value.LocalDateTime)) <> "" Then
lstRetour("LOCALDATETIME") = CStr(value.LocalDateTime)
lstRetour("LOCALDATETIMECONVERT") = WindowsDateConvert(value.LocalDateTime)
End If
End If
If IsNull(value.Locale) = False Then
lstRetour("LOCALE") = CStr(value.Locale)
End If
If IsNull(value.Manufacturer) = False Then
lstRetour("MANUFACTURER") = CStr(value.Manufacturer)
End If
If IsNull(value.MaxNumberOfProcesses) = False Then
lstRetour("MAXNUMBEROFPROCESSES") = CStr(value.MaxNumberOfProcesses)
End If
If IsNull(value.MaxProcessMemorySize) = False Then
lstRetour("MAXPROCESSMEMORYSIZE") = CStr(value.MaxProcessMemorySize)
If Trim(CStr(value.MaxProcessMemorySize)) <> "" Then
lstRetour("MAXPROCESSMEMORYSIZEMO") = CStr(Format((value.MaxProcessMemorySize/1024/1024),"FIXED"))
End If
If Trim(CStr(value.MaxProcessMemorySize)) <> "" Then
lstRetour("MAXPROCESSMEMORYSIZEGO") = CStr(Format((value.MaxProcessMemorySize/1024/1024/1024),"FIXED"))
End If
If Trim(CStr(value.MaxProcessMemorySize)) <> "" Then
lstRetour("MAXPROCESSMEMORYSIZETO") = CStr(Format((value.MaxProcessMemorySize/1024/1024/1024/1024),"FIXED"))
End If
End If
If IsNull(value.MUILanguages) = False Then
lstRetour("MUILANGUAGES") = CStr(Join(value.MUILanguages,","))
End If
If IsNull(value.Name) = False Then
lstRetour("NAME") = CStr(value.Name)
End If
If IsNull(value.NumberOfLicensedUsers) = False Then
lstRetour("NUMBEROFLICENSEDUSERS") = CStr(value.NumberOfLicensedUsers)
End If
If IsNull(value.NumberOfProcesses) = False Then
lstRetour("NUMBEROFPROCESSES") = CStr(value.NumberOfProcesses)
End If
If IsNull(value.NumberOfUsers) = False Then
lstRetour("NUMBERSOFUSERS") = CStr(value.NumberOfUsers)
End If
If IsNull(value.OperatingSystemSKU) = False Then
lstRetour("OPERATINGSYSTEMSKU") = CStr(value.OperatingSystemSKU)
End If
If IsNull(value.Organization) = False Then
lstRetour("ORGANIZATION") = CStr(value.Organization)
End If
If IsNull(value.OSArchitecture) = False Then
lstRetour("OSARCHITECTURE") = CStr(value.OSArchitecture)
End If
If IsNull(value.OSLanguage) = False Then
lstRetour("OSLANGUAGE") = CStr(value.OSLanguage)
End If
If IsNull(value.OSProductSuite) = False Then
lstRetour("OSPRODUCTSUITE") = CStr(value.OSProductSuite)
End If
If IsNull(value.OSType) = False Then
lstRetour("OSTYPE") = CStr(value.OSType)
End If
If IsNull(value.OtherTypeDescription) = False Then
lstRetour("OTHERTYPEDESCRIPTION") = CStr(value.OtherTypeDescription)
End If
If IsNull(value.PAEEnabled) = False Then
lstRetour("PAEENABLED") = CStr(value.PAEEnabled)
End If
If IsNull(value.PlusProductID) = False Then
lstRetour("PLUSPRODUCTID") = CStr(value.PlusProductID)
End If
If IsNull(value.PlusVersionNumber) = False Then
lstRetour("PLUSVERSIONNUMBER") = CStr(value.PlusVersionNumber)
End If
If IsNull(value.Primary) = False Then
lstRetour("PRIMARY") = CStr(value.Primary)
End If
If IsNull(value.ProductType) = False Then
lstRetour("PRODUCTTYPE") = CStr(value.ProductType)
End If
If IsNull(value.RegisteredUser) = False Then
lstRetour("REGISTEREDUSER") = CStr(value.RegisteredUser)
End If
If IsNull(value.SerialNumber) = False Then
lstRetour("SERIALNUMBER") = CStr(value.SerialNumber)
End If
If IsNull(value.ServicePackMajorVersion) = False Then
lstRetour("SERVICEPACKMAJORVERSION") = CStr(value.ServicePackMajorVersion)
End If
If IsNull(value.ServicePackMajorVersion) = False Then
lstRetour("SERVICEPACKMINORVERSION") = CStr(value.ServicePackMinorVersion)
End If
If IsNull(value.SizeStoredInPagingFiles) = False Then
lstRetour("SIZESTOREDINPAGINGFILES") = CStr(value.SizeStoredInPagingFiles)
If Trim(CStr(value.SizeStoredInPagingFiles)) <> "" Then
lstRetour("SIZESTOREDINPAGINGFILESMO") = CStr(Format((value.SizeStoredInPagingFiles/1024/1024),"FIXED"))
End If
If Trim(CStr(value.SizeStoredInPagingFiles)) <> "" Then
lstRetour("SIZESTOREDINPAGINGFILESGO") = CStr(Format((value.SizeStoredInPagingFiles/1024/1024/1024),"FIXED"))
End If
If Trim(CStr(value.SizeStoredInPagingFiles)) <> "" Then
lstRetour("SIZESTOREDINPAGINGFILESTO") = CStr(Format((value.SizeStoredInPagingFiles/1024/1024/1024/1024),"FIXED"))
End If
End If
If IsNull(value.Status) = False Then
lstRetour("STATUS") = CStr(value.Status)
End If
If IsNull(value.SuiteMask) = False Then
lstRetour("SUITEMASK") = CStr(value.SuiteMask)
End If
If IsNull(value.SystemDevice) = False Then
lstRetour("SYSTEMDEVICE") = CStr(value.SystemDevice)
End If
If IsNull(value.SystemDirectory) = False Then
lstRetour("SYSTEMDIRECTORY") = CStr(value.SystemDirectory)
End If
If IsNull(value.SystemDrive) = False Then
lstRetour("SYSTEMDRIVE") = CStr(value.SystemDrive)
End If
If IsNull(value.TotalSwapSpaceSize) = False Then
lstRetour("TOTALSWAPSPACESIZE") = CStr(value.TotalSwapSpaceSize)
End If
If IsNull(value.TotalSwapSpaceSize) = False Then
If Trim(CStr(value.TotalSwapSpaceSize)) <> "" Then
lstRetour("TOTALSWAPSPACESIZEMO") = CStr(Format((value.TotalSwapSpaceSize/1024/1024),"FIXED"))
End If
If Trim(CStr(value.TotalSwapSpaceSize)) <> "" Then
lstRetour("TOTALSWAPSPACESIZEGO") = CStr(Format((value.TotalSwapSpaceSize/1024/1024/1024),"FIXED"))
End If
If Trim(CStr(value.TotalSwapSpaceSize)) <> "" Then
lstRetour("TOTALSWAPSPACESIZETO") = CStr(Format((value.TotalSwapSpaceSize/1024/1024/1024/1024),"FIXED"))
End If
End If
If IsNull(value.TotalVirtualMemorySize) = False Then
lstRetour("TOTALVIRTUALMEMORYSIZE") = CStr(value.TotalVirtualMemorySize)
If Trim(CStr(value.TotalVirtualMemorySize)) <> "" Then
lstRetour("TOTALVIRTUALMEMORYSIZEMO") = CStr(Format((value.TotalVirtualMemorySize/1024/1024),"FIXED"))
End If
If Trim(CStr(value.TotalVirtualMemorySize)) <> "" Then
lstRetour("TOTALVIRTUALMEMORYSIZEGO") = CStr(Format((value.TotalVirtualMemorySize/1024/1024/1024),"FIXED"))
End If
If Trim(CStr(value.TotalVirtualMemorySize)) <> "" Then
lstRetour("TOTALVIRTUALMEMORYSIZETO") = CStr(Format((value.TotalVirtualMemorySize/1024/1024/1024/1024),"FIXED"))
End If
End If
If IsNull(value.TotalVisibleMemorySize) = False Then
lstRetour("TOTALVISIBLEMEMORYSIZE") = CStr(value.TotalVisibleMemorySize)
If Trim(CStr(value.TotalVisibleMemorySize)) <> "" Then
lstRetour("TOTALVISIBLEMEMORYSIZEMO") = CStr(Format((value.TotalVisibleMemorySize/1024/1024),"FIXED"))
End If
If Trim(CStr(value.TotalVisibleMemorySize)) <> "" Then
lstRetour("TOTALVISIBLEMEMORYSIZEGO") = CStr(Format((value.TotalVisibleMemorySize/1024/1024/1024),"FIXED"))
End If
If Trim(CStr(value.TotalVisibleMemorySize)) <> "" Then
lstRetour("TOTALVISIBLEMEMORYSIZETO") = CStr(Format((value.TotalVisibleMemorySize/1024/1024/1024/1024),"FIXED"))
End If
End If
If IsNull(value.Version) = False Then
lstRetour("VERSION") = CStr(value.Version)
End If
If IsNull(value.WindowsDirectory) = False Then
lstRetour("WINDOWSDIRECTORY") = CStr(value.WindowsDirectory)
End If
End If
On Error GoTo ErreurHandle
End ForAll
Set vrObject = Nothing
If nbOk = True Then
Select Case Trim(lstRetour("DATAEXECUTIONPREVENTION_SUPPORTPOLICY"))
Case "0"
lstRetour("DATAEXECUTIONPREVENTION_SUPPORTPOLICYNAME") = "Always Off. DEP Is turned off For all 32-bit applications On the computer With no exceptions. This setting Is Not available For the user interface."
Case "1"
lstRetour("DATAEXECUTIONPREVENTION_SUPPORTPOLICYNAME") = "Always On. DEP Is enabled For all 32-bit applications On the computer. This setting Is Not available For the user interface."
Case "2"
lstRetour("DATAEXECUTIONPREVENTION_SUPPORTPOLICYNAME") = "Opt In. DEP Is enabled For a limited number of binaries, the kernel, And all Windows-based services. However, it Is off by default For all 32-bit applications. A user Or administrator must explicitly choose either the AlwaysOn Or the OptOut setting before DEP can be applied To 32-bit applications."
Case "3"
lstRetour("DATAEXECUTIONPREVENTION_SUPPORTPOLICYNAME") = "Opt Out. DEP Is enabled by default For all 32-bit applications. A user Or administrator can explicitly Remove support For a 32-bit application by adding the application To an exceptions list."
Case Else
REM lstRetour("DATAEXECUTIONPREVENTION_SUPPORTPOLICYNAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("FOREGROUNDAPPLICATIONBOOST"))
Case "0"
lstRetour("FOREGROUNDAPPLICATIONBOOSTNAME") = "None"
Case "1"
lstRetour("FOREGROUNDAPPLICATIONBOOSTNAME") = "Minimum"
Case "2"
lstRetour("FOREGROUNDAPPLICATIONBOOSTNAME") = "(Default) Maximum"
Case Else
REM lstRetour("FOREGROUNDAPPLICATIONBOOSTNAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("LARGESYSTEMCACHE"))
Case "0"
lstRetour("LARGESYSTEMCACHENAME") = "Optimize memory For applications."
Case "1"
lstRetour("LARGESYSTEMCACHENAME") = "Optimize memory For system performance."
Case Else
REM lstRetour("LARGESYSTEMCACHENAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("OSLANGUAGE"))
Case "1"
lstRetour("OSLANGUAGENAME") = "Arabic"
Case "4"
lstRetour("OSLANGUAGENAME") = "Chinese (Simplified)– China"
Case "9"
lstRetour("OSLANGUAGENAME") = "English"
Case "1025"
lstRetour("OSLANGUAGENAME") = "Arabic – Saudi Arabia"
Case "1026"
lstRetour("OSLANGUAGENAME") = "Bulgarian"
Case "1027"
lstRetour("OSLANGUAGENAME") = "Catalan"
Case "1028"
lstRetour("OSLANGUAGENAME") = "Chinese (Traditional) – Taiwan"
Case "1029"
lstRetour("OSLANGUAGENAME") = "Czech"
Case "1030"
lstRetour("OSLANGUAGENAME") = "Danish"
Case "1031"
lstRetour("OSLANGUAGENAME") = "German – Germany"
Case "1032"
lstRetour("OSLANGUAGENAME") = "Greek"
Case "1033"
lstRetour("OSLANGUAGENAME") = "English – United States"
Case "1034"
lstRetour("OSLANGUAGENAME") = "Spanish – Traditional Sort"
Case "1035"
lstRetour("OSLANGUAGENAME") = "Finnish"
Case "1036"
lstRetour("OSLANGUAGENAME") = "French – France"
Case "1037"
lstRetour("OSLANGUAGENAME") = "Hebrew"
Case "1038"
lstRetour("OSLANGUAGENAME") = "Hungarian"
Case "1039"
lstRetour("OSLANGUAGENAME") = "Icelandic"
Case "1040"
lstRetour("OSLANGUAGENAME") = "Italian – Italy"
Case "1041"
lstRetour("OSLANGUAGENAME") = "Japanese"
Case "1042"
lstRetour("OSLANGUAGENAME") = "Korean"
Case "1043"
lstRetour("OSLANGUAGENAME") = "Dutch – Netherlands"
Case "1044"
lstRetour("OSLANGUAGENAME") = "Norwegian – Bokmal"
Case "1045"
lstRetour("OSLANGUAGENAME") = "Polish"
Case "1046"
lstRetour("OSLANGUAGENAME") = "Portuguese – Brazil"
Case "1047"
lstRetour("OSLANGUAGENAME") = "Rhaeto-Romanic"
Case "1048"
lstRetour("OSLANGUAGENAME") = "Romanian"
Case "1049"
lstRetour("OSLANGUAGENAME") = "Russian"
Case "1050"
lstRetour("OSLANGUAGENAME") = "Croatian"
Case "1051"
lstRetour("OSLANGUAGENAME") = "Slovak"
Case "1052"
lstRetour("OSLANGUAGENAME") = "Albanian"
Case "1053"
lstRetour("OSLANGUAGENAME") = "Swedish"
Case "1054"
lstRetour("OSLANGUAGENAME") = "Thai"
Case "1055"
lstRetour("OSLANGUAGENAME") = "Turkish"
Case "1056"
lstRetour("OSLANGUAGENAME") = "Urdu"
Case "1057"
lstRetour("OSLANGUAGENAME") = "Indonesian"
Case "1058"
lstRetour("OSLANGUAGENAME") = "Ukrainian"
Case "1059"
lstRetour("OSLANGUAGENAME") = "Belarusian"
Case "1060"
lstRetour("OSLANGUAGENAME") = "Slovenian"
Case "1061"
lstRetour("OSLANGUAGENAME") = "Estonian"
Case "1062"
lstRetour("OSLANGUAGENAME") = "Latvian"
Case "1063"
lstRetour("OSLANGUAGENAME") = "Lithuanian"
Case "1065"
lstRetour("OSLANGUAGENAME") = "Persian"
Case "1066"
lstRetour("OSLANGUAGENAME") = "Vietnamese"
Case "1069"
lstRetour("OSLANGUAGENAME") = "Basque"
Case "1070"
lstRetour("OSLANGUAGENAME") = "Serbian"
Case "1071"
lstRetour("OSLANGUAGENAME") = "Macedonian (F.Y.R.O. Macedonia)"
Case "1072"
lstRetour("OSLANGUAGENAME") = "Sutu"
Case "1073"
lstRetour("OSLANGUAGENAME") = "Tsonga"
Case "1074"
lstRetour("OSLANGUAGENAME") = "Tswana"
Case "1076"
lstRetour("OSLANGUAGENAME") = "Xhosa"
Case "1077"
lstRetour("OSLANGUAGENAME") = "Zulu"
Case "1078"
lstRetour("OSLANGUAGENAME") = "Afrikaans"
Case "1080"
lstRetour("OSLANGUAGENAME") = "Faeroese"
Case "1081"
lstRetour("OSLANGUAGENAME") = "Hindi"
Case "1082"
lstRetour("OSLANGUAGENAME") = "Maltese"
Case "1084"
lstRetour("OSLANGUAGENAME") = "Scottish Gaelic"
Case "1085"
lstRetour("OSLANGUAGENAME") = "Yiddish"
Case "1086"
lstRetour("OSLANGUAGENAME") = "Malay – Malaysia"
Case "2049"
lstRetour("OSLANGUAGENAME") = "Arabic – Iraq"
Case "2052"
lstRetour("OSLANGUAGENAME") = "Chinese (Simplified) – PRC"
Case "2055"
lstRetour("OSLANGUAGENAME") = "German – Switzerland"
Case "2057"
lstRetour("OSLANGUAGENAME") = "English – United Kingdom"
Case "2058"
lstRetour("OSLANGUAGENAME") = "Spanish – Mexico"
Case "2060"
lstRetour("OSLANGUAGENAME") = "French – Belgium"
Case "2064"
lstRetour("OSLANGUAGENAME") = "Italian – Switzerland"
Case "2067"
lstRetour("OSLANGUAGENAME") = "Dutch – Belgium"
Case "2068"
lstRetour("OSLANGUAGENAME") = "Norwegian – Nynorsk"
Case "2070"
lstRetour("OSLANGUAGENAME") = "Portuguese – Portugal"
Case "2072"
lstRetour("OSLANGUAGENAME") = "Romanian – Moldova"
Case "2073"
lstRetour("OSLANGUAGENAME") = "Russian – Moldova"
Case "2074"
lstRetour("OSLANGUAGENAME") = "Serbian – Latin"
Case "2077"
lstRetour("OSLANGUAGENAME") = "Swedish – Finland"
Case "3073"
lstRetour("OSLANGUAGENAME") = "Arabic – Egypt"
Case "3076"
lstRetour("OSLANGUAGENAME") = "Chinese (Traditional) – Hong Kong SAR"
Case "3079"
lstRetour("OSLANGUAGENAME") = "German – Austria"
Case "3081"
lstRetour("OSLANGUAGENAME") = "English – Australia"
Case "3082"
lstRetour("OSLANGUAGENAME") = "Spanish – International Sort"
Case "3084"
lstRetour("OSLANGUAGENAME") = "French – Canada"
Case "3098"
lstRetour("OSLANGUAGENAME") = "Serbian – Cyrillic"
Case "4097"
lstRetour("OSLANGUAGENAME") = "Arabic – Libya"
Case "4100"
lstRetour("OSLANGUAGENAME") = "Chinese (Simplified) – Singapore"
Case "4103"
lstRetour("OSLANGUAGENAME") = "German – Luxembourg"
Case "4105"
lstRetour("OSLANGUAGENAME") = "English – Canada"
Case "4106"
lstRetour("OSLANGUAGENAME") = "Spanish – Guatemala"
Case "4108"
lstRetour("OSLANGUAGENAME") = "French – Switzerland"
Case "5121"
lstRetour("OSLANGUAGENAME") = "Arabic – Algeria"
Case "5127"
lstRetour("OSLANGUAGENAME") = "German – Liechtenstein"
Case "5129"
lstRetour("OSLANGUAGENAME") = "English – New Zealand"
Case "5130"
lstRetour("OSLANGUAGENAME") = "Spanish – Costa Rica"
Case "5132"
lstRetour("OSLANGUAGENAME") = "French – Luxembourg"
Case "6145"
lstRetour("OSLANGUAGENAME") = "Arabic – Morocco"
Case "6153"
lstRetour("OSLANGUAGENAME") = "English – Ireland"
Case "6154"
lstRetour("OSLANGUAGENAME") = "Spanish – Panama"
Case "7169"
lstRetour("OSLANGUAGENAME") = "Arabic – Tunisia"
Case "7177"
lstRetour("OSLANGUAGENAME") = "English – South Africa"
Case "7178"
lstRetour("OSLANGUAGENAME") = "Spanish – Dominican Republic"
Case "8193"
lstRetour("OSLANGUAGENAME") = "Arabic – Oman"
Case "8201"
lstRetour("OSLANGUAGENAME") = "English – Jamaica"
Case "8202"
lstRetour("OSLANGUAGENAME") = "Spanish – Venezuela"
Case "9217"
lstRetour("OSLANGUAGENAME") = "Arabic – Yemen"
Case "9226"
lstRetour("OSLANGUAGENAME") = "Spanish – Colombia"
Case "10241"
lstRetour("OSLANGUAGENAME") = "Arabic – Syria"
Case "10249"
lstRetour("OSLANGUAGENAME") = "English – Belize"
Case "10250"
lstRetour("OSLANGUAGENAME") = "Spanish – Peru"
Case "11265"
lstRetour("OSLANGUAGENAME") = "Arabic – Jordan"
Case "11273"
lstRetour("OSLANGUAGENAME") = "English – Trinidad"
Case "11274"
lstRetour("OSLANGUAGENAME") = "Spanish – Argentina"
Case "12289"
lstRetour("OSLANGUAGENAME") = "Arabic – Lebanon"
Case "12298"
lstRetour("OSLANGUAGENAME") = "Spanish – Ecuador"
Case "13313"
lstRetour("OSLANGUAGENAME") = "Arabic – Kuwait"
Case "13322"
lstRetour("OSLANGUAGENAME") = "Spanish – Chile"
Case "14337"
lstRetour("OSLANGUAGENAME") = "Arabic – U.A.E."
Case "14346"
lstRetour("OSLANGUAGENAME") = "Spanish – Uruguay"
Case "15361"
lstRetour("OSLANGUAGENAME") = "Arabic – Bahrain"
Case "15370"
lstRetour("OSLANGUAGENAME") = "Spanish – Paraguay"
Case "16385"
lstRetour("OSLANGUAGENAME") = "Arabic – Qatar"
Case "16394"
lstRetour("OSLANGUAGENAME") = "Spanish – Bolivia"
Case "17418"
lstRetour("OSLANGUAGENAME") = "Spanish – El Salvador"
Case "18442"
lstRetour("OSLANGUAGENAME") = "Spanish – Honduras"
Case "19466"
lstRetour("OSLANGUAGENAME") = "Spanish – Nicaragua"
Case "20490"
lstRetour("OSLANGUAGENAME") = "Spanish – Puerto Rico"
Case Else
REM lstRetour("OSLANGUAGENAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("OSPRODUCTSUITE"))
Case "1"
lstRetour("OSPRODUCTSUITENAME") = "Microsoft Small Business Server was once installed, but may have been upgraded To another version of Windows. Windows Server 2003, Windows XP, And Windows 2000: Small Business"
Case "2"
lstRetour("OSPRODUCTSUITENAME") = "Windows Server 2008 Enterprise, Windows Server 2003, Enterprise Edition, Windows 2000 Advanced Server, Or Windows NT Server 4.0 Enterprise Edition Is installed. Windows Server 2003, Windows XP, And Windows 2000: Enterprise"
Case "4"
lstRetour("OSPRODUCTSUITENAME") = "Windows BackOffice components are installed. Windows Server 2003, Windows XP, And Windows 2000: BackOffice"
Case "8"
lstRetour("OSPRODUCTSUITENAME") = "Communication Server Is installed. Windows Server 2003, Windows XP, And Windows 2000: Communication Server"
Case "16"
lstRetour("OSPRODUCTSUITENAME") = "Terminal Services Is installed. Windows Server 2003, Windows XP, And Windows 2000: Terminal Services"
Case "32"
lstRetour("OSPRODUCTSUITENAME") = "Microsoft Small Business Server Is installed With the restrictive client license. Windows Server 2003, Windows XP, And Windows 2000: Small Business (Restricted)"
Case "64"
lstRetour("OSPRODUCTSUITENAME") = "Windows XP Embedded Is installed. Windows Server 2003 And Windows XP: Embedded NT"
Case "128"
lstRetour("OSPRODUCTSUITENAME") = "Windows Server 2008 Datacenter, Windows Server 2003, Datacenter Edition, Or Windows 2000 Datacenter Server Is installed. Windows Server 2003, Windows XP, And Windows 2000: Data Center"
Case "256"
lstRetour("OSPRODUCTSUITENAME") = "Terminal Services Is installed, but only one interactive session Is supported. Windows Server 2003, Windows XP, And Windows 2000: This value Is Not available."
Case "512"
lstRetour("OSPRODUCTSUITENAME") = "Windows XP Home Edition Is installed. Windows Server 2003, Windows XP, And Windows 2000: This value Is Not available."
Case "1024"
lstRetour("OSPRODUCTSUITENAME") = "Windows Server 2003, Web Edition Is installed. Windows Server 2003, Windows XP, And Windows 2000: This value Is Not available."
Case "8192"
lstRetour("OSPRODUCTSUITENAME") = "Windows Storage Server 2003 R2 Is installed.Windows Server 2003, Windows XP, And Windows 2000: This value Is Not available."
Case "16384"
lstRetour("OSPRODUCTSUITENAME") = "Windows Server 2003, Compute Cluster Edition Is installed. Windows Server 2003, Windows XP, And Windows 2000: This value Is Not available."
Case Else
REM lstRetour("OSPRODUCTSUITENAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("OSTYPE"))
Case "0"
lstRetour("OSTYPENAME") = "Unknown"
Case "1"
lstRetour("OSTYPENAME") = "Other"
Case "2"
lstRetour("OSTYPENAME") = "MACROS"
Case "3"
lstRetour("OSTYPENAME") = "ATTUNIX"
Case "4"
lstRetour("OSTYPENAME") = "DGUX"
Case "5"
lstRetour("OSTYPENAME") = "DECNT"
Case "6"
lstRetour("OSTYPENAME") = "Digital UNIX"
Case "7"
lstRetour("OSTYPENAME") = "OpenVMS"
Case "8"
lstRetour("OSTYPENAME") = "HPUX"
Case "9"
lstRetour("OSTYPENAME") = "AIX"
Case "10"
lstRetour("OSTYPENAME") = "MVS"
Case "11"
lstRetour("OSTYPENAME") = "OS400"
Case "12"
lstRetour("OSTYPENAME") = "OS/2"
Case "13"
lstRetour("OSTYPENAME") = "JavaVM"
Case "14"
lstRetour("OSTYPENAME") = "MSDOS"
Case "15"
lstRetour("OSTYPENAME") = "WIN3x"
Case "16"
lstRetour("OSTYPENAME") = "WIN95"
Case "17"
lstRetour("OSTYPENAME") = "WIN98"
Case "18"
lstRetour("OSTYPENAME") = "WINNT"
Case "19"
lstRetour("OSTYPENAME") = "WINCE"
Case "20"
lstRetour("OSTYPENAME") = "NCR3000"
Case "21"
lstRetour("OSTYPENAME") = "NetWare"
Case "22"
lstRetour("OSTYPENAME") = "OSF"
Case "23"
lstRetour("OSTYPENAME") = "DC/OS"
Case "24"
lstRetour("OSTYPENAME") = "Reliant UNIX"
Case "25"
lstRetour("OSTYPENAME") = "SCO UnixWare"
Case "26"
lstRetour("OSTYPENAME") = "SCO OpenServer"
Case "27"
lstRetour("OSTYPENAME") = "Sequent"
Case "28"
lstRetour("OSTYPENAME") = "IRIX"
Case "29"
lstRetour("OSTYPENAME") = "Solaris"
Case "30"
lstRetour("OSTYPENAME") = "SunOS"
Case "31"
lstRetour("OSTYPENAME") = "U6000"
Case "32"
lstRetour("OSTYPENAME") = "ASERIES"
Case "33"
lstRetour("OSTYPENAME") = "TandemNSK"
Case "34"
lstRetour("OSTYPENAME") = "TandemNT"
Case "35"
lstRetour("OSTYPENAME") = "BS2000"
Case "36"
lstRetour("OSTYPENAME") = "LINUX"
Case "37"
lstRetour("OSTYPENAME") = "Lynx"
Case "38"
lstRetour("OSTYPENAME") = "XENIX"
Case "39"
lstRetour("OSTYPENAME") = "VM/ESA"
Case "40"
lstRetour("OSTYPENAME") = "Interactive UNIX"
Case "41"
lstRetour("OSTYPENAME") = "BSDUNIX"
Case "42"
lstRetour("OSTYPENAME") = "FreeBSD"
Case "43"
lstRetour("OSTYPENAME") = "NetBSD"
Case "44"
lstRetour("OSTYPENAME") = "GNU Hurd"
Case "45"
lstRetour("OSTYPENAME") = "OS9"
Case "46"
lstRetour("OSTYPENAME") = "MACH Kernel"
Case "47"
lstRetour("OSTYPENAME") = "Inferno"
Case "48"
lstRetour("OSTYPENAME") = "QNX"
Case "49"
lstRetour("OSTYPENAME") = "EPOC"
Case "50"
lstRetour("OSTYPENAME") = "IxWorks"
Case "51"
lstRetour("OSTYPENAME") = "VxWorks"
Case "52"
lstRetour("OSTYPENAME") = "MiNT"
Case "53"
lstRetour("OSTYPENAME") = "BeOS"
Case "54"
lstRetour("OSTYPENAME") = "HP MPE"
Case "55"
lstRetour("OSTYPENAME") = "NextStep"
Case "56"
lstRetour("OSTYPENAME") = "PalmPilot"
Case "57"
lstRetour("OSTYPENAME") = "Rhapsody"
Case Else
REM lstRetour("OSTYPENAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("OPERATINGSYSTEMSKU"))
Case "0"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Undefined"
Case "1"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Ultimate Edition"
Case "2"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Home Basic Edition"
Case "3"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Home Premium Edition"
Case "4"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Enterprise Edition"
Case "5"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Home Basic N Edition"
Case "6"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Business Edition"
Case "7"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Standard Server Edition"
Case "8"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Datacenter Server Edition"
Case "9"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Small Business Server Edition"
Case "10"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Enterprise Server Edition"
Case "11"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Starter Edition"
Case "12"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Datacenter Server Core Edition"
Case "13"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Standard Server Core Edition"
Case "14"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Enterprise Server Core Edition"
Case "15"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Enterprise Server Edition For Itanium-Based Systems"
Case "16"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Business N Edition"
Case "17"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Web Server Edition"
Case "18"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Cluster Server Edition"
Case "19"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Home Server Edition"
Case "20"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Storage Express Server Edition"
Case "21"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Storage Standard Server Edition"
Case "22"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Storage Workgroup Server Edition"
Case "23"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Storage Enterprise Server Edition"
Case "24"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Server For Small Business Edition"
Case "25"
lstRetour("OPERATINGSYSTEMSKUNAME") = "Small Business Server Premium Edition"
Case Else
REM lstRetour("OPERATINGSYSTEMSKUNAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("PRODUCTTYPE"))
Case "1"
lstRetour("PRODUCTTYPENAME") = "Work Station"
Case "2"
lstRetour("PRODUCTTYPENAME") = "Domain Controller"
Case "3"
lstRetour("PRODUCTTYPENAME") = "Server"
Case Else
REM lstRetour("PRODUCTTYPENAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("SUITEMASK"))
Case "1"
lstRetour("SUITEMASKNAME") = "Small Business"
Case "2"
lstRetour("SUITEMASKNAME") = "Enterprise"
Case "4"
lstRetour("SUITEMASKNAME") = "BackOffice"
Case "8"
lstRetour("SUITEMASKNAME") = "Communications"
Case "16"
lstRetour("SUITEMASKNAME") = "Terminal"
Case "32"
lstRetour("SUITEMASKNAME") = "Small Business Restricted"
Case "64"
lstRetour("SUITEMASKNAME") = "Embedded NT"
Case "128"
lstRetour("SUITEMASKNAME") = "Data Center"
Case "256"
lstRetour("SUITEMASKNAME") = "Single User"
Case "512"
lstRetour("SUITEMASKNAME") = "Personal"
Case "1024"
lstRetour("SUITEMASKNAME") = "Blade"
Case Else
REM lstRetour("SUITEMASKNAME") = "UNKNOWN"
End Select
vrValue = CountryCodeInfo(lstRetour("COUNTRYCODE"))
If testVariant(vrValue) = True Then
If Trim(vrValue("ISO")) <> "" Then
lstRetour("COUNTRYNAME") = Trim(vrValue("COUNTRY")+" ("+vrValue("ISO")+")")
Else
lstRetour("COUNTRYNAME") = vrValue("COUNTRY")
End If
End If
vrValue = Null
End If
WindowsOSInfo = lstRetour
Erase lstRetour
Exit Function
ErreurHandle:
MsgBox "("+Structure_Log+" : "+Cstr(GetThreadInfo (1))+" Call by "+Cstr(GetThreadInfo(10))+")"+Chr(10)+"Error " + CStr(Err) + " : "+Chr(10) + CStr(Error)+". "+Chr(10)+"Line # "+Cstr(Erl),16," ERROR !"
Erase lstRetour
lstRetour("ERROR") = CStr(GetThreadInfo (1))+", Line # "+Cstr(Erl)+", "+CStr(Error)+" ("+CStr(Err)+")"
WindowsOSInfo = lstRetour
Erase lstRetour
Exit Function
End Function
Re: obtenir %cpu et mémoire utilisés par IBM Notes

Publié:
16 Mai 2014 à 08:30
par Michael DELIQUE
et pui sça
- Code : Tout sélectionner
Public Function WindowsProcessorInfo(wnbProcessor As Integer, wCPUID As String) As Variant
Dim lstRetour List As String
Dim vrObject As Variant
Dim Selection As String
Dim nbProcessor As Integer
Dim i As Integer
Const Computer = "."
On Error GoTo CatchError
lstRetour("ADDRESSWIDTH") = ""
lstRetour("ARCHITECTURE") = ""
lstRetour("ARCHITECTURENAME") = ""
lstRetour("AVAILABILITY") = ""
lstRetour("AVAILABILITYNAME") = ""
lstRetour("CAPTION") = ""
lstRetour("CONFIGMANAGERERRORCODE") = ""
lstRetour("CONFIGMANAGERERRORCODENAME")= ""
lstRetour("CONFIGMANAGERUSERCONFIG") = ""
lstRetour("CPUSTATUS") = ""
lstRetour("CPUSTATUSNAME") = ""
lstRetour("CREATIONCLASSNAME") = ""
lstRetour("CURRENTCLOCKSPEED") = ""
lstRetour("CURRENTVOLTAGE") = ""
lstRetour("DATAWIDTH") = ""
lstRetour("DESCRIPTION") = ""
lstRetour("DEVICEID") = ""
lstRetour("ERRORCLEARED") = ""
lstRetour("ERRORDESCRIPTION") = ""
lstRetour("EXTCLOCK") = ""
lstRetour("FAMILY") = ""
lstRetour("FAMILYNAME") = ""
lstRetour("INSTALLDATE") = ""
lstRetour("INSTALLDATECONVERT") = ""
lstRetour("L2CACHESIZE") = ""
lstRetour("L2CACHESPEED") = ""
lstRetour("L3CACHESIZE") = ""
lstRetour("L3CACHESPEED") = ""
lstRetour("LASTERRORCODE") = ""
lstRetour("LEVEL") = ""
lstRetour("LOADPERCENTAGE") = ""
lstRetour("MANUFACTURER") = ""
lstRetour("MAXCLOCKSPEED") = ""
lstRetour("NAME") = ""
lstRetour("NUMBEROFCORES") = ""
lstRetour("NUMBEROFLOGICALPROCESSORS") = ""
lstRetour("OTHERFAMILYDESCRIPTION") = ""
lstRetour("PNPDEVICEID") = ""
lstRetour("POWERMANAGEMENTCAPABILITIES") = ""
lstRetour("POWERMANAGEMENTCAPABILITIESNAME") = ""
lstRetour("POWERMANAGEMENTSUPORTED") = ""
lstRetour("PROCESSORID") = ""
lstRetour("PROCESSORTYPE") = ""
lstRetour("PROCESSORTYPENAME") = ""
lstRetour("REVISION") = ""
lstRetour("ROLE") = ""
lstRetour("SOCKETDESIGNATION") = ""
lstRetour("STATUS") = ""
lstRetour("STATUSINFO") = ""
lstRetour("STATUSINFONAME") = ""
lstRetour("STEPPING") = ""
lstRetour("SYSTEMCREATIONCLASSNAME") = ""
lstRetour("SYSTEMNAME") = ""
lstRetour("UNIQUEID") = ""
lstRetour("UPGRADEMETHOD") = ""
lstRetour("UPGRADEMETHODNAME") = ""
lstRetour("VERSION") = ""
lstRetour("VOLTAGECAPS") = ""
lstRetour("VOLTAGECAPSNAME") = ""
If Trim(wCPUID) = "" Then
nbProcessor = Abs(wnbProcessor)
If nbProcessor < 1 Then
nbProcessor = 1
End If
Selection = "SELECT * FROM Win32_processor"
Else
Selection = "SELECT * FROM Win32_processor where DeviceID='"+Trim(wCPUID)+"'"
End If
Set vrObject = GetObject("WinMgmts:{impersonationLevel=impersonate, authenticationLevel=connect, (security)}!\\" +Computer + "\root\CIMv2").ExecQuery(Selection)
If IsNull(vrObject) = True Then
Error 9999,"vrObject is Null"
Exit Function
End If
i=0
ForAll value In vrObject
i=i+1
If i = nbProcessor Or Trim(wCPUID) <> "" Then
On Error Resume Next
If IsNull(value) = False Then
If IsNull(value.AddressWidth) = False Then
lstRetour("ADDRESSWIDTH") = CStr(value.AddressWidth)
End If
If IsNull(value.Architecture) = False Then
lstRetour("ARCHITECTURE") = CStr(value.Architecture)
End If
If IsNull(value.Availability) = False Then
lstRetour("AVAILABILITY") = CStr(value.Availability)
End If
If IsNull(value.ConfigManagerErrorCode) = False Then
lstRetour("CAPTION") = CStr(value.Caption)
End If
If IsNull(value.ConfigManagerErrorCode) = False Then
lstRetour("CONFIGMANAGERERRORCODE") = CStr(value.ConfigManagerErrorCode)
End If
If IsNull(value.ConfigManagerUserConfig) = False Then
lstRetour("CONFIGMANAGERUSERCONFIG") = CStr(value.ConfigManagerUserConfig)
End If
If IsNull(value.CpuStatus) = False Then
lstRetour("CPUSTATUS") = CStr(value.CpuStatus)
End If
If IsNull(value.CreationClassName) = False Then
lstRetour("CREATIONCLASSNAME") = CStr(value.CreationClassName)
End If
If IsNull(value.CurrentClockSpeed) = False Then
lstRetour("CURRENTCLOCKSPEED") = CStr(value.CurrentClockSpeed)
End If
If IsNull(value.CurrentVoltage) = False Then
lstRetour("CURRENTVOLTAGE") = CStr(value.CurrentVoltage)
End If
If IsNull(value.DataWidth) = False Then
lstRetour("DATAWIDTH") = CStr(value.DataWidth)
End If
If IsNull(value.Description) = False Then
lstRetour("DESCRIPTION") = CStr(value.Description)
End If
If IsNull(value.DeviceID) = False Then
lstRetour("DEVICEID") = CStr(value.DeviceID)
End If
If IsNull(value.ErrorCleared) = False Then
lstRetour("ERRORCLEARED") = CStr(value.ErrorCleared)
End If
If IsNull(value.ErrorDescription) = False Then
lstRetour("ERRORDESCRIPTION") = CStr(value.ErrorDescription)
End If
If IsNull(value.ExtClock) = False Then
lstRetour("EXTCLOCK") = CStr(value.ExtClock)
End If
If IsNull(value.Family) = False Then
lstRetour("FAMILY") = CStr(value.Family)
End If
If IsNull(value.InstallDate) = False Then
If Trim(CStr(value.InstallDate)) <> "" Then
lstRetour("INSTALLDATE") = CStr(value.InstallDate)
lstRetour("INSTALLDATECONVERT") = WindowsDateConvert(value.InstallDate)
End If
End If
If IsNull(value.L2CacheSize) = False Then
lstRetour("L2CACHESIZE") = CStr(value.L2CacheSize)
End If
If IsNull(value.L2CacheSpeed) = False Then
lstRetour("L2CACHESPEED") = CStr(value.L2CacheSpeed)
End If
If IsNull(value.L3CacheSize) = False Then
lstRetour("L3CACHESIZE") = CStr(value.L3CacheSize)
End If
If IsNull(value.L3CacheSpeed) = False Then
lstRetour("L3CACHESPEED") = CStr(value.L3CacheSpeed)
End If
If IsNull(value.LastErrorCode) = False Then
lstRetour("LASTERRORCODE") = CStr(value.LastErrorCode)
End If
If IsNull(value.Level) = False Then
lstRetour("LEVEL") = CStr(value.Level)
End If
If IsNull(value.LoadPercentage) = False Then
lstRetour("LOADPERCENTAGE") = CStr(value.LoadPercentage)
End If
If IsNull(value.Manufacturer) = False Then
lstRetour("MANUFACTURER") = CStr(value.Manufacturer)
End If
If IsNull(value.MaxClockSpeed) = False Then
lstRetour("MAXCLOCKSPEED") = CStr(value.MaxClockSpeed)
End If
If IsNull(value.Name) = False Then
lstRetour("NAME") = CStr(value.Name)
End If
If IsNull(value.NumberOfCores) = False Then
lstRetour("NUMBEROFCORES") = CStr(value.NumberOfCores)
End If
If IsNull(value.NumberOfLogicalProcessors) = False Then
lstRetour("NUMBEROFLOGICALPROCESSORS") = CStr(value.NumberOfLogicalProcessors)
End If
If IsNull(value.OtherFamilyDescription) = False Then
lstRetour("OTHERFAMILYDESCRIPTION") = CStr(value.OtherFamilyDescription)
End If
If IsNull(value.PNPDeviceID) = False Then
lstRetour("PNPDEVICEID") = CStr(value.PNPDeviceID)
End If
If IsNull(value.PowerManagementCapabilities) = False Then
lstRetour("POWERMANAGEMENTCAPABILITIES") = CStr(Join(value.PowerManagementCapabilities,","))
End If
If IsNull(value.PowerManagementSupported) = False Then
lstRetour("POWERMANAGEMENTSUPORTED") = CStr(value.PowerManagementSupported)
End If
If IsNull(value.ProcessorId) = False Then
lstRetour("PROCESSORID") = CStr(value.ProcessorId)
End If
If IsNull(value.ProcessorType) = False Then
lstRetour("PROCESSORTYPE") = CStr(value.ProcessorType)
End If
If IsNull(value.Revision) = False Then
lstRetour("REVISION") = CStr(value.Revision)
End If
If IsNull(value.Role) = False Then
lstRetour("ROLE") = CStr(value.Role)
End If
If IsNull(value.SocketDesignation) = False Then
lstRetour("SOCKETDESIGNATION") = CStr(value.SocketDesignation)
End If
If IsNull(value.Status) = False Then
lstRetour("STATUS") = CStr(value.Status)
End If
If IsNull(value.StatusInfo) = False Then
lstRetour("STATUSINFO") = CStr(value.StatusInfo)
End If
If IsNull(value.Stepping) = False Then
lstRetour("STEPPING") = CStr(value.Stepping)
End If
If IsNull(value.SystemCreationClassName) = False Then
lstRetour("SYSTEMCREATIONCLASSNAME") = CStr(value.SystemCreationClassName)
End If
If IsNull(value.SystemName) = False Then
lstRetour("SYSTEMNAME") = CStr(value.SystemName)
End If
If IsNull(value.UniqueId) = False Then
lstRetour("UNIQUEID") = CStr(value.UniqueId)
End If
If IsNull(value.UpgradeMethod) = False Then
lstRetour("UPGRADEMETHOD") = CStr(value.UpgradeMethod)
End If
If IsNull(value.Version) = False Then
lstRetour("VERSION") = CStr(value.Version)
End If
If IsNull(value.VoltageCaps) = False Then
lstRetour("VOLTAGECAPS") = CStr(value.VoltageCaps)
End If
End If
On Error GoTo CatchError
End If
End ForAll
Set vrObject = Nothing
If i > 0 Then
Select Case Trim(lstRetour("ARCHITECTURE"))
Case "0"
lstRetour("ARCHITECTURENAME") ="x86"
Case "1"
lstRetour("ARCHITECTURENAME") ="MIPS"
Case "2"
lstRetour("ARCHITECTURENAME") = "Alpha"
Case "3"
lstRetour("ARCHITECTURENAME") = "PowerPC"
Case "6"
lstRetour("ARCHITECTURENAME") = "Itanium-based systems"
Case "9"
lstRetour("ARCHITECTURENAME") = "x64"
Case Else
rem lstRetour("ARCHITECTURENAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("AVAILABILITY"))
Case "1"
lstRetour("AVAILABILITYNAME") ="Other"
Case "2"
lstRetour("AVAILABILITYNAME") ="unknown"
Case "3"
lstRetour("AVAILABILITYNAME") = "Running Or Full Power"
Case "4"
lstRetour("AVAILABILITYNAME") = "Warning"
Case "5"
lstRetour("AVAILABILITYNAME") = "In Test"
Case "6"
lstRetour("AVAILABILITYNAME") ="Not Applicable"
Case "7"
lstRetour("AVAILABILITYNAME") = "Power Off"
Case "8"
lstRetour("AVAILABILITYNAME") = "Off Line"
Case "9"
lstRetour("AVAILABILITYNAME") = "Off Duty"
Case "10"
lstRetour("AVAILABILITYNAME") = "Degraded"
Case "11"
lstRetour("AVAILABILITYNAME") = "Not Installed"
Case "12"
lstRetour("AVAILABILITYNAME") = "Install Error"
Case "13"
lstRetour("AVAILABILITYNAME") ="Power Save - Unknown. The device Is known To be In a power save state, but its exact status Is unknown."
Case "14"
lstRetour("AVAILABILITYNAME") ="Power Save - Low Power Mode. The device Is In a power save state, but Is still functioning, And may exhibit decreased performance."
Case "15"
lstRetour("AVAILABILITYNAME") ="Power Save - Standby. The device Is Not functioning, but can be brought To full power quickly."
Case "16"
lstRetour("AVAILABILITYNAME") ="Power Cycle"
Case "17"
lstRetour("AVAILABILITYNAME") = "Power Save - Warning. The device Is In a warning state, though also In a power save state."
Case Else
rem lstRetour("AVAILABILITYNAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("CONFIGMANAGERERRORCODE"))
Case "0"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device Is working properly."
Case "1"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device Is Not configured correctly."
Case "2"
lstRetour("CONFIGMANAGERERRORCODENAME")="Windows cannot load the driver For this device."
Case "3"
lstRetour("CONFIGMANAGERERRORCODENAME")="Driver For this device might be corrupted Or the system may be low On memory Or other resources."
Case "4"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device Is Not working properly. One of its drivers Or the registry might be corrupted."
Case "5"
lstRetour("CONFIGMANAGERERRORCODENAME")="Driver For the device requires a resource that Windows cannot manage."
Case "6"
lstRetour("CONFIGMANAGERERRORCODENAME")="Boot configuration For the device conflicts With other devices."
Case "7"
lstRetour("CONFIGMANAGERERRORCODENAME")="Cannot filter."
Case "8"
lstRetour("CONFIGMANAGERERRORCODENAME")="Driver loader For the device Is missing."
Case "9"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device Is Not working properly. The controlling firmware Is incorrectly reporting the resources For the device."
Case "10"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device cannot start."
Case "11"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device failed."
Case "12"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device cannot find enough free resources To use."
Case "13"
lstRetour("CONFIGMANAGERERRORCODENAME")="Windows cannot verify the device's resources."
Case "14"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device cannot work properly Until the computer Is restarted."
Case "15"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device Is Not working properly due To a possible re-enumeration problem."
Case "16"
lstRetour("CONFIGMANAGERERRORCODENAME")="Windows cannot identify all of the resources that the device uses."
Case "17"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device Is requesting an unknown resource type."
Case "18"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device drivers must be reinstalled."
Case "19"
lstRetour("CONFIGMANAGERERRORCODENAME")="Failure using the VxD loader."
Case "20"
lstRetour("CONFIGMANAGERERRORCODENAME")="Registry might be corrupted."
Case "21"
lstRetour("CONFIGMANAGERERRORCODENAME")="System failure. If changing the device driver Is ineffective, see the hardware documentation. Windows Is removing the device."
Case "22"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device Is disabled."
Case "23"
lstRetour("CONFIGMANAGERERRORCODENAME")="System failure. If changing the device driver Is ineffective, see the hardware documentation."
Case "24"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device Is Not present, Not working properly, Or does Not have all of its drivers installed."
Case "25"
lstRetour("CONFIGMANAGERERRORCODENAME")="Windows Is still setting up the device."
Case "26"
lstRetour("CONFIGMANAGERERRORCODENAME")="Windows Is still setting up the device."
Case "27"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device does Not have valid Log configuration."
Case "28"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device drivers are Not installed."
Case "29"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device Is disabled. The device firmware did Not provide the required resources."
Case "30"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device Is using an IRQ resource that another device Is using."
Case "31"
lstRetour("CONFIGMANAGERERRORCODENAME")="Device Is Not working properly. Windows cannot load the required device drivers."
Case Else
rem lstRetour("CONFIGMANAGERERRORCODENAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("CPUSTATUS"))
Case "0"
lstRetour("CPUSTATUSNAME")="Unknown"
Case "1"
lstRetour("CPUSTATUSNAME")="CPU Enabled"
Case "2"
lstRetour("CPUSTATUSNAME")="CPU Disabled by User via BIOS Setup"
Case "3"
lstRetour("CPUSTATUSNAME")="CPU Disabled by BIOS (POST Error)"
Case "4"
lstRetour("CPUSTATUSNAME")="CPU Is Idle"
Case "5"
lstRetour("CPUSTATUSNAME")="Reserved"
Case "6"
lstRetour("CPUSTATUSNAME")="Reserved"
Case "7"
lstRetour("CPUSTATUSNAME")="Other"
Case Else
rem lstRetour("CPUSTATUSNAME")="UNKNOWN"
End Select
Select Case Trim(lstRetour("FAMILY"))
Case "1"
lstRetour("FAMILYNAME")="Other"
Case "2"
lstRetour("FAMILYNAME")="Unknown"
Case "3"
lstRetour("FAMILYNAME")="8086"
Case "4"
lstRetour("FAMILYNAME")="80286"
Case "5"
lstRetour("FAMILYNAME")="80386"
Case "6"
lstRetour("FAMILYNAME")="80486"
Case "7"
lstRetour("FAMILYNAME")="8087"
Case "8"
lstRetour("FAMILYNAME")="80287"
Case "9"
lstRetour("FAMILYNAME")="80387"
Case "10"
lstRetour("FAMILYNAME")="80487"
Case "11"
lstRetour("FAMILYNAME")="Pentium® brand"
Case "12"
lstRetour("FAMILYNAME")="Pentium® Pro"
Case "13"
lstRetour("FAMILYNAME")="Pentium® II"
Case "14"
lstRetour("FAMILYNAME")="Pentium® processor With MMX technology"
Case "15"
lstRetour("FAMILYNAME")="Celeron™"
Case "16"
lstRetour("FAMILYNAME")="Pentium® II Xeon"
Case "17"
lstRetour("FAMILYNAME")="Pentium® III"
Case "18"
lstRetour("FAMILYNAME")="M1 Family"
Case "19"
lstRetour("FAMILYNAME")="M2 Family"
Case "24"
lstRetour("FAMILYNAME")="K5 Family"
Case "25"
lstRetour("FAMILYNAME")="K6 Family"
Case "26"
lstRetour("FAMILYNAME")="K6-2"
Case "27"
lstRetour("FAMILYNAME")="K6-3"
Case "28"
lstRetour("FAMILYNAME")="AMD Athlon™ Processor Family"
Case "29"
lstRetour("FAMILYNAME")="AMD® Duron™ Processor"
Case "30"
lstRetour("FAMILYNAME")="AMD2900 Family"
Case "31"
lstRetour("FAMILYNAME")="K6-2+"
Case "32"
lstRetour("FAMILYNAME")="Power PC Family"
Case "33"
lstRetour("FAMILYNAME")="Power PC 601"
Case "34"
lstRetour("FAMILYNAME")="Power PC 603"
Case "35"
lstRetour("FAMILYNAME")="Power PC 603+"
Case "36"
lstRetour("FAMILYNAME")="Power PC 604"
Case "37"
lstRetour("FAMILYNAME")="Power PC 620"
Case "38"
lstRetour("FAMILYNAME")="Power PC X704"
Case "39"
lstRetour("FAMILYNAME")="Power PC 750"
Case "48"
lstRetour("FAMILYNAME")="Alpha Family"
Case "49"
lstRetour("FAMILYNAME")="Alpha 21064"
Case "50"
lstRetour("FAMILYNAME")="Alpha 21066"
Case "51"
lstRetour("FAMILYNAME")="Alpha 21164"
Case "52"
lstRetour("FAMILYNAME")="Alpha 21164PC"
Case "53"
lstRetour("FAMILYNAME")="Alpha 21164a"
Case "54"
lstRetour("FAMILYNAME")="Alpha 21264"
Case "55"
lstRetour("FAMILYNAME")="Alpha 21364"
Case "64"
lstRetour("FAMILYNAME")="MIPS Family"
Case "65"
lstRetour("FAMILYNAME")="MIPS R4000"
Case "66"
lstRetour("FAMILYNAME")="MIPS R4200"
Case "67"
lstRetour("FAMILYNAME")="MIPS R4400"
Case "68"
lstRetour("FAMILYNAME")="MIPS R4600"
Case "69"
lstRetour("FAMILYNAME")="MIPS R10000"
Case "80"
lstRetour("FAMILYNAME")="SPARC Family"
Case "81"
lstRetour("FAMILYNAME")="SuperSPARC"
Case "82"
lstRetour("FAMILYNAME")="microSPARC II"
Case "83"
lstRetour("FAMILYNAME")="microSPARC IIep"
Case "84"
lstRetour("FAMILYNAME")="UltraSPARC"
Case "85"
lstRetour("FAMILYNAME")="UltraSPARC II"
Case "86"
lstRetour("FAMILYNAME")="UltraSPARC IIi"
Case "87"
lstRetour("FAMILYNAME")="UltraSPARC III"
Case "88"
lstRetour("FAMILYNAME")="UltraSPARC IIIi"
Case "96"
lstRetour("FAMILYNAME")="68040"
Case "97"
lstRetour("FAMILYNAME")="68xxx Family"
Case "98"
lstRetour("FAMILYNAME")="68000"
Case "99"
lstRetour("FAMILYNAME")="68010"
Case "100"
lstRetour("FAMILYNAME")="68020"
Case "101"
lstRetour("FAMILYNAME")="68030"
Case "112"
lstRetour("FAMILYNAME")="Hobbit Family"
Case "120"
lstRetour("FAMILYNAME")="Crusoe™ TM5000 Family"
Case "121"
lstRetour("FAMILYNAME")="Crusoe™ TM3000 Family"
Case "128"
lstRetour("FAMILYNAME")="Weitek"
Case "130"
lstRetour("FAMILYNAME")="Itanium™ Processor"
Case "144"
lstRetour("FAMILYNAME")="PA-RISC Family"
Case "145"
lstRetour("FAMILYNAME")="PA-RISC 8500"
Case "146"
lstRetour("FAMILYNAME")="PA-RISC 8000"
Case "147"
lstRetour("FAMILYNAME")="PA-RISC 7300LC"
Case "148"
lstRetour("FAMILYNAME")="PA-RISC 7200"
Case "149"
lstRetour("FAMILYNAME")="PA-RISC 7100LC"
Case "150"
lstRetour("FAMILYNAME")="PA-RISC 7100"
Case "160"
lstRetour("FAMILYNAME")="V30 Family"
Case "176"
lstRetour("FAMILYNAME")="Pentium® III Xeon™"
Case "177"
lstRetour("FAMILYNAME")="Pentium® III Processor With Intel® SpeedStep™ Technology"
Case "178"
lstRetour("FAMILYNAME")="Pentium® 4"
Case "179"
lstRetour("FAMILYNAME")="Intel® Xeon™"
Case "180"
lstRetour("FAMILYNAME")="AS400 Family"
Case "181"
lstRetour("FAMILYNAME")="Intel® Xeon™ processor MP"
Case "182"
lstRetour("FAMILYNAME")="AMD AthlonXP™ Family"
Case "183"
lstRetour("FAMILYNAME")="AMD AthlonMP™ Family"
Case "184"
lstRetour("FAMILYNAME")="Intel® Itanium® 2"
Case "185"
lstRetour("FAMILYNAME")="AMD Opteron™ Family"
Case "190"
lstRetour("FAMILYNAME")="K7"
Case "200"
lstRetour("FAMILYNAME")="IBM390 Family"
Case "201"
lstRetour("FAMILYNAME")="G4"
Case "202"
lstRetour("FAMILYNAME")="G5"
Case "250"
lstRetour("FAMILYNAME")="i860"
Case "251"
lstRetour("FAMILYNAME")="i960"
Case "260"
lstRetour("FAMILYNAME")="SH-3"
Case "261"
lstRetour("FAMILYNAME")="SH-4"
Case "280"
lstRetour("FAMILYNAME")="ARM"
Case "281"
lstRetour("FAMILYNAME")="StrongARM"
Case "300"
lstRetour("FAMILYNAME")="6x86"
Case "301"
lstRetour("FAMILYNAME")="MediaGX"
Case "302"
lstRetour("FAMILYNAME")="MII"
Case "320"
lstRetour("FAMILYNAME")="WinChip"
Case "350"
lstRetour("FAMILYNAME")="DSP"
Case "500"
lstRetour("FAMILYNAME")="Video Processor"
Case Else
rem lstRetour("FAMILYNAME")="UNKNOWN"
End Select
Select Case Trim(lstRetour("POWERMANAGEMENTCAPABILITIES"))
Case "0"
lstRetour("POWERMANAGEMENTCAPABILITIES")="Unknown"
Case "1"
lstRetour("POWERMANAGEMENTCAPABILITIES")="Not Supported"
Case "2"
lstRetour("POWERMANAGEMENTCAPABILITIES")="Disabled"
Case "3"
lstRetour("POWERMANAGEMENTCAPABILITIES")="Enabled. The power management features are currently enabled but the exact feature Set Is unknown Or the information Is unavailable."
Case "4"
lstRetour("POWERMANAGEMENTCAPABILITIES")="Power Saving Modes Entered Automatically. The device can change its power state based On usage Or other criteria."
Case "5"
lstRetour("POWERMANAGEMENTCAPABILITIES")="Power State Settable. The SetPowerState method Is supported. This method Is found On the parent CIM_LogicalDevice Class And can be implemented. For more information, see Designing Managed Object Format (MOF) Classes."
Case "6"
lstRetour("POWERMANAGEMENTCAPABILITIES")="Power Cycling Supported. The SetPowerState method can be invoked With the PowerState parameter Set To 5 (Power Cycle)."
Case "7"
lstRetour("POWERMANAGEMENTCAPABILITIES")="Timed Power-On Supported. The SetPowerState method can be invoked With the PowerState parameter Set To 5 (Power Cycle) And Time Set To a specific Date And Time, Or interval, For power-on."
Case Else
rem lstRetour("POWERMANAGEMENTCAPABILITIESNAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("PROCESSORTYPE"))
Case "1"
lstRetour("PROCESSORTYPENAME") = "Other"
Case "2"
lstRetour("PROCESSORTYPENAME") = "Unknown"
Case "3"
lstRetour("PROCESSORTYPENAME") = "Central Processor"
Case "4"
lstRetour("PROCESSORTYPENAME") = "Math Processor"
Case "5"
lstRetour("PROCESSORTYPENAME") = "DSP Processor"
Case "6"
lstRetour("PROCESSORTYPENAME") = "Video Processor"
Case Else
rem lstRetour("PROCESSORTYPENAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("STATUSINFO"))
Case "1"
lstRetour("STATUSINFONAME") = "Other"
Case "2"
lstRetour("STATUSINFONAME") = "Unknown"
Case "3"
lstRetour("STATUSINFONAME") = "Enabled"
Case "4"
lstRetour("STATUSINFONAME") = "Disabled"
Case "5"
lstRetour("STATUSINFONAME") = "Not Applicable"
Case Else
rem lstRetour("STATUSINFONAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("UPGRADEMETHOD"))
Case "1"
lstRetour("UPGRADEMETHODNAME") = "Other"
Case "2"
lstRetour("UPGRADEMETHODNAME") = "Unknown"
Case "3"
lstRetour("UPGRADEMETHODNAME") = "Daughter Board"
Case "4"
lstRetour("UPGRADEMETHODNAME") = "ZIF Socket"
Case "5"
lstRetour("UPGRADEMETHODNAME") = "Replacement Or Piggy Back"
Case "6"
lstRetour("UPGRADEMETHODNAME") = "None"
Case "7"
lstRetour("UPGRADEMETHODNAME") = "LIF Socket"
Case "8"
lstRetour("UPGRADEMETHODNAME") = "Slot 1"
Case "9"
lstRetour("UPGRADEMETHODNAME") = "Slot 2"
Case "10"
lstRetour("UPGRADEMETHODNAME") = "370 Pin Socket"
Case "11"
lstRetour("UPGRADEMETHODNAME") = "Slot A"
Case "12"
lstRetour("UPGRADEMETHODNAME") = "Slot M"
Case "13"
lstRetour("UPGRADEMETHODNAME") = "Socket 423"
Case "14"
lstRetour("UPGRADEMETHODNAME") = "Socket A (Socket 462)"
Case "15"
lstRetour("UPGRADEMETHODNAME") = "Socket 478"
Case "16"
lstRetour("UPGRADEMETHODNAME") = "Socket 754"
Case "17"
lstRetour("UPGRADEMETHODNAME") = "Socket 940"
Case "18"
lstRetour("UPGRADEMETHODNAME") = "Socket 939"
Case Else
rem lstRetour("UPGRADEMETHODNAME") = "UNKNOWN"
End Select
Select Case Trim(lstRetour("VOLTAGECAPS"))
Case "1"
lstRetour("VOLTAGECAPSNAME") = "5 volts"
Case "2"
lstRetour("VOLTAGECAPSNAME") = "3.3 volts"
Case "4"
lstRetour("VOLTAGECAPSNAME") = "2.9 volts"
Case Else
rem lstRetour("VOLTAGECAPSNAME") = "UNKNOWN"
End Select
End If
Exit Function
CatchError:
MsgBox "("+Structure_Log+" : "+Cstr(GetThreadInfo (1))+" Call by "+Cstr(GetThreadInfo(10))+")"+Chr(10)+"Error " + CStr(Err) + " : "+Chr(10) + CStr(Error)+". "+Chr(10)+"Line # "+Cstr(Erl),16," ERROR !"
Erase lstRetour
lstRetour("ERROR") = CStr(GetThreadInfo (1))+", Line # "+Cstr(Erl)+", "+CStr(Error)+" ("+CStr(Err)+")"
WindowsProcessorInfo = lstRetour
Erase lstRetour
Exit Function
End Function
Re: obtenir %cpu et mémoire utilisés par IBM Notes

Publié:
16 Mai 2014 à 10:38
par sedki
Merci de me répondre.
Jérôme, j'ai déjà essayé avec WMI et bien précisément avec win32_process mais les valeurs que j'ai obtenu ne sont pas les mêmes que le taskmanager.
Michael, je travaille avec la langage native c++. en plus, je veux collecte l'utilisation totale de cpu et de mémoire par IBM Notes lors de son exécution et j'ai remarqué d"IBM Notes lance plusieurs processus (nlnotes.exe, npop.exe, nsmtp.exe ...) donc je dois collecter l'utilisation de cpu et de mem pour chacun d'eux puis calculer l'utilisation totale
Re: obtenir %cpu et mémoire utilisés par IBM Notes

Publié:
16 Mai 2014 à 11:04
par Jérôme Deniau
Suffit de désassembler un outil avec IDA et tu auras la solution pour WMI.
Sinon: ce que je fais côté serveur mais via un process notes
int cpuusage()
{
FILETIME ft_sys_idle;
FILETIME ft_sys_kernel;
FILETIME ft_sys_user;
ULARGE_INTEGER ul_sys_idle;
ULARGE_INTEGER ul_sys_kernel;
ULARGE_INTEGER ul_sys_user;
static ULARGE_INTEGER ul_sys_idle_old;
static ULARGE_INTEGER ul_sys_kernel_old;
static ULARGE_INTEGER ul_sys_user_old;
int usage = 0;
GetSystemTimes(&ft_sys_idle, &ft_sys_kernel, &ft_sys_user);
CopyMemory(&ul_sys_idle , &ft_sys_idle , sizeof(FILETIME)); // Could been optimized away...
CopyMemory(&ul_sys_kernel, &ft_sys_kernel, sizeof(FILETIME)); // Could been optimized away...
CopyMemory(&ul_sys_user , &ft_sys_user , sizeof(FILETIME)); // Could been optimized away...
usage = (int)
(
(
(
(
(ul_sys_kernel.QuadPart - ul_sys_kernel_old.QuadPart)+
(ul_sys_user.QuadPart - ul_sys_user_old.QuadPart)
)
-
(ul_sys_idle.QuadPart-ul_sys_idle_old.QuadPart)
)
*
(100)
)
/
(
(ul_sys_kernel.QuadPart - ul_sys_kernel_old.QuadPart)+
(ul_sys_user.QuadPart - ul_sys_user_old.QuadPart)
)
);
ul_sys_idle_old.QuadPart = ul_sys_idle.QuadPart;
ul_sys_user_old.QuadPart = ul_sys_user.QuadPart;
ul_sys_kernel_old.QuadPart = ul_sys_kernel.QuadPart;
return usage;
}