1
0
-1

Hi all,

I found that Wrong Memory size showed for ESXi hosts on Open-Audit Community 1.5.3.

In the script audit_esxi.sh, memory size is calculated as;

system_pc_memory=$(trim `echo "$smbiosDump" | sed -n '/^ Physical Memory Array:/,/^ [A-Za-z]/p' | grep '
Max. Size' | cut -d":" -f2 | cut -d" " -f2`)

But Physical Memory Array of smbiosDump is MAX possible size in GB of physical memory and it's not an actual memory size as below.

Physical Memory Array: #4096
    Use: 0x03 (System memory)
    Location: 0x03 (Motherboard)
    Slots: 4
    Max. Size: 32 GB
    ECC: 0x05 (Single-bit)

 

Please fix to show an actual physical memory size.

regards,

Satoru Funai

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi Satoru,

      This was a bug found in Open-AudIT 1.5.3 which we have now fixed in our 1.6.2 release.

      The associated ticket is 

      Error rendering macro 'jira'

      java.io.IOException: Error on line 75: The element type "img" must be terminated by the matching end-tag "</img>".

      which details the script fix.

      If you change the file audit_esx.sh like below, the issue is resolved.

      system_pc_memory=0
      for temp in $(cim-diagnostic.sh 2>/dev/null | grep "OMC_PhysicalMemory" -A21 | grep Capacity |  sed 's/^ *//g' | sed 's/ *$//g' | cut -d" " -f3); do
      	temp=`expr $temp / 1024 / 1024`
      	system_pc_memory=`expr $system_pc_memory + $temp`
      done

       

       

        CommentAdd your comment...