Re: OS Information from Database

From: Rodd Holman <rodd.holman_at_gmail.com>
Date: Mon, 23 Feb 2009 15:19:45 -0600
Message-ID: <49A312F1.605_at_gmail.com>



As oracle user on AIX box you can put the following in cron. 05,15,25,35,45,55 * * * * /usr/bin/df -kI|/usr/bin/grep /path_to_datafile_filesystems/lgarsprd
>/some_path/ORACLE_SID_datafile_df.csv

2>/some_path_for_logs/ORACLE_SID_datafile_df.error

Then you just build an external table off the ORACLE_SID_datafile_df.csv file. It's really nice, because you can join it to dba_data_files and report on disk usage by tablespace.

The above will work on other *nix systems, but you may have to adjust the df options to your liking.

Rodd Holman

Powell, Mark D wrote:
> You can use the external procedure feature to call an external program
> that gathers the information you want to make available within Oracle.
>
> If you ran a shell script or program that collected the data you
> wanted and wrote it to a file accessible to Oracle you could use the
> external table feature to allow the data to be selected from within
> Oracle.
>
>
> -- Mark D Powell --
> Phone (313) 592-5148
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Feb 23 2009 - 15:19:45 CST

Original text of this message