DBCollect/Overview
Jump to navigation
Jump to search
This article is a stub. You can help us by expanding it.
Overview
DBcollect is a tool that collects database and host information from Oracle database servers in a standardized way, so it can easily be processed by workload analysis tools.
Example
# Install dbcollect via the quick install metohd
[root@db01 ~](-) # curl https://raw.githubusercontent.com/outrunnl/dbcollect/master/scripts/download | python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1925 100 1925 0 0 4372 0 --:--:-- --:--:-- --:--:-- 4375
Github dbcollect downloader - download the latest dbcollect release
-> Retrieving GitHub metadata from https://api.github.com/repos/outrunnl/dbcollect/releases/latest
-> Downloading binary version 1.6.0 from https://github.com/outrunnl/dbcollect/releases/download/v1.6.0/dbcollect
-> md5 hash: c943738c2f589758add20f1ef495423f
-> Saving binary as dbcollect
-> Setting permissions to mode 775
# Move dbcollect in /usr/local/bin ($PATH)
[root@db01 ~](-) # sudo mv dbcollect /usr/local/bin
# Test version
[root@db01 ~](-) # dbcollect -V
dbcollect 1.6.0 - collect Oracle AWR/Statspack, database and system info
Author: Bart Sjerps <bart@outrun.nl>
Copyright: Copyright 2020, Bart Sjerps
License: GPLv3+, https://www.gnu.org/licenses/gpl-3.0.html
Version: 1.6.0
Builddate: 2021-54-24 09:54
Run dbcollect
# Verify dbcollect contents
# As dbcollect is actually a ZIP file, you could unzip it and verify the code
[root@db01 ~](-) # unzip -v /usr/local/bin/dbcollect
Archive: /usr/local/bin/dbcollect
Length Method Size Cmpr Date Time CRC-32 Name
-------- ------ ------- ---- ---------- ----- -------- ----
0 Stored 0 0% 06-24-2021 09:53 00000000 modules/
0 Stored 0 0% 06-24-2021 09:53 00000000 sql/
0 Stored 0 0% 06-04-2021 14:38 00000000 lib/
7890 Stored 7890 0% 06-24-2021 09:53 69c764c0 dbcollect.py
2060 Stored 2060 0% 03-02-2021 08:38 808202b2 modules/updater.py
0 Stored 0 0% 06-04-2021 14:38 00000000 modules/__init__.py
4211 Stored 4211 0% 06-04-2021 14:38 94eb789d modules/awrstrip.py
7470 Stored 7470 0% 06-08-2021 11:19 ca6e6bd2 modules/syscollect.py
18030 Stored 18030 0% 06-24-2021 09:53 c2123dc2 modules/oracle.py
0 Stored 0 0% 09-29-2020 16:23 00000000 sql/__init__.py
2883 Stored 2883 0% 12-09-2020 20:57 ff3541aa sql/instance.sql
5765 Stored 5765 0% 12-09-2020 20:57 11ea706c sql/database.sql
5726 Stored 5726 0% 12-09-2020 20:57 e7cb4bcb sql/pdbinfo.sql
580 Stored 580 0% 06-04-2021 14:38 d31abc0d sql/awr_report.sql
562 Stored 562 0% 06-04-2021 14:38 8b34f5af sql/awrusage.sql
1966 Stored 1966 0% 06-04-2021 14:38 ad771e51 sql/getawrs.sql
1974 Stored 1974 0% 06-04-2021 14:38 434e6838 sql/getsps.sql
580 Stored 580 0% 06-04-2021 14:38 95a440f6 sql/sp_report.sql
22899 Stored 22899 0% 06-24-2021 09:53 0cce1b41 sql/dbinfo.sql
87 Stored 87 0% 10-30-2020 20:54 967cb29d lib/__init__.py
1800 Stored 1800 0% 10-16-2020 16:33 086a8907 lib/user.py
3228 Stored 3228 0% 06-04-2021 14:38 e1d507b6 lib/archive.py
3101 Stored 3101 0% 06-04-2021 14:38 5487c955 lib/functions.py
2471 Stored 2471 0% 06-04-2021 14:38 d351f5b2 lib/log.py
58 Stored 58 0% 06-24-2021 09:54 8fed2ee0 __main__.py
-------- ------- --- -------
93341 93341 0% 25 files
# Run dbcollect (default 10 days of AWR, user 'oracle'
dbcollect 1.6.0 - collect Oracle AWR/Statspack, database and system info
INFO : dbcollect 1.6.0 - database and system info collector
INFO : Current user is oracle
INFO : Zip file is /tmp/dbcollect-db01.lan.zip
INFO : Collecting OS info (Linux)
INFO : Collecting Linux SAR files
INFO : Collecting Oracle info
INFO : Found instance DEMO on /u01/app/oracle/product/12.1.0/dbhome_1
WARNING : Skipped DEMO (DOWN)
INFO : Found instance DEMO2 on /u01/app/oracle/product/12.1.0/dbhome_1
WARNING : Skipped DEMO2 (DOWN)
INFO : Found instance demo on /u01/app/oracle/product/12.1.0/dbhome_1
WARNING : Skipped demo (DOWN)
INFO : Found instance DB01 on /u01/app/oracle/product/12.1.0/dbhome_1
INFO : DB01: AWR usage detected, generating reports
INFO : Generating Oracle AWR/Statspack reports, with 1 workers
INFO : processing instance DB01
report 15 of 230 (6.5% done), elapsed: 0:00:34, remaining: 0:08:18