You will find the below script useful to effectively filter the logs logged by using cmn_err(CE_CONT, ... (which prints the messages in two/more lines without an unique string for each line).

Example /var/adm/messages file containing the logs logged by using cmn_err(CE_CONT, ...

> cat egMar 19 05:49:12 host1 scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/ssd@g60060e8005b155000000b15500000060 (ssd22):Mar 19 05:49:12 host1 Corrupt label; wrong magic numberMar 19 05:49:12 host1 scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/ssd@g60060e8005b155000000b15500000060 (ssd22):Mar 19 05:49:12 host1 Corrupt label; wrong magic numberMar 19 05:49:12 host1 iscsi: [ID 454097 kern.notice] NOTICE: unrecognized ioctl 0x403Mar 19 05:49:12 host1 scsi: [ID 243001 kern.warning] WARNING: /pseudo/fcp@0 (fcp0):Mar 19 05:49:12 host1 Invalid ioctl opcode = 0x403Mar 19 05:49:13 host1 scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/ssd@g60060e8005b155000000b15500000060 (ssd22):Mar 19 05:49:13 host1 Corrupt label; wrong magic number

I am filtering these messages using nocontlines script in my local bin directory, and now messages looks clean and is ready for the analysis

> cat eg |nocontlines | egrep -v "Corrupt label" Mar 19 05:49:12 host1 iscsi: [ID 454097 kern.notice] NOTICE: unrecognized ioctl 0x403Mar 19 05:49:12 host1 scsi: [ID 243001 kern.warning] WARNING: /pseudo/fcp@0 (fcp0): Invalid ioctl opcode = 0x403


nocontlines script looks like this.
> cat ~/bin/nocontlinescat $1|nawk '{if(index($0," \[ID ") == 0){for(i=5;i