Discovery: Discovery is not populating UUID or serial number for Linux servers

Version 1
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BMC Discovery


    COMPONENT:

    BMC Discovery 11.3


    APPLIES TO:

    BMC Discovery



    PROBLEM:

    Discovery is not populating UUID or serial number for Linux servers.

    *For a Spanish language version of this KA please see 000182393




     


    SOLUTION:

    The Linux platform script attempts to use lshal, dmidecode, and hwinfo to read data from the system BIOS. In most cases, not all of these will be present on the target server. For Linux servers, dmidecode is usually present.

    The dmidecode and hwinfo commands require superuser privileges.

    Please see:
    https://docs.bmc.com/docs/display/DISCO113/Adding+privileged+execution+to+commands
    https://docs.bmc.com/docs/display/DISCO113/Privileged+commands

    To edit the Linux platform "init" script, perform these steps:
    Go to Administration->Platforms->Linux
    Click "Edit" to the right of the "init" script (Initialise)
    Click inside the edit window to make it larger

    Change these lines to add the yellow highlighted text like this:
    OLD:

    # dmidecode requires superuser privileges to read data from the system BIOS PRIV_DMIDECODE() {     "$@" } # hwinfo requires superuser privileges to read data from the system BIOS PRIV_HWINFO() {     "$@" }
      
    NEW:  
    # dmidecode requires superuser privileges to read data from the system BIOS PRIV_DMIDECODE() {     sudo "$@" } # hwinfo requires superuser privileges to read data from the system BIOS PRIV_HWINFO() {     sudo "$@" }
      
    NOTE 1:  It is best to edit this script directly in the edit window.  Don't copy/paste from a Windows editor because this can cause problems with using the wrong kinds of double-quotes. 
    (Don't copy/paste from this KA either.)  See KA 000148423 for more information. 

    NOTE 2: In addition to calling the dmidecode and hwinfo commands with "sudo" from the Discovery platform script, these commands must have privileges to run with sudo as the Discovery user.  (The sudoers file must allow this on the target system.) 

    NOTE 3: In one case, the lshal command was present, but not working on one particular server. The issue seemed to be with the messagebus service on the target server. Once the service was restarted, the scan returned the correct serial number (and uuid) information. 

    NOTE 4: Discovery will look for the 'sudo' command in the default PATH, as defined in the Linux platform script: 

    /bin:/usr/bin:/sbin:/usr/sbin 

    If sudo is not present in the default path for some targets, the commands with sudo will not work correctly on those targets. Run "which sudo" on the target to get the correct path, and then update the Path: section with the  additional path.  

    If "which sudo" shows that there are multiple iterations of sudo present, it may be necessary to specify the full path in the PRIV sections, for example: 
       
    # dmidecode requires superuser privileges to read data from the system BIOS PRIV_DMIDECODE() {     /usr/local/bin/sudo "$@" } # hwinfo requires superuser privileges to read data from the system BIOS PRIV_HWINFO() {     /usr/local/bin/sudo "$@" }
      



      

     


    Article Number:

    000122292


    Article Type:

    Solutions to a Product Problem



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles