oracle tool script

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi All,

I want to put together a perl script to use as an administrative tool for
configuring Linux systems for Oracle installs.  Ideally I'll enhance the script
with time but right now I'd like to start with checking of kernel parameters.

I'm thinking of:

`sysctl -a` ---> into a hash splitting on ' = '

Can anyone offer any advise on how I would go about doing the above?

Thanks in advance,


Re: oracle tool script writes:
Quoted text here. Click to load it

%sysctl = map { chomp; split / = /; } `sysctl -a`;

Re: oracle tool script

Thanks Rainer, works great..

Re: oracle tool script writes:
Quoted text here. Click to load it

I did some off-and-one thinking about this and came the conclusion
that I would prefer doing this the other way round -- instead of
putting all kernel parameters into a hash and then checking some of
them (and possibly, changing them in some required way), I would
create a hash whose keys were the systcl parameter names I was
interested in and the corresponding values would be references to
(anonymous) subroutines performing 'the operation', whatever it was. I
would then go through the `sysctl -a` output line by line, splitting
each lines into a 'parameter name' and a 'parameter value', look for
the name in my 'interesting parameters' hash and execute the
subroutine associated with that with the value as argument (or with
name and value when using the same subroutine for more than one
parameter would make sense).

Site Timeline