Clarity Configuration Automation

 View Only

Tech Tip: How to determine the Number of Processors, Cores and Sockets 

May 11, 2015 11:36 AM

How to determine the Number of Processors, Cores and Sockets

 

There is currently no OOTB solution at the time of this writing, but for now, you have two options:

 

1) If the servers are discovered via vCenter
We created this Report within BOXI's WEBI to get you vCenter details in a Table format for easy filtering Copy the vCenterParameterReport.wid file onto you BOXI Server and double click it. Once you log in, click "Refresh Data" on the Top right and enter the full component name of the vCenter Blueprint as well as the Servername for the vCenter as it appears in CCA (FQDN or not)

 

2) If the servers are not discovered by vCenter (or have, but still want to use the below method)
They can modify an existing blueprint (copy)(I usually recommend the Hardware Details) or create a new one that contains **Please ensure you remove any character returns when copying the below scripts**

SOLARIS:
Number of CPUs
       kstat cpu_info | grep core_id | uniq | wc -l | tr -d ' '
Number of Cores
      kstat cpu_info | grep cpu_info | grep instance | wc -l | tr -d ' '
Number of Cores Per CPU
     cpus=`kstat cpu_info | grep core_id | uniq | wc -l | tr -d ' '`; cores=`kstat cpu_info | grep cpu_info | grep instance | wc -l | tr -d ' '`; cpuspercore=`expr $cores / $cpus`; echo $cpuspercore

LINUX
Number of CPUs
      lscpu | grep "^CPU(s):"
Number of Sockets
      lscpu | grep "Socket(s)" 
Number of Cores Per Socket
      lscpu | grep "Core(s) per socket" 
Output Format

             Use Name Colon Value parser for the Linux Commands

WINDOWS
CPU Physical Count

      echo On Error Resume Next >__TMP__.vbs __NL__ echo strComputer = "." >>__TMP__.vbs __NL__ echo Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") >>__TMP__.vbs __NL__ echo Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem") >>__TMP__.vbs __NL__ echo For Each objItem in colItems >>__TMP__.vbs __NL__ echo Wscript.Echo "CPU Physical Count : " & Trim(objItem.NumberOfProcessors) >>__TMP__.vbs __NL__ echo Next >>__TMP__.vbs __NL__ cscript //Nologo __TMP__.vbs && del __TMP__.vbs

CPU Logical Count
      echo On Error Resume Next >__TMP__.vbs __NL__ echo strComputer = "." >>__TMP__.vbs __NL__ echo Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") >>__TMP__.vbs __NL__ echo Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor") >>__TMP__.vbs __NL__ echo For Each objItem in colItems >>__TMP__.vbs __NL__ echo Wscript.Echo "CPU Logical Count : " & Trim(objItem.NumberOfLogicalProcessors) >>__TMP__.vbs __NL__ echo Next >>__TMP__.vbs __NL__ cscript //Nologo __TMP__.vbs && del __TMP__.vbs

CPU Core Count
      echo On Error Resume Next >__TMP__.vbs __NL__ echo strComputer = "." >>__TMP__.vbs __NL__ echo Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") >>__TMP__.vbs __NL__ echo Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor") >>__TMP__.vbs __NL__ echo For Each objItem in colItems >>__TMP__.vbs __NL__ echo Wscript.Echo "CPU Core Count : " & Trim(objItem.NumberOfCores) >>__TMP__.vbs __NL__ echo Next >>__TMP__.vbs __NL__ cscript //Nologo __TMP__.vbs && del __TMP__.vbs


Output Format

             Use Tabular Parser the Windows Scripts outputs

Statistics
0 Favorited
4 Views
1 Files
0 Shares
1 Downloads
Attachment(s)
zip file
CCAVMwarevCenterParameterReport.wid.zip   34 KB   1 version
Uploaded - May 29, 2019

Tags and Keywords

Comments

May 31, 2016 03:12 PM

Keep in mind that that attachment is for CABI, which is no longer supported in CCA 12.8SP3 and above

 

All that attachment is, is a sql query that CABI uses to get data from a vCenter discovered

That query is as follows

SELECT 
ACM_CD_SRVR.server_name,  
ACM_CD_SRVR.comp_name,  
ACM_CD_SRVR.comp_version,   
ACM_CD_SRVR.comp_bkt,  
ACM_CD_SRVR.comp_bkt_name,  
ACM_CD_SRVR.intermediate_path,  
ACM_CD_SRVR.comp_bkt_name,  
ACM_CD_SRVR.param_name
FROM   (   
select       
acmbo_server_details.server_id,      
acmbo_server_details.server_name,      
acmbo_server_details.folderid_prompt,      
acmbo_server_details.component_id,      
acmbo_server_details.bp_uuid,      
acmbo_server_details.comp_name,      
acmbo_server_details.has_parent_comp,      
acmbo_server_details.comp_version,      
acmbo_server_details.comp_qual,      
acmbo_server_details.comp_state,      
acmbo_server_details.comp_bkt,      
acmbo_server_details.comp_bkt_name,      
acmbo_server_details.param_name,      
acmbo_server_details.param_value,      
acmbo_server_details.p1,      
acmbo_server_details.p2,      
acmbo_server_details.p4,      
acmbo_server_details.p3,      
acmbo_server_details.summary,      
acmbo_server_details.weight,      
acmbo_server_details.cat,      
acmbo_server_details.intermediate_path,      
acmbo_server_details.intermediate_path_id,      
acmbo_server_details.type,      
acmbo_server_details.business_owner,      
acmbo_server_details.business_process,      
acmbo_server_details.it_owner,      
acmbo_server_details.location 
from       
acmbo_server_details 
where      
acmbo_server_details.server_name  IN  ('server_name_1','server_name_2','server_name_4','server_name_4')       
and      
acmbo_server_details.comp_name = 'component_name'   )
ACM_CD_SRVR

May 31, 2016 10:58 AM

Hi Adnan

 

When i tried to open the reporte appear the following message

 

 

Any tips for this?

Related Entries and Links

No Related Resource entered.