DBCollect/Options

From Dirty Cache Wiki
Jump to navigation Jump to search


Explanation of all options

help

--help or -h

Shows usage (list of all arguments)

version

-V | --version

Shows detailed version, build and copyright details

debug

-D | --debug

enables debugging. This will result in more logging (sometimes dumping unhandled Python exceptions and traces.

Even without this option, debug info is written to the dbcollect logfile for troubleshooting purposes.

quiet

-q | --quiet

Hides most normal terminal output (except errors). Useful for scripted runs (such as with DBCollect/Ansible)

overwrite

-o | --overwrite

Overwrites the previous dbcollect ZIP file if it exsts.

update

--update

Downloads new version of dbcollect from github and replaces the old version.

Requires https access to github.com

sudoers

--sudoers

Writes sudoers settings to /etc/sudoers.d/dbcollect. This allows dbcollect to run some commands as root, that otherwise would fail.

This retrieves some extra, optional information. Not required, but on HP-UX highly recommended, as otherwise disk devices cannot be properly detected.

filename

--filename FILENAME

Write to the given FILENAME instead of /tmp/dbcollect-<hostname>.zip.

If FILENAME is only an identifier, the new name will be /tmp/<filename>.zip.

If FILENAME is a full path, dbcollect will use it as new location (.zip extension will be added if needed)

tempdir

--tempdir TEMPDIR

Use TEMPDIR as alternative temporary folder (for example /var/tmp.

Useful if /tmp freespace is insufficient. dbcollect will always create a subdirectory such as /tmp/dbcollect_uwfb4li0 so it will never overwrite existing files or directories.

user

-u USER | --user USER

Normally, dbcollect will use the owner of the first detected Oracle instance (i.e., running ora_pmon_<instance>. Use this option to force using another user.

To work properly, it has to be a user with SYSDBA privileges.

days

-d DAYS | --days DAYS

The number of days for which to generate AWR or Statspack reports. The default is 10 days, so with an AWR interval of 1 hour and long enough AWR retention, about 240 AWR reports will be generated per instance.

Increasing this value will only work if the retention in Oracle is also high enough (and AWR data is actually available).

Note that the Linux SAR/Sysstat reports will always be the entire period of 30 or 31 days (where available).

end_days

--end_days END_DAYS

Number of days ago to stop AWR report generation. For example, you want to pick up reports from 20 days ago to 10 days ago:

dbcollect --days 20 --end_days 10

This can be used if you want to pick up a very specific period of time only.

force-awr

--force-awr

This causes dbcollect to ignore prior AWR report detection and always create AWR reports. You need to have Diagnostics Pack if you use this to avoid licensing violations.

statspack

--statspack

Force usage of Statspack even if AWR usage is detected.

ignore-awr

--ignore-awr

Ignores AWR reporting for databases that have no prior AWR usage.

strip

--strip

AWR reports usually contain (parts of) SQL code. This is sometimes considered a security issue. This option removes all SQL code sections from the AWR reports. It only works for AWR, not Statspack.

Note that it works on best-effort basis, if the AWR report cannot be parsed, the report will be saved in its original form.

no-rac

--no-rac

To make dbcollect as robust as possible, by default if running RAC, it generates AWR reports for all database instances which significantly increases runtime and ZIP file size.

If dbcollect is executed on all RAC nodes (recommended), this is not necessary and the double generation of AWR can be disabled using this option.

no-stby

--no-stby

By default, AWR reports cannot be created for Data Guard Standby databases. This is typically not a big problem as standby databases do not usually generate much workload. However, if real-time queries are running against the standby database (requiring Active Data Guard license), we are also interested in the workload on those instances.

Since Oracle 12, Remote Management Framework (RMF) allows AWR reports to be generated for standby databases (but it has to be configured by the DBA first). dbcollect will pick up AWR reports from RMF managed standby databases (through the primary instance).

Use this option to disable this feature.

no-awr

--no-awr

Skip AWR/Statspack reports completely. Note that the dbinfo reports are still created.

no-sar

--no-sar

Skips collection of SAR reports (Linux/UNIX).

no-ora

--no-ora

Skips entire collection of Oracle related information. Only OS info will be collected.

no-sys

--no-sys

Skips entire collection of OS related information. Only Oracle info will be collected.

no-orainv

--no-orainv

Skip using Oracle Inventory for ORACLE_HOME and instances detection. Only instances in oratab will be detected.

This can be useful for troubleshooting Oracle Instances detection.

no-oratab

--no-oratab

Skip using Oracle oratab for ORACLE_HOME and instances detection. Only instances in Oracle Inventory will be detected.

This can be useful for troubleshooting Oracle Instances detection.

splunk

--splunk

Generate additional reports for usage with Dell's internal SPLUNK toolset (for Dell Presales Engineers) or Dell LiveOptics. These reports contain extra info such as database size.

include

--include INSTANCE_LIST

Include only the given instances (comma separated). Without this option, all detected instances are included.

exclude

--exclude INSTANCE_LIST

Exclude only the given instances (comma separated).

Note that excluded instances are prioritized over included.

tasks

-t TASKS | --tasks TASKS

Set the maximum number of workers (for AWR generation) to TASKS (default = 50% of available CPUs).

timeout

--timeout TIMEOUT

Change the timeout for long running SQL scripts. The default is 10 minutes.

Useful for troubleshooting timeout errors.