oracle tool script

H

herbert.burnswell

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,

Herb
 
R

Rainer Weikusat

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?

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

Rainer Weikusat

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?

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top