{bb} BB and logs

Pawel Kilian <[email protected]> Tue, 26 Feb 2008 13:38:52 -0500
Newsgroups gmane.network.bb4.general
Message-ID <[email protected]>
As we known:
The current BB msgs check searches for specific  strings and you
can exclude specific strings as well.  We still want to have this
flexibility but be able to output a more readable display on the
screen.

We want to use bb-msgs.sh to check for the string and give more
convenient output. We want to see lines between the strings
let say we have something like this:
Feb 24 08:16:30 saveit scsi: [ID 365881
kern.info] /pci@8,700000/scsi@4,1 (glm2):
Feb 24 08:16:30 saveit  Cmd (0x85f4318) dump for Target 0 Lun 0:
Feb 24 08:16:30 saveit scsi: [ID 365881
kern.info] /pci@8,700000/scsi@4,1 (glm2):
Feb 24 08:16:30 saveit          cdb=[ 0xa5 0x0 0x0 0x0 0x5 0x80 0x1 0xf4
0x0 0x0 0x0 0x0 ]
Feb 24 08:16:30 saveit scsi: [ID 365881
kern.info] /pci@8,700000/scsi@4,1 (glm2):
Feb 24 08:16:30 saveit  pkt_flags=0x0 pkt_statistics=0x61 pkt_state=0x7
Feb 24 08:16:30 saveit scsi: [ID 365881
kern.info] /pci@8,700000/scsi@4,1 (glm2):
Feb 24 08:16:30 saveit  pkt_scbp=0x0 cmd_flags=0x80e1

and if we use BB msgs check it will look for the string that we have
defined for example info.
so it will spit only this lines:
Feb 24 08:16:30 saveit scsi: [ID 365881
kern.info] /pci@8,700000/scsi@4,1 (glm2):
Feb 24 08:16:30 saveit scsi: [ID 365881
kern.info] /pci@8,700000/scsi@4,1 (glm2):
Feb 24 08:16:30 saveit scsi: [ID 365881
kern.info] /pci@8,700000/scsi@4,1 (glm2):
Feb 24 08:16:30 saveit scsi: [ID 365881
kern.info] /pci@8,700000/scsi@4,1 (glm2):


what about the other lines that are between the info strings?

I thought of something like that:
test=`grep info /root/work/test_file |awk '{print $1" "$2" "$3}'|head
-n1`
grep "$test" /root/work/test_file|head -n10

which will grep for info then take time from first string found and grep
for that time. This would work out but I dont know how to implement it
in bb-msgs.sh.... any info appreciated

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:[email protected] with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.