Discovery Serial Number HP-UX 11

Hi,

during the Host Connection job execution, the 'echo "sel path system\infolog\next" | cstm | grep -i "system serial"' command (used to discovery Serial Number in HP-UX 11.00) fails. We have tried to launch this command manually on the server, with the same access user used by discovery job, and it  works getting serial number, correctly.

The used function is the following:

 

def discoverSerialNumberByCstm(self):

        output = self.client.execAlternateCmds('echo "sel path system\\ninfolog\\nexit" | cstm | grep -i "system serial"','echo "sel path system\\ninfolog\\nexit" | /usr/sbin/cstm | grep -i "system serial"')

        if output:      

            matcher = re.search(':\s*(. )', output)

            if matcher:

                self.hostDataObject.setSerialNumber(matcher.group(1).strip())

                self.hostDataObject.setNote('cstm')

                return 1 

        else:

            logger.warn("Failed getting host serial number by cstm")

 

Could you help us, please?

Thank you and best regards.

 

Giuseppe