How to run and automate ProTop health checks for your databases.
Database health checks can be executed by running:
[PROTOPDIR]/bin/hc.sh[bat] [friendlyName] from the command line.
They can also be run from your cron/task scheduler.
The default health check runs for 30 minutes and should be run during normal business hours. It is best to have a recent database analysis in [PROTOPDIR]/dbanalys (not run during business hours).
The most recent health check report is uploaded to the web portal and accessed from the ProTop Dashboard by right-clicking the resource of interest in the Resources window and selecting Health Check from the menu.
hc.sh[bat] optionally takes three additional parameters:
$2=sample interval (default 300 seconds),
$3=number of samples, default 5, and
$4=db.lg log file look back (how far back in the db.lg to scan for database health issues), default is 7 days
hc.sh[bat] checks the activity and configuration of many major subsystems (if you use them) and reports where they are out of bounds, including:
- Remote Servers
- Big B Usage
- Storage Areas Configuration
- Resource Waits
- After Imaging
- Network Activity
- Broker Configuration
- Use of Tables by Users
- Secondary Buffer Usage (B2)
- CDC Queue
- File IO
- Application Servers
- User IO
- and others ...
hc.sh[bat] produces the following output:
- A log file in [PROTOPDIR]/healthcheck.*.log
- Alerts, which are sent to the ProTop Portal
- The Health Check report which is sent to the portal as mentioned above
- [PROTOPDIR]/bin/idxcompact.*.sh[bat] which can be scheduled to run from your cron/scheduler - only useful for larger databases and databases that have not been recently reorganized (see below)
- DB Analysis and Review Reports (also produced by ^r) in the [PROTOPDIR]/rpt directory
If any of the indexes in your ProTop monitored databases are in need of being compacted, after running [PROTOPDIR]/hc.sh[bat] you will see a report in [PROTOPDIR]/rpt named friendlyName.idxcompact.rpt listing the indexes which need to be compacted. You will also see a script in [PROTOPDIR]/bin named idxcompact.*.sh[bat] containing a command line for each of the indexes which need to be compacted. You can run that script manually or tweak it to your needs and run it from a scheduler. The script can be run at any time you have resource bandwidth as idxcompact only locks 1-3 index blocks at a time allowing for other simultaneous read/write activity on the index.