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
Mostrando entradas con la etiqueta hardware inventory. Mostrar todas las entradas
Mostrando entradas con la etiqueta hardware inventory. Mostrar todas las entradas
martes, 17 de enero de 2012
lunes, 19 de diciembre de 2011
Algunos reportes interesantes para SCCM
Hola!
Reportes!!! Seguramente tengan algunos reportes que utilicen bastante y que les sirven como base para crear otros reportes rápidamente.
Les dejo algunos bastantes interesantes
v_GS_COMPUTER_SYSTEM.Manufacturer0 as [Fabricante],
LDISK.VolumeName0 as [Nombre del disco],
LDISK.FreeSpace0 as [Espacio Libre (MB)],
LDISK.FreeSpace0/1024 as [Espacio Libre(GB)],
LDISK.Size0/1024 as [Total de espacio (GB)],
LDISK.FreeSpace0*100/LDISK.Size0 as C074
FROM v_FullCollectionMembership SYS
join v_GS_LOGICAL_DISK LDISK on SYS.ResourceID = LDISK.ResourceID
JOIN v_R_System RSYS ON SYS.ResourceID = RSYS.ResourceID
join v_GS_COMPUTER_SYSTEM on v_GS_COMPUTER_SYSTEM.ResourceID = RSYS.ResourceID
WHERE
LDISK.Size0 > 0
AND SYS.CollectionID = 'SMS000DS'
ORDER BY SYS.Name, LDISK.DeviceID0
v_FullCollectionMembership.CollectionID
from v_FullCollectionMembership inner join v_GS_COMPUTER_SYSTEM on v_FullCollectionMembership.ResourceID = v_GS_COMPUTER_SYSTEM.ResourceID join v_Collection on v_Collection.CollectionID = v_FullCollectionMembership.CollectionID
where v_GS_COMPUTER_SYSTEM.Name0 = @computer
dbo.v_GS_OPERATING_SYSTEM.LastBootUpTime0, GETDATE()) AS [Días desde el ultimo reboot], dbo.v_GS_OPERATING_SYSTEM.Caption0
FROM dbo.v_GS_OPERATING_SYSTEM INNER JOIN
dbo.v_R_System ON dbo.v_GS_OPERATING_SYSTEM.ResourceID = dbo.v_R_System.ResourceID
WHERE (DATEDIFF(Day, dbo.v_GS_OPERATING_SYSTEM.LastBootUpTime0, GETDATE()) > 7)
ORDER BY [Días desde el ultimo reboot]
(cambiar el GETDATE()) > 7 por el numero de días que deseen)
Select distinct
v_R_System.Netbios_Name0 as [Servidor sin ARCHIVO.TXT],
v_R_System.Operating_System_Name_and0 as [Sistema Operativo]
FROM v_R_System
inner join v_FullCollectionMembership ON v_FullCollectionMembership.ResourceID = v_R_System.ResourceID
inner join v_Collection ON v_Collection.CollectionID = v_FullCollectionMembership.CollectionID
WHERE
v_R_System.Netbios_Name0 not in
(
select v_r_system.Netbios_Name0
from
v_GS_SoftwareFile inner join v_r_system on v_r_system.resourceid=v_GS_SoftwareFile.resourceid
where
v_GS_SoftwareFile.filename like 'ARCHIVO.TXT'
)
AND
v_Collection.Name like 'Servidores que deben tener el Archivo.txt'
order by v_R_System.Netbios_Name0
No duden en consultarme por algún otro ejemplo u otro tema!
Gastón!
Reportes!!! Seguramente tengan algunos reportes que utilicen bastante y que les sirven como base para crear otros reportes rápidamente.
Les dejo algunos bastantes interesantes
- Información de espacio en disco de servidores:
v_GS_COMPUTER_SYSTEM.Manufacturer0 as [Fabricante],
LDISK.VolumeName0 as [Nombre del disco],
LDISK.FreeSpace0 as [Espacio Libre (MB)],
LDISK.FreeSpace0/1024 as [Espacio Libre(GB)],
LDISK.Size0/1024 as [Total de espacio (GB)],
LDISK.FreeSpace0*100/LDISK.Size0 as C074
FROM v_FullCollectionMembership SYS
join v_GS_LOGICAL_DISK LDISK on SYS.ResourceID = LDISK.ResourceID
JOIN v_R_System RSYS ON SYS.ResourceID = RSYS.ResourceID
join v_GS_COMPUTER_SYSTEM on v_GS_COMPUTER_SYSTEM.ResourceID = RSYS.ResourceID
WHERE
LDISK.Size0 > 0
AND SYS.CollectionID = 'SMS000DS'
ORDER BY SYS.Name, LDISK.DeviceID0
- Listar las colecciones a las que pertenece una máquina:
v_FullCollectionMembership.CollectionID
from v_FullCollectionMembership inner join v_GS_COMPUTER_SYSTEM on v_FullCollectionMembership.ResourceID = v_GS_COMPUTER_SYSTEM.ResourceID join v_Collection on v_Collection.CollectionID = v_FullCollectionMembership.CollectionID
where v_GS_COMPUTER_SYSTEM.Name0 = @computer
- Servidores con mas de 7 días sin reiniciarce:
dbo.v_GS_OPERATING_SYSTEM.LastBootUpTime0, GETDATE()) AS [Días desde el ultimo reboot], dbo.v_GS_OPERATING_SYSTEM.Caption0
FROM dbo.v_GS_OPERATING_SYSTEM INNER JOIN
dbo.v_R_System ON dbo.v_GS_OPERATING_SYSTEM.ResourceID = dbo.v_R_System.ResourceID
WHERE (DATEDIFF(Day, dbo.v_GS_OPERATING_SYSTEM.LastBootUpTime0, GETDATE()) > 7)
ORDER BY [Días desde el ultimo reboot]
(cambiar el GETDATE()) > 7 por el numero de días que deseen)
- Informa de las máquinas que no tienen un archivo y pertenece a una colección en particular
Select distinct
v_R_System.Netbios_Name0 as [Servidor sin ARCHIVO.TXT],
v_R_System.Operating_System_Name_and0 as [Sistema Operativo]
FROM v_R_System
inner join v_FullCollectionMembership ON v_FullCollectionMembership.ResourceID = v_R_System.ResourceID
inner join v_Collection ON v_Collection.CollectionID = v_FullCollectionMembership.CollectionID
WHERE
v_R_System.Netbios_Name0 not in
(
select v_r_system.Netbios_Name0
from
v_GS_SoftwareFile inner join v_r_system on v_r_system.resourceid=v_GS_SoftwareFile.resourceid
where
v_GS_SoftwareFile.filename like 'ARCHIVO.TXT'
)
AND
v_Collection.Name like 'Servidores que deben tener el Archivo.txt'
order by v_R_System.Netbios_Name0
No duden en consultarme por algún otro ejemplo u otro tema!
Gastón!
Etiquetas:
hardware inventory,
Reporte,
SCCM,
software inventory
jueves, 1 de diciembre de 2011
Forzar inventario de Hardware y Software
Hola!!
Bueno, post rapido. Recién tuve que forzar el inventario de varios equipos y me topé con estos scripts que tenia guardado.
Ejecutar con credenciales de administrador.
Script: Full software inventory scan
'Reset SMS Software Inventory Action to force a full HW Inventory Action
sInventoryActionID = "{00000000-0000-0000-0000-000000000002}"
' Get a connection to the "root\ccm\invagt" namespace (where the Inventory agent lives)
Dim oLocator
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Dim oServices
Set oServices = oLocator.ConnectServer( , "root\ccm\invagt")
' Delete the specified InventoryActionStatus instance
oServices.Delete "InventoryActionStatus.InventoryActionID=""" & sInventoryActionID & """"
'Pause 3 seconds to allow the action to complete.
wscript.sleep 3000
'######################################
'Run a SMS Software Inventory
Set cpApplet = CreateObject("CPAPPLET.CPAppletMgr")
Set actions = cpApplet.GetClientActions
For Each action In actions
If Instr(action.Name,"Hardware Inventory") > 0
Then action.PerformAction
End if
Next
Script: Full hardware inventory scan
'Reset SMS Hardware Inventory Action to force a full HW Inventory Action
sInventoryActionID = "{00000000-0000-0000-0000-000000000001}"
' Get a connection to the "root\ccm\invagt" namespace (where the Inventory agent lives)
Dim oLocator
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Dim oServices
Set oServices = oLocator.ConnectServer( , "root\ccm\invagt")
' Delete the specified InventoryActionStatus instance
oServices.Delete "InventoryActionStatus.InventoryActionID=""" & sInventoryActionID & """"
'Pause 3 seconds to allow the action to complete. wscript.sleep 3000
'######################################
'Run a SMS Hardware Inventory
Set cpApplet = CreateObject("CPAPPLET.CPAppletMgr")
Set actions = cpApplet.GetClientActions
For Each action In actions
If Instr(action.Name,"Hardware Inventory") > 0 Then
action.PerformAction
End if
Next
Saludos!
Bueno, post rapido. Recién tuve que forzar el inventario de varios equipos y me topé con estos scripts que tenia guardado.
Ejecutar con credenciales de administrador.
Script: Full software inventory scan
'Reset SMS Software Inventory Action to force a full HW Inventory Action
sInventoryActionID = "{00000000-0000-0000-0000-000000000002}"
' Get a connection to the "root\ccm\invagt" namespace (where the Inventory agent lives)
Dim oLocator
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Dim oServices
Set oServices = oLocator.ConnectServer( , "root\ccm\invagt")
' Delete the specified InventoryActionStatus instance
oServices.Delete "InventoryActionStatus.InventoryActionID=""" & sInventoryActionID & """"
'Pause 3 seconds to allow the action to complete.
wscript.sleep 3000
'######################################
'Run a SMS Software Inventory
Set cpApplet = CreateObject("CPAPPLET.CPAppletMgr")
Set actions = cpApplet.GetClientActions
For Each action In actions
If Instr(action.Name,"Hardware Inventory") > 0
Then action.PerformAction
End if
Next
Script: Full hardware inventory scan
'Reset SMS Hardware Inventory Action to force a full HW Inventory Action
sInventoryActionID = "{00000000-0000-0000-0000-000000000001}"
' Get a connection to the "root\ccm\invagt" namespace (where the Inventory agent lives)
Dim oLocator
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Dim oServices
Set oServices = oLocator.ConnectServer( , "root\ccm\invagt")
' Delete the specified InventoryActionStatus instance
oServices.Delete "InventoryActionStatus.InventoryActionID=""" & sInventoryActionID & """"
'Pause 3 seconds to allow the action to complete. wscript.sleep 3000
'######################################
'Run a SMS Hardware Inventory
Set cpApplet = CreateObject("CPAPPLET.CPAppletMgr")
Set actions = cpApplet.GetClientActions
For Each action In actions
If Instr(action.Name,"Hardware Inventory") > 0 Then
action.PerformAction
End if
Next
Saludos!
Etiquetas:
hardware inventory,
SCCM,
software inventory
Suscribirse a:
Entradas (Atom)