Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Unknown OS : problème sur la détection de l'OS - SOLVED

Bonjour,

j'ai un petit soucis concernant un serveur Windows 2008 R2 sur lequel le champ "Operating System" n'est pas trouvé, du coup OCS écrit à la place "Unknown OS".

L'agent était en version 2.0.5 : je viens d'installer la version 2.0.5.1 puis 2.0.5.2 mais le problème persiste.

Voici un extrait des logs:

AGENT => Inventory required
AGENT => Launching hardware and software checks
    INVENTORY => Loading Download history
    INVENTORY => Logged on user ID is <Myuser>
    INVENTORY => Operating System is <Unknown OS 6.1.7600 >, description <>
    INVENTORY => Operating System uses 32 bits memory address width
    INVENTORY => Computer domain or workgroup is <Unknown OS>
    INVENTORY => User domain is <Mydomain>
    INVENTORY => System Manufacturer <>, System Model <>, System

Savez-vous svp où l'agent va chercher l'information? Le registre? Requète WMI? Autre?

Peut être qu'un des composants du serveur ne tourne pas correctement.

Merci à vous!

Cz

in OCS Inventory NG agent for Windows by (240 points)
edited by

1 Answer

0 votes
Bonjour,

Mettre debug=2 dans le fichier ocsinventory.ini ou lancer un inventaire avec l'option /debug=2. Dans le répertoire c:\program files (x86)\ocs inventory ng\agent, il y a le fichier sysinfo.log. Merci de poster son contenu.

Cordialement

Frank
by (88.5k points)

Salut Frank,

merci pour l'info! Du coup on voit dans les logs qu'OCS récupère l'information en WMI mais qu'il n'arrive pas à accéder à l'objet Win32_OperatingSystem:

WMI Connect: Trying to connect to WMI namespace root\cimv2 on device <Localhost>...OK.
DMI: Trying to initialize COM...OK
DMI: Trying to get raw SMBios data...OK
Registry Connect: Trying to connect to HKEY_LOCAL_MACHINE on device <Localhost>...OK.
getUserName: Trying to get logged on User ID...
getUserName: Using Process32 library...OK
User found (current thread): xxxxxxxxxxxx.
Registry NT GetLastLoggedUser: Trying to get the last user who'd been logged in...OK ().
WMI GetOS: Trying to find Win32_OperatingSystem WMI objects...Failed because no Win32_OperatingSystem object !
dtWinVer GetOS...Unknown OS 6.1.7600 . OK

En accédant à la console WMI de Windows il y avait une erreur sur Win32_OperatingSystem, Invalid Class

et tous les composants n'étaient donc pas chargés. J'ai lancé un check du repository mais il était consistent:

PS C:\Windows\system32> winmgmt /verifyrepository

WMI repository is consistent

J'ai donc recompilé le fichier MOF cimwin32.mof avec la commande suivante (en précisant le chemin du

fichier mof) :

C:\Windows\system32>mofcomp.exe C:\Windows\System32\wbem\cimwin32.mof
Microsoft (R) MOF Compiler Version 6.1.7600.16385
Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
Parsing MOF file: C:\Windows\System32\wbem\cimwin32.mof
MOF file has been successfully parsed
Storing data in the repository...

Puis j'ai ré-enregistré la DLL correspondante:

C:\Windows\system32>regsvr32 C:\Windows\System32\wbem\cimwin32.dll

Et enfin j'ai redémarré le service WMI winmgmt. A la suite de cela, il n'y a plus d'erreur dans la console

WMI et OCS parvient bien à accéder à la Class Win32_OperatingSystem pour récupérer les infos:

Merci et bonne continuation!

Cz

 
Powered by Question2Answer
...