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

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

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

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:
    559
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Oct 11, 2004
  2. =?Utf-8?B?TmVv?=
    Replies:
    2
    Views:
    844
    =?Utf-8?B?TWljaGFlbCBCYWx0aWM=?=
    Jul 12, 2005
  3. Betty
    Replies:
    1
    Views:
    10,259
    Juha Laiho
    May 21, 2005
  4. Benson, John
    Replies:
    1
    Views:
    2,444
    Aurelio Martin
    Jan 28, 2004
  5. Golan
    Replies:
    1
    Views:
    427
    Flash Gordon
    Apr 5, 2005
  6. Replies:
    0
    Views:
    880
  7. coldwarcavvet
    Replies:
    0
    Views:
    359
    coldwarcavvet
    Aug 15, 2007
  8. Feyruz
    Replies:
    4
    Views:
    3,025
    Sherm Pendley
    Oct 14, 2005
Loading...