DBCollect/Install: Difference between revisions
No edit summary |
No edit summary |
||
Line 51: | Line 51: | ||
* Some free space in /tmp (or elsewhere, use --tempdir) | * Some free space in /tmp (or elsewhere, use --tempdir) | ||
= Downloading DBcollect = | = Installation = | ||
== Downloading DBcollect == | |||
The latest release is always available on the releases page: | The latest release is always available on the releases page: | ||
Line 59: | Line 61: | ||
[https://dblytics.dirty-cache.com/download DBCollect Download (application page, not always working)] is a direct link to the latest version. | [https://dblytics.dirty-cache.com/download DBCollect Download (application page, not always working)] is a direct link to the latest version. | ||
= Easy Install = | == Easy Install == | ||
If your system has internet (https) access, see [https://dblytics.dirty-cache.com/dbcollect dbcollect install] | If your system has internet (https) access, see [https://dblytics.dirty-cache.com/dbcollect dbcollect install] | ||
Line 66: | Line 68: | ||
== Warning == | == 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, ...) | |||
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). | 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). |
Revision as of 11:53, 10 October 2024
Summary
Installing DBCollect is pretty simple: download the latest dbcollect zipapp, put it somewhere in $PATH, and make it executable.
Requirements
Operating Systems
- Linux
- Enterprise Linux 6 (EL6) or higher (RHEL, OEL, CentOS, Rocky Linux)
- SPARC/Solaris
- IBM 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 then work.
Python
DBCollect is a Python ZIP app
- 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
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
Oracle
- Oracle RDBMS 11g or higher (optional)
- 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)
Installation
Downloading DBcollect
The latest release is always available on the releases page:
DBcollect releases (GitHub) On the Github releases page, go to the latest release, open Assets and download dbcollect.
DBCollect Download (application page, not always working) is a direct link to the latest version.
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).
Other requirements
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.
Solaris
On Solaris, Python should be already available. It may be an older version.
Make sure you can run python
from the command line.
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.
Python
The dbcollect app runs using a shebang (#!/usr/bin/env python
). This means Python needs to be available in the environment to run dbcollect
. Some systems do not have this by default.
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