This module provides some statistics and other data helpful when sizing a hosting environment.
The following information is collected:
- Environment information: basic PHP, MySQL information, php.ini parameters.
- Performance data: average, min and max page requests/sec, breakdown of page views from anonymous vs. authenticated users.
- MySQL database: mysql_stat output, database size, node and user counts.
- Filesystem: File count and total size (from site's
The information can be viewed from within Drupal, emailed as text to a designated recipient, or (using Drush) exported as CSV.
- Because the logging function runs in hook_exit(), performance logging for anonymous users will not be accurate when Aggressive caching is enabled. It works fine with Normal caching.
- Only pages generated by Drupal using the hooks process will be counted. Standalone PHP pages or static files will not. To get a more complete HTTP reqests/sec picture, you'll have to fall back on log file processing, or using an external analysis tool such as Cacti or Munin.
- If a reverse proxy cache such as Varnish or Squid, or a CDN is used, request stats reported by this module may be lower than true page views, again because we're only tracking pages that Drupal is building for users.
- Module only supports MySQL at present. Logging should work with postgres, but database stats won't.
Since calculation of some of these statistics may themselves cause performance issues, there are permissions for both running and viewing calculations. It is suggested that calculations are run at off-peak times for very large or high-traffic sites.
Installation is the same as most other Drupal modules - unpack the archive file to your modules directory, then enable it at http://YOURSITE?q=admin/build/modules.
The module is intended to provide site owners with a snapshot of Drupal site configuration and load in order to allow hosting companies to accurately configure a hosting environment, and to suggest areas where optimization may be appropriate to improve Drupal performance.
You should choose a period of time that will be representative of your average site traffic - i.e. for a news site, you may wish to choose a Monday, and run performance logging for a 24 hour period to achieve coverage of your overall traffic. If your site has lower traffic, or highly variable traffic, you may wish to run logging for a longer period of time.
- Enable performance logging at http:///admin/settings/hosting_stats. Set "Capture peformance data" to "On". You may also choose to adjust the "Performance log limit", which will set an upper bound on the number of records that are retained in the database, but this is generally not necessary.
- Visit the reporting page at http:///admin/reports/hosting_stats. At any time you may choose to run one or all of the reports. Be aware that some of the reports may be database-intensive, and should preferably be run at off-peak traffic times. You may click the "Calculate _____ statistics" button under each test section, or click the "Calculate all statistics" button at the bottom of the form to run all reports.
- Once satisfied that you've captured sufficient data, you can send data to the email address configured as the hosting provider by clicking the "Send to host" button at the bottom of the page. This will send the output of the report in a text format. Note that we do NOT include any information about your users identities or content.
Hosting Diagnostics also allows most operations to be performed from Drush.
The following commands are available: hd-enable hd-disable hd-calculate hd-clearlog hd-stats
drush help <command> to view help for each Drush command.
The next upcoming feature will be a "core hack check" to determine if the site that this module runs on has modified core files.
A Drupal 7.x compatible version is planned. A Drupal 5.x version is unlikely.