Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save steveosoule/be0df47d262bdd5ceb60 to your computer and use it in GitHub Desktop.
Save steveosoule/be0df47d262bdd5ceb60 to your computer and use it in GitHub Desktop.
Miva - Performance Profiling and Diagnostics with diagtool.mvc

Miva - Performance Profiling and Diagnostics with diagtool.mvc

  1. Download the diagnostic module
    1. Go to the Miva Downloads page.
    2. Download and extract the "Miva Merchant Empresa" for your OS.
    3. Inside the extracted folder, look for the diagtool.mvc. It's likely in a folder like:
      mivavm-v5.36/tools/diagtool.mvc
      
  2. Upload the diagtool.mvc file to the web-root directory (Typically that would be at: /httpdocs/diagtool.mvc).
  3. Update the /cgi-bin/mivavm.conf file with the following logging settings (View this miva.com/forum post for other log-level options).
logfile=diagtool.log
loglevel=144
logcookie=diagtool
  1. Visit https://www.yourdomain.com/diagtool.mvc.
  2. Click Log Cookie Status link on sidebar menu, then click Set Log Cookie option.
  3. Visit the page(s) that you want to test.
  4. Download the log file at /private/mivadata/diagtool.log. Note that the log file will be appended to for each page tested. It is generally recommended to download the log file locally, and then delete it from the server after each page visit to separate the page results.
  5. Run the mvprof command in your terminal. View the syntax and options on this miva.com/forum post. Note that this command may change depending on installation of the mvprof tool, however, it is recommended to add the path for the tool to the global path for your OS. Once the global path is set, you should be able to run the following terminal command:
$ mvprof -output <path/for/outputfile> <path/for/inputfile>

Example (Mac or Unix):

$ cd ~/path/to/diagtool.log
$ mvprof -output diagtool_results.txt diagtool.log
  1. After diagnostics have been completed, the tool should be removed from the server. To do so, visit the https://www.yourdomain.com/diagtool.mvc, and click the REMOVE TOOL FROM SERVER option.
  2. Clean up the /cgi-bin/mivavm.conf by removing or commenting out the log settings that were added earlier (logfile, loglevel, & logcookie).

Special Thanks to Patrick Stearns for contributing to this doc and adding more detailed steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment