Wrong value for CPU Quantity on Linux machine
search cancel

Wrong value for CPU Quantity on Linux machine

book

Article ID: 421478

calendar_today

Updated On:

Products

CA Configuration Automation

Issue/Introduction

The CPU Quantity returned by Blueprint "Hardware Details (Linux)" is incorrect on some Linux machine

Example :
- On some Linux Azure Servers, the returned CPU Quantity is 0
- On Some Linux Servers, the returned CPU Quantity is 128 but it has in reality only 16 CPUs

This could cause problem on telemetry reporting with wrong CPU count information.

Environment

Configuration Automation 12.9.0.126 and lower version

Cause

Following command is used to find the number of CPU :

numprocs=`/usr/bin/getconf _NPROCESSORS_ONLN`; x=`id|/usr/bin/cut -c5-11`; if [ "$numprocs" -gt "1" ]; then if [ $x != "0(root)" ]; then exit $?; else numprocs=`if [ -f /usr/sbin/dmidecode ]; then /usr/sbin/dmidecode | /bin/grep "Populated" | /usr/bin/wc -l; fi`; fi; fi; /bin/echo $numprocs

But on some Azure Linux Servers, dmidecode retuns a CPU Information with Status = Unpopulated 
And on some Linux Servers, dmidecode returns some CPU Information with Status = Populated, Disabled By BIOS

Resolution

Open a case at Broadcom Technical Support to ask an updated version of "Hardware Details (Linux)" Blueprint (Blueprint_Export_2025_12_04_15_25_18.jar)

This updated version updates the command used to find the number of CPU with this command :

numprocs=`/usr/bin/getconf _NPROCESSORS_ONLN`; x=`id|/usr/bin/cut -c5-11`; if [ "$numprocs" -gt "1" ]; then if [ $x != "0(root)" ]; then exit $?; else numprocs=`if [ -f /usr/sbin/dmidecode ]; then /usr/sbin/dmidecode | /bin/grep "Populated, Enabled" | /usr/bin/wc -l; fi`; if [ "$numprocs" -eq "0" ]; then numprocs=`/usr/bin/cat /proc/cpuinfo | /bin/grep "^processor" | wc -l`; fi; fi; fi; /bin/echo $numprocs


Once the updated file received, do this to import this updated Blueprint :

  1. In Blueprints tab, select Table Actions - Import Blueprints :



  2. Choose the received jar file (Blueprint_Export_2025_12_04_15_25_18.jar)
    And check the option "Overwrite Existing Blueprints" :



    Then click on Import All button


  3. The command line used for CPU Quantity (in Hardware Details (Linux) Blueprint) is updated