PCRE regular expressions (help?)
I thought I knew what I was doing, but apparently not:
PCRE compile of NORRDDISKS='^/oracle/PRD/sapdata.*' failed
I'm trying to use the patch Henrik so kindly provided earlier.
And what I really want to suppress (shell syntax) is: /oracle/*/sapdata* /oracle/*/data? /oracle/*/mirr* /oracle/*/orig*
Here's the generic I tried: PCRE compile of NORRDDISKS='^/oracle/.../sapdata.*| ^/oracle/.../mirr.*| ^/oracle/.../orig.*| ^/oracle/.../data.*' failed
What am I missing?
TIA
Tom
-----Original Message----- From: Uwe Kirbach [mailto:uwe.kirbach at arcor.de] Sent: Sunday, May 01, 2005 2:27 PM To: hobbit at hswn.dk Subject: Re: [hobbit] bb-sar - was: CPU info
Am Samstag, den 30.04.2005, 15:19 -0400 schrieb John Turner:
On Apr 30, 2005, at 11:41 AM, Henrik Stoerner wrote:
We use the bb-sar extension from www.deadcat.net on many of our hosts.
I haven't tried to get it working with Hobbit yet, but it does CPU utilization in percentages.
John
Hello John,
how did you got bb-sar running ? I tried it, but the sar-page of a host had only dead links.
Do you hae a little howto or a tip ?
Would be interested to get it running inside hobbit. If you want too, we could try it together.
Uwe Kirbach
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
On Mon, 2005-05-02 at 12:47 -0500, Kauffman, Tom wrote:
I thought I knew what I was doing, but apparently not:
PCRE compile of NORRDDISKS='^/oracle/PRD/sapdata.*' failed
I'm trying to use the patch Henrik so kindly provided earlier.
And what I really want to suppress (shell syntax) is: /oracle/*/sapdata* /oracle/*/data? /oracle/*/mirr* /oracle/*/orig*
Here's the generic I tried: PCRE compile of NORRDDISKS='^/oracle/.../sapdata.*| ^/oracle/.../mirr.*| ^/oracle/.../orig.*| ^/oracle/.../data.*' failed
Got to escape the slashes... NORRDISKs="^\/oracle\/.+?\/(sapdata|mirr|data|orig)'
Which reads: begins with /oracle/, followed by as few letters as possible before another slash, then a string starting with sapdata, mirr, data, or orig
-- Daniel J McDonald, CCIE # 2495, CNX Austin Energy
dan.mcdonald at austinenergy.com
On Mon, May 02, 2005 at 12:47:15PM -0500, Kauffman, Tom wrote:
I thought I knew what I was doing, but apparently not:
PCRE compile of NORRDDISKS='^/oracle/PRD/sapdata.*' failed
I'm trying to use the patch Henrik so kindly provided earlier.
Hmm - it's not my lucky day for doing patches, sorry.
There's a clear cut'n'paste bug in the patch I sent out: Line 39 of hobbitd/larrd/do_disk.c reads:
if (!inclpattern) errprintf("PCRE compile of NORRDDISKS ....
It was meant to test the *exclude* pattern there, so it should be
if (!exclpattern) errprintf("PCRE compile of NORRDDISKS ....
This means you'll get that error-message no matter what you put into the NORRDDISKS variable.
And what I really want to suppress (shell syntax) is: /oracle/*/sapdata* /oracle/*/data? /oracle/*/mirr* /oracle/*/orig*
Here's the generic I tried: PCRE compile of NORRDDISKS='^/oracle/.../sapdata.*|^/oracle/.../mirr.*|^/oracle/.../orig.*|^/oracle/.../data.*' failed
I tested it with this one:
NORRDDISKS="^/oracle/[a-z,0-9]+/sapdata.*|^/oracle/[a-z,0-9]+/mirr.*|^/oracle/[a-z,0-9]+/orig.*|^/oracle/[a-z,0-9]+/data.*"
Feeding it some hand-crafted disk status messages it seems to work OK.
Note that hobbitserver.cfg is processed by a C program, not a shell tool. So you shouldn't need to escape any of the special characters.
Henrik
participants (3)
-
dan.mcdonald@austinenergy.com
-
henrik@hswn.dk
-
KauffmanT@nibco.com