Quantcast
Channel: Symantec Connect - Products - Discussions
Viewing all articles
Browse latest Browse all 18527

Hardware Status could not be retrieved - Data too long for column 'cpu' - VMWARE

$
0
0
I need a solution

Hi Guys,

VMWare ESXi 4.1

Host Status - "Hardware Status could not be retrieved from the host: ..."

/data/logs/bcc/BrightmailLog.log

"com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'cpu' at row 1"

/data/stats/watchdog.xml

"...

 <cpu>Intel(R) Xeon(R) CPU E5620 @ 2.40GHz,Intel(R) Xeon(R) CPU E5620 @ 2.40GHz,Intel(R) Xeon(R) CPU E5620 @ 2.40GHz,Intel(R) Xeon(R) CPU E5620 @ 2.40GHz,Intel(R) Xeon(R) CPU E5620 @ 2.40GHz,Intel(R) Xeon(R) CPU E5620 @ 2.40GHz,Intel(R) Xeon(R) CPU E5620 @ 2.40GHz,Intel(R) Xeon(R) CPU E5620 @ 2.40GHz</cpu>

..."

After contacting Symantec support I've decided to look for and propose a solution.

Searching the filesystem I've found the scripts responsible for populating the XML ("/data/stats/watchdog.xml") used as a source of data to the HOST STATUS screen in the Control Center.

The "/opt/Symantec/Brightmail/cli/sbin/systemcpu" script is responsible for collecting the CPU info of the machine. It uses the "/usr/sbin/dmidecode" to retrieve the number of cpu sockets found in the hardware, but when using vmware, without success.

I've just written a piece of code to deal with this and put a more apropriate value inside $DMIDECODE_CPU (used later in the code).

# Is it a virtual machine??
if (`/usr/sbin/dmidecode | /bin/grep -i vmware`)
{
        # If more than one socket is defined in the VM, count sockets
        if (`/bin/grep physical /proc/cpuinfo | /bin/sort | /usr/bin/uniq`)
        {
                $DMIDECODE_CPU = "/bin/grep physical /proc/cpuinfo | /bin/sort | /usr/bin/uniq";
        }
        else
        {
                $DMIDECODE_CPU = "/bin/grep name /proc/cpuinfo | /bin/sort | /usr/bin/uniq";
        }
}
else    # Not a VM - use dmidecode to count sockets
{
        $DMIDECODE_CPU = "/usr/sbin/dmidecode -t processor | /bin/grep Version";
}
 

I've created two VMs: One Control Center with 2 sockets (defined in vmware - 4 cores per socket) and One Scanner  (just one socket - 8 cores)

This was my approach to solve the problem. Just one in many.

 


Viewing all articles
Browse latest Browse all 18527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>