DBCollect/Install: Difference between revisions

From Dirty Cache Wiki
Jump to navigation Jump to search
No edit summary
 
(39 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Tools]]
[[Category:Tools]]
[[Category:DBCollect]]
[[Category:DBCollect]]
{{PrevNext|DBCollect/Considerations|DBCollect/Usage}}


= Summary =
= Summary =
Line 6: Line 7:
Installing DBCollect is pretty simple: download the latest dbcollect zipapp, put it somewhere in $PATH, and make it executable.
Installing DBCollect is pretty simple: download the latest dbcollect zipapp, put it somewhere in $PATH, and make it executable.


= Prerequisites =
On Linux this usually just works, on UNIX it may require some additional steps.


* Python 2.6 or higher
{{ PageBreak }}
* Python-argparse (is usually included in the Python distribution except for very old versions)
 
* Enterprise Linux 6, 7 or 8 (RHEL, Oracle Linux, etc), Solaris 11, IBM AIX 7
= Requirements =
* Some free space in /tmp (or elsewhere, use --tempdir)
 
* Oracle RDBMS 11g or higher (optional)
== Operating Systems ==
* Diagnostics pack license OR statspack configured on the database(s)
 
* Access to the 'oracle' special user or dba privileges ('root' not required)
* Linux
* Database instances up and running (opened read/write required for AWR/Statspack)
: Enterprise Linux 6 (EL6) or higher (RHEL, OEL, CentOS, Rocky Linux)
* SYS credentials (hence the 'oracle' or dba user requirement)
* SPARC/Solaris
* IBM AIX
 
== Python ==
 
DBCollect is a Python ZIP app. This means Python needs to be available in the environment to run <code>dbcollect</code>. Some systems do not have this by default.


= Downloading DBcollect =
* Requires Python (2.6+ or 3.x)
** On Linux (EL6+) works out of the box
** On AIX/HP-UX, need to install Python first, Windows not supported
** On Solaris (and AIX) Python may be a very old version that is not supported


The latest release is always available on the releases page:
A Python ZipApp is a standard ZIP file with an additional "shebang" prepended: <code>#!/usr/bin/env python</code>


[https://github.com/outrunnl/dbcollect/releases/latest DBcollect releases (GitHub)] On the Github releases page, go to the latest release, open Assets and download dbcollect.
* This causes dbcollect to be called with whatever ‘python’ version is in $PATH
* If this does not work, manually run python: <code>/usr/bin/python3 /usr/local/bin/dbcollect <options></code>
* Executable can be inspected with <code>unzip –v /usr/local/bin/dbcollect</code>
* Run simply as root or as ‘oracle’ user/owner


[https://dblytics.dirty-cache.com/download DBCollect Download (application page, not always working)] is a direct link to the latest version.
On UNIX (AIX, Solaris) you may have to create a symbolic link or run {{dbcollect}} like this:


= Easy Install =
<syntaxhighlight lang=bash>
python3 /usr/local/bin/dbcollect
</syntaxhighlight>


If your system has internet (https) access, see [https://dblytics.dirty-cache.com/dbcollect dbcollect install]
If all else fails, you can run {{dbcollect}} from python directly:
for an easy way to install {{dbcollect}}
 
<syntaxhighlight lang=bash>
python /usr/local/bin/dbcollect
# or
/usr/bin/python /usr/local/bin/dbcollect
# or
python2 /usr/local/bin/dbcollect
</syntaxhighlight>
 
== Oracle ==


== Warning ==
* Oracle RDBMS 11g or higher (optional)
: If the system is not an Oracle database server, only OS config and performance data will be collected
* Diagnostics pack license OR statspack configured on the database(s)
* Access to the 'oracle' special user or dba privileges ('root' not required)
* Database instances up and running (opened read/write required for AWR/Statspack)
* SYS credentials (hence the 'oracle' or dba user requirement)


== DBCollect location ==
== Other Prerequisites ==


Do NOT put dbcollect in non-standard locations such as /tmp, /root etc. The user dbcollect runs as (usually oracle) needs to have access to the dbcollect file (hence it does not work in /root).
* Some free space in /tmp (or elsewhere, use --tempdir)
It also may not work on mounted paths that have execute disabled (/tmp, /var/tmp, ...)


== Cloning Git Repository ==
== Linux ==


Do NOT clone the git repository and run it from there (it will result in an error). This to prevent tampering, and weird problems (the zipapp package ensures all required files are contained in a predictable location).
On Linux (EL7+) both Python 2 and 3 may be installed. To set the preferred version globally on the system, use <code>alternatives</code>


= Other requirements =
<syntaxhighlight lang=bash>
alternatives --set python /usr/bin/python3
</syntaxhighlight>


== AIX ==
== AIX ==
Line 52: Line 81:


Simply running <code>python</code> should work.
Simply running <code>python</code> should work.
SAR/Sysstat is usually available on AIX but not enabled by default. In that case there will be no OS performance (SAR) data. {{dbcollect}} can use NMON data as well with some caveats, see TBD.


== Solaris ==
== Solaris ==
Line 57: Line 88:
On Solaris, Python should be already available. It may be an older version.
On Solaris, Python should be already available. It may be an older version.
Make sure you can run <code>python</code> from the command line.
Make sure you can run <code>python</code> from the command line.
SAR/Sysstat is usually available on Solaris (like AIX) but not enabled by default. In that case there will be no OS performance (SAR) data. {{dbcollect}} can use NMON data as well with some caveats, see TBD.


== HP-UX ==
== HP-UX ==
Line 68: Line 101:
{{dbcollect}} does not yet support Windows. Let me know if you need it.
{{dbcollect}} does not yet support Windows. Let me know if you need it.


== Python ==
{{ PageBreak }}
 
= Installation =
 
== Downloading DBcollect ==
 
* Via [https://loadmaster.dirty-cache.com/dbcollect Quick Install Guide]
* Direct download: [https://loadmaster.dirty-cache.com/download DBCollect Download] (application page, not always working) is a direct link to the latest version.
* Via Github Releases: [https://github.com/outrunnl/dbcollect/releases/latest DBcollect releases (GitHub)] On the Github releases page, go to the latest release, open Assets and download dbcollect.
 
The latest release is always available on the releases page.
 
== Easy Install ==


The dbcollect app runs using a shebang (<code>#!/usr/bin/env python</code>). This means Python needs to be available in the environment. Some systems do not have this by default. On Linux (EL7+) enable it using
If your system has internet (https) access, see [https://loadmaster.dirty-cache.com/dbcollect dbcollect install]
for an easy way to install {{dbcollect}}


<syntaxhighlight lang=bash>
== Warning ==
alternatives --set python /usr/bin/python3
</syntaxhighlight>


On UNIX (AIX, Solaris) you may have to create a symbolic link or run {{dbcollect}} like this:
* DBCollect location
: Do NOT put dbcollect in non-standard locations such as /tmp, /root etc. The user dbcollect runs as (usually oracle) needs to have access to the dbcollect file (hence it does not work in /root). It also may not work on mounted paths that have execute disabled (/tmp, /var/tmp, ...)


<syntaxhighlight lang=bash>
* Cloning Git Repository
python3 /usr/local/bin/dbcollect
: Do NOT clone the git repository and run it from there (it will result in an error). This to prevent tampering, and weird problems (the zipapp package ensures all required files are contained in a predictable location).
</syntaxhighlight>


If all else fails, you can run {{dbcollect}} from python directly:
= Test working =


<syntaxhighlight lang=bash>
* Run <code>dbcollect -h</code> to see the help page
python /usr/local/bin/dbcollect
: If this works, dbcollect is installed correctly
# or
* Run <code>dbcollect --version</code> to show version information
/usr/bin/python /usr/local/bin/dbcollect
* Run <code>dbcollect --update</code> to update to the latest version
# or
: Optional, requires internet access
python2 /usr/local/bin/dbcollect
</syntaxhighlight>

Latest revision as of 09:55, 20 November 2024



Summary

Installing DBCollect is pretty simple: download the latest dbcollect zipapp, put it somewhere in $PATH, and make it executable.

On Linux this usually just works, on UNIX it may require some additional steps.

Requirements

Operating Systems

  • Linux
Enterprise Linux 6 (EL6) or higher (RHEL, OEL, CentOS, Rocky Linux)
  • SPARC/Solaris
  • IBM AIX

Python

DBCollect is a Python ZIP app. This means Python needs to be available in the environment to run dbcollect. Some systems do not have this by default.

  • Requires Python (2.6+ or 3.x)
    • On Linux (EL6+) works out of the box
    • On AIX/HP-UX, need to install Python first, Windows not supported
    • On Solaris (and AIX) Python may be a very old version that is not supported

A Python ZipApp is a standard ZIP file with an additional "shebang" prepended: #!/usr/bin/env python

  • This causes dbcollect to be called with whatever ‘python’ version is in $PATH
  • If this does not work, manually run python: /usr/bin/python3 /usr/local/bin/dbcollect <options>
  • Executable can be inspected with unzip –v /usr/local/bin/dbcollect
  • Run simply as root or as ‘oracle’ user/owner

On UNIX (AIX, Solaris) you may have to create a symbolic link or run dbcollect like this:

python3 /usr/local/bin/dbcollect

If all else fails, you can run dbcollect from python directly:

python /usr/local/bin/dbcollect
# or
/usr/bin/python /usr/local/bin/dbcollect
# or
python2 /usr/local/bin/dbcollect

Oracle

  • Oracle RDBMS 11g or higher (optional)
If the system is not an Oracle database server, only OS config and performance data will be collected
  • Diagnostics pack license OR statspack configured on the database(s)
  • Access to the 'oracle' special user or dba privileges ('root' not required)
  • Database instances up and running (opened read/write required for AWR/Statspack)
  • SYS credentials (hence the 'oracle' or dba user requirement)

Other Prerequisites

  • Some free space in /tmp (or elsewhere, use --tempdir)

Linux

On Linux (EL7+) both Python 2 and 3 may be installed. To set the preferred version globally on the system, use alternatives

alternatives --set python /usr/bin/python3

AIX

On IBM AIX, you need to install Python first. You can get python for AIX from AIX Toolbox (IBM)

Make sure it is executable and available in $PATH.

Simply running python should work.

SAR/Sysstat is usually available on AIX but not enabled by default. In that case there will be no OS performance (SAR) data. dbcollect can use NMON data as well with some caveats, see TBD.

Solaris

On Solaris, Python should be already available. It may be an older version. Make sure you can run python from the command line.

SAR/Sysstat is usually available on Solaris (like AIX) but not enabled by default. In that case there will be no OS performance (SAR) data. dbcollect can use NMON data as well with some caveats, see TBD.

HP-UX

HP-UX has experimental support. Some OS commands require sudo access, run dbcollect --sudoers to install the sudoers file before proceeding. This will allow dbcollect to pick up required stuff like CPU model, disk capacities and more. sudo must be installed for this to work.

Windows

dbcollect does not yet support Windows. Let me know if you need it.

Installation

Downloading DBcollect

The latest release is always available on the releases page.

Easy Install

If your system has internet (https) access, see dbcollect install for an easy way to install dbcollect

Warning

  • DBCollect location
Do NOT put dbcollect in non-standard locations such as /tmp, /root etc. The user dbcollect runs as (usually oracle) needs to have access to the dbcollect file (hence it does not work in /root). It also may not work on mounted paths that have execute disabled (/tmp, /var/tmp, ...)
  • Cloning Git Repository
Do NOT clone the git repository and run it from there (it will result in an error). This to prevent tampering, and weird problems (the zipapp package ensures all required files are contained in a predictable location).

Test working

  • Run dbcollect -h to see the help page
If this works, dbcollect is installed correctly
  • Run dbcollect --version to show version information
  • Run dbcollect --update to update to the latest version
Optional, requires internet access