martes, 17 de enero de 2012

Modificando el inventario para reportar CPU y Cores correctamente

Hola,

Vamos a hablar de como obtener información de procesadores.

Actualmente existe un problema para obtener esta información en los sistemas Windows 2003 / Windows XP. Estos sistemas operativos no diferencian en WMI los Cores de los Cores Lógicos, es decir si tenemos 2 CPUs con 2 cores cada uno y habilitamos HyperThreading el SCCM nos mostrará un total de 16 Cores...

Hace ya un tiempo se lanzaron hotfixs para solucionar este problema:

KB932370 El número de procesadores físicos hyperthreading habilitado o el número de procesadores multinúcleo físicos se informa incorrectamente en Windows Server 2003
http://support.microsoft.com/kb/932370/es

KB936235 El número de procesadores físicos hyperthreading habilitado o el número de procesadores multinúcleo físicos se informa incorrectamente en Windows XP
http://support.microsoft.com/kb/936235

Luego de tener desplegado este KB podremos modificar el inventario de SCCM para que obtenga dicha información:

Modificar el smsdef.mof agregando este contenido al final (no hace falta deshabilitar la clase sms_processor):

[ SMS_Report (TRUE),
SMS_Group_Name ("Processor_Cores"),
SMS_Class_ID ("CUSTOM|Processor_Cores|1.0")]

class win32_processor : SMS_Class_Template
{
[SMS_Report (FALSE) ] uint16 AddressWidth;
[SMS_Report (FALSE) ] uint16 Architecture;
[SMS_Report (FALSE) ] uint16 Availability;
[SMS_Report (FALSE) ] string Caption;
[SMS_Report (FALSE) ] uint32 ConfigManagerErrorCode;
[SMS_Report (FALSE) ] boolean ConfigManagerUserConfig;
[SMS_Report (FALSE) ] uint16 CpuStatus;
[SMS_Report (FALSE) ] uint32 CurrentClockSpeed;
[SMS_Report (FALSE) ] uint16 CurrentVoltage;
[SMS_Report (FALSE) ] uint16 DataWidth;
[SMS_Report (FALSE) ] string Description;
[SMS_Report (TRUE), key ] string DeviceID;
[SMS_Report (FALSE) ] boolean ErrorCleared;
[SMS_Report (FALSE) ] string ErrorDescription;
[SMS_Report (FALSE) ] uint32 ExtClock;
[SMS_Report (FALSE) ] uint16 Family;
[SMS_Report (FALSE) ] datetime InstallDate;
[SMS_Report (FALSE) ] uint32 L2CacheSize;
[SMS_Report (FALSE) ] uint32 L2CacheSpeed;
[SMS_Report (FALSE) ] uint32 LastErrorCode;
[SMS_Report (FALSE) ] uint16 Level;
[SMS_Report (FALSE) ] uint16 LoadPercentage;
[SMS_Report (FALSE) ] string Manufacturer;
[SMS_Report (FALSE) ] uint32 MaxClockSpeed;
[SMS_Report (FALSE) ] string Name;
[SMS_Report (TRUE) ] uint32 NumberOfCores;
[SMS_Report (TRUE) ] uint32 NumberOfLogicalProcessors;
[SMS_Report (FALSE) ] string OtherFamilyDescription;
[SMS_Report (FALSE) ] string PNPDeviceID;
[SMS_Report (FALSE) ] uint16 PowerManagementCapabilities[];
[SMS_Report (FALSE) ] boolean PowerManagementSupported;
[SMS_Report (FALSE) ] string ProcessorId;
[SMS_Report (FALSE) ] uint16 ProcessorType;
[SMS_Report (FALSE) ] uint16 Revision;
[SMS_Report (FALSE) ] string Role;
[SMS_Report (FALSE) ] string SocketDesignation;
[SMS_Report (FALSE) ] string Status;
[SMS_Report (FALSE) ] uint16 StatusInfo;
[SMS_Report (FALSE) ] string Stepping;
[SMS_Report (FALSE) ] string SystemName;
[SMS_Report (FALSE) ] string UniqueId;
[SMS_Report (FALSE) ] uint16 UpgradeMethod;
[SMS_Report (FALSE) ] string Version;
[SMS_Report (FALSE) ] uint32 VoltageCaps;
};


Por último solo queda crear el reporte y esperar que las máquinas reporten la información al servidor de SCCM:

SELECT
SYS.Netbios_Name0 as [Nombre],
Processor.Name0 as [Tipo de Procesador], 
Processor.NormSpeed0 as [Velocidad de CPU],
ProcCores.NumberOfCores0 as [Cantidad de Cores],
ProcCores.NumberOfLogicalProcessors0 as [Cantidad de Cores Logicos]
FROM v_R_System SYS
JOIN v_GS_PROCESSOR Processor on SYS.ResourceID=Processor.ResourceID
left join v_gs_Processor_Cores as ProcCores on Processor.ResourceID = ProcCores.ResourceID


Saludos!

Gastón Gardonio

1 comentario:

  1. Hola Gaston,

    Necesito de tu ayuda para generar 2 reportes uno que agrupe por maquina toda la informacion de hardware disponible y otro que lo haga por software.

    Gracias por tu ayuda

    ResponderEliminar

Por favor deja tu comentario