Date: Sat, 30 Sep 2000 13:06:40 -0700 From: Lee Ann Goldstein <lgoldste@leeann.snedmail.com> To: stable@FreeBSD.ORG Cc: lgoldste@leeann.snedmail.com Subject: Re: A new file for the base system? Message-ID: <200009302006.NAA11982@leeann.snedmail.com> In-Reply-To: Your message of Fri, 29 Sep 2000 01:34:49 BST. <20000929013449.F255@parish>
next in thread | previous in thread | raw e-mail | index | archive | help
--Your message was: (from Mark Ovens) > On Thu, Sep 28, 2000 at 05:15:29PM -0700, Gary Kline wrote: > > On Fri, Sep 29, 2000 at 12:46:07AM +0100, Mark Ovens wrote: > > > On Thu, Sep 28, 2000 at 12:15:24PM -0700, Gary Kline wrote: > > > > > > > > Another thing that would be a good diagnostic would be a perl or shell > > > > script that found duplicate IRQ usages... this for the hopelessly lazy. > > > > > > Here's something that might help. I knocked it up ages ago to do something > > > (forget exactly what now....). I've split it (hence the trailing \'s) to > > > protect it from been line-wrapped by mail. > > > > > > #!/bin/sh > > > dmesg | \ > > > grep -i 'irq [0-9][0-9]*' | \ > > > sed 's/\(^[a-z0-9]*[: ]\).*\(irq [0-9][0-9]*\).*/\1 \2/' | \ > > > sort -n +2 -3 > > > > Thanks for the regex mastery. And sed expertise. The first > > two lines are pretty evident. It's your sed line that chops, > > dices, slices, and so on, ;) > > Of course it does. Didn't you know that 'sed' is short for 'slice et dice' > (McDonalds use it for making chips; fries to you) :) I decided I wanted to see the pci assignments as well, and thought I'd make the output a little prettier while I was at it, so I "sliced et diced" a little further... find_irq.sh ----------- #!/bin/sh dmesg | \ sed -n -f find_irq.sed | \ sed -e 's/ [0-9]$/ &/' -e 's/://' | \ sort -n +2 -3 find_irq.sed ------------ /irq [0-9][0-9]* on pci/ s/\(^[a-z0-9]*[: ]\).*\(irq [0-9][0-9]*\).*\(pci[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)/\1 \2 \3/p /pci/b s/\(^[a-z0-9]*[: ]\).*\(irq [0-9][0-9]*\).*/\1 \2/p (those are tabs after the "\1"s, and that first substitution command wraps to the next line. I couldn't figure out a way to split it for readability that wouldn't risk introducing worse errors than letting it wrap might) For my system (still at 3.4-R), this produces: atkbd0 irq 1 sio1 irq 3 sio0 irq 4 pcm1 irq 5 fdc0 irq 6 ppc0 irq 7 adv0 irq 10 pci0.10.0 fxp0 irq 10 pci0.9.0 uhci0 irq 10 pci0.7.2 vga0 irq 11 pci1.0.0 psm0 irq 12 wdc0 irq 14 wdc1 irq 15 Lee Ann -- Lee Ann Goldstein Caffeine is *not* a substitute for sleep. lgoldste@leeann.snedmail.com lgoldste@lafn.org leeann@rand.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009302006.NAA11982>