oracle tool script

Discussion in 'Perl Misc' started by herbert.burnswell@gmail.com, Oct 17, 2012.

  1. Guest

    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
    , Oct 17, 2012
    #1
    1. Advertising

  2. writes:
    > 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`;
    Rainer Weikusat, Oct 17, 2012
    #2
    1. Advertising

  3. Guest

    Thanks Rainer, works great..
    , Oct 17, 2012
    #3
  4. writes:
    > 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).
    Rainer Weikusat, Oct 18, 2012
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vaidas gudas
    Replies:
    1
    Views:
    431
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Oct 11, 2004
  2. =?Utf-8?B?TmVv?=
    Replies:
    2
    Views:
    678
    =?Utf-8?B?TWljaGFlbCBCYWx0aWM=?=
    Jul 12, 2005
  3. Juha Laiho
    Replies:
    0
    Views:
    525
    Juha Laiho
    Jul 30, 2003
  4. David Rudder
    Replies:
    0
    Views:
    392
    David Rudder
    Jul 30, 2003
  5. Feyruz
    Replies:
    4
    Views:
    2,117
    Sherm Pendley
    Oct 14, 2005
Loading...

Share This Page