Not a developer? Go to MovableType.com

Documentation

PerformanceLogging

This is documentation about a configuration directive, which can be placed within Movable Type’s core configuration file, mt-config.cgi, to customize the behavior of the system.

This configuration directive accepts a boolean value (0 or 1) and turns performance logging on and off accordingly.

Guide to Performance Logging and Monitoring

Example Configuration

PerformanceLogging 1
PerformanceLoggingPath /var/log/mt/
ProcessLoggingThreshold 0.5

Log Format

When performance logging is enabled, Movable Type will attempt to log as much information as it can during the life-cycle of a request. Doing so will provide valuable information regarding specific areas of the application that could benefit from performance tuning, and will allow users to more easily analyze what within their system may be contributing to poor performance.

Movable Type will attempt to log:

  • Information about your operating system, installed software, etc. (this information is logged only once)
  • How much memory is being utilized by the process at the beginning and at the end of the request.
  • How long it takes to process each template tag, both within the application and on the published blog.
  • The URL of the request
  • The process ID of the request for easier correlation and log analysis.

Log Rotation

Log files will be rotated automatically each day to ensure that files do not get needlessly large and to make it easier on admins to archive older log files.

Sample Output

# Operating System: darwin/9.1.0
# Platform: darwin
# Perl Version: v5.10.0
# Web Server: Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7l DAV/2  
    PHP/5.2.4 mod_fastcgi/2.4.2
# Database: MySQL/5.0.45
# Database Library: DBI/1.601; DBD/4.005
# App Mode: CGI
[Wed Mar 5 10:12:54 2008] localhost pt-times: pid=14596, uri=[/cgi-bin/mt/mt.cgi?__mode=view&_type=entry&id=2733&blog_id=4], mem_start=24327, mem_end=26428, MT::Template::build[include/header.tmpl]=0.04259, MT::Template::build[include/actions_bar.tmpl]=0.01165, MT::Template::build[include/actions_bar.tmpl]=0.01149, MT::Template::build[include/footer.tmpl]=0.01177, MT::Template::build[edit_entry.tmpl]=0.21346, MT::App::CMS::run=0.48057, Total=0.79270
[Wed Mar 5 10:13:12 2008] mtbook.local pt-times: pid=14601, uri=[/cgi-bin/mt/mt.cgi?__mode=view&_type=entry&id=2734&blog_id=4], mem_start=24468, mem_end=26412, MT::Template::build[include/header.tmpl]=0.04200, MT::Template::build[include/actions_bar.tmpl]=0.01175, MT::Template::build[include/actions_bar.tmpl]=0.01143, MT::Template::build[include/footer.tmpl]=0.01069, MT::Template::build[edit_entry.tmpl]=0.15787, MT::App::CMS::run=0.46547, Total=0.72004
Back