[Orca-users] Problem running Orca 525: Can't locate DBI.pm in @INC

Blair Zajac blair at orcaware.com
Thu Feb 23 22:45:07 PST 2006


David Michaels wrote:
> 
>>
>> By filtering I mean making custom plots that only show what I want to 
>> see, i.e just oracle mounts or specific file systems.   Using Davids 
>> example I now have a plot that is showing me *almost* what I want to 
>> see, but I am still confused about the Perl regexp. logic.  In 
>> particular, I want to ignore any file system that starts with .alt or 
>> has .alt anywhere in the path.  Right now this is the entry I have in 
>> a custom  "Disk space Percent Usage" plot:
>>
>> data                    mntP_(?!/(?:oracle|\.*alt.*|BATCH))(.*)
>>
>> Its ignoring everything except the .alt filesystems, I think the "." 
>> is throwing things off although I expect the \ to escape it.  But as 
>> David already pointed out I can't confuse Perl with logic :D
>>
>> Any ideas what the syntax would be to ignore any file systems with 
>> ".alt" anywhere in the path? (Some to them are created in /tmp and 
>> some are at the root)
> 
> 
> The problem is that .* has special meaning ("anything"), but \.* has no 
> special meaning--it equates to 'dot asterisk', and not any sort of 
> wildcard special matching string.  Thus, the part of your regex that 
> says \.*alt.* translates to "dot followed by asterisk followed by alt 
> followed by anything".  Since the literal string ".alt" is not the same 
> as the literal string ".*alt", your .alts show up.  What you probably 
> want is \.alt.*, which translates to "dot followed by alt followed by 
> anything."

Actually, \.*alt.* means find zero or more dots, followed by alt, followed by 
anything.

> If all you want to do is exclude .alt, and include absolutely everything 
> else, there's no reason to mention oracle or BATCH at all.  Just do this:
> 
> mntP_(?!.*\.alt.*)(.*)
> 
> If you want only /oracle/whatever and /BATCH/whatever excluding all 
> .alt, then you probably want this:
> 
> mntP_(?:/oracle|BATCH)(?!.*\.alt.*)(.*)
> 
> "all mntP_ entries that start with /oracle or /BATCH, except those with 
> .alt somewhere in the string."

all mntP_ entries that start with /oracle or /BATCH, and don't contain .alt 
after /oracle or /BATCH.

> If it were me, I would want /oracle and /BATCH filesystems on one graph, 
> and all others on another graph, but none of them showing 
> .alt-anything.  In which case, one plot {} section would have the 2nd 
> regexp above, and another plot {} would have the 1st regexp above.  I 
> /think/ that Orca applies data to the first graph that matches, so 
> there'd be a trickle-down effect, but I'm not positive.  If it didn't, 
> then you'd need to use this regexp for the 2nd plot:
> 
> mntP_(?!.*\.alt.*|/oracle|/BATCH)(.*)

Orca will apply any data to any matching lines, so you can have the same data 
appear in different plots.

Aren't regex's fun :)

Regards,
Blair




More information about the Orca-users mailing list