Installation

Overview

Installing dbcollect is very simple:

  1. Download [DBcollect][latest version]
  2. Put the dbcollect file in /usr/local/bin
  3. Make it executable.

Additional steps may sometimes be required depending on OS and configuration, see below.

Python 2.6+ or 3.6+ needs to be available on the system.

Requirements

  • Python 2.6 or higher, or 3.6 or higher
  • Enterprise Linux 6, 7, 8 or 9, Solaris 11, IBM AIX 7
  • Some free space in /tmp (or elsewhere, use --tempdir)
  • Sysstat working correctly (or NMON on UNIX systems)

For Oracle (dbcollect will just pick up OS files if no Oracle databases are detected):

  • 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 other user with sysdba privileges (root not required but recommended) or a logons file
  • Database instances up and running (opened read/write required for AWR/Statspack)

Important

  • Make sure you have the latest dbcollect version
  • Install (and run) on ALL database nodes (including all RAC nodes)
  • Do not put dbcollect in other directories than /usr/local/bin or $HOME/bin. Mileage may vary. Some directories can cause trouble.

Easy way

Assuming the prerequisites are met, the easiest way to install the latest version of dbcollect is to run the downloader command on your host and move it to /usr/local/bin (root) or $HOME/bin (sysdba user)

This requires internet access via https (port 443).

Root install

# Download & install as root

curl -L https://github.com/bsjerps/dbcollect/releases/latest/download/dbcollect -o /usr/local/bin/dbcollect && chmod 755 /usr/local/bin/dbcollect

# Test correct installation
dbcollect -V

# If you get Python errors (Linux)
alternatives --set python /usr/bin/python3

DBA User install

# Download & install as sysdba user

curl -L https://github.com/bsjerps/dbcollect/releases/latest/download/dbcollect -o $HOME/bin/dbcollect && chmod 755 $HOME/bin/dbcollect

# Test correct installation
dbcollect -V

Manual install

If your database host is behind a firewall and cannot connect to the internet, download DBCollect here:

  • Download latest dbcollect: latest dbcollect version
  • Move it to /usr/local/bin (if you are root) or $HOME/bin (if you are not root)
  • Make it executable: chmod 755 /usr/local/bin/dbcollect
  • Test if it works (run with help option): dbcollect -V
  • Collect the data: dbcollect
  • Get and upload the dbcollect ZIP datafile (/tmp/dbcollect-<hostname>.zip)

Linux

On Enterprise Linux 7 (RHEL 7, OEL 7, CentOS 7), Python2 is installed by default.

Enterprise Linux 8 (RHEL 8, OEL 8) should now work fine as dbcollect is Python3 compatible.

python may not be configured by default, you can set python to use python3:

RHEL-Compatible:

alternatives --set python /usr/bin/python3

Debian-compatible:

apt install python-is-python3

Very old Linux versions (RHEL5) do not work unless there is a more recent version of Python on the system.

AIX

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

You may need to run using python:

python3 /usr/local/bin/dbcollect <options>

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.

SPARC/Solaris

On Solaris, Python should be already available. It may be an older version.

You may need to run using python:

python3 /usr/local/bin/dbcollect <options>

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.

HP-UX

HP-UX has experimental support. You may need to run using python:

python3 /usr/local/bin/dbcollect <options>

Windows

dbcollect does not yet support Windows. Let me know if you need it. You can pick up (partial) Windows data using a [credentials file].

Updating

the --update option self-updates dbcollect if the system has internet access:

# Update dbcollect:
dbcollect --update
# Without root access, the new version will be saved as /tmp/dbcollect.
# Move it manually to the required location.

If not, manually install the new version.