This installation guide provides step-by-step instructions to install mtools on Microsoft Windows Server 2008 R2, based on 32bit packages. For the 64bit version, see here.

Prerequisites

  • Windows Powershell needs to be installed
  • The computer must be able to access the internet

Installation Steps

  1. Download and install Python 2.7.x (currently 2.7.9)

    • go to https://www.python.org/downloads/
    • choose latest 2.7.x folder
    • download Windows x86 MSI Installer (not the 64bit Windows x86-64 MSI Installer)
    • during installation, include the "Add python.exe to Path" option (disabled by default)
  2. Download and install matplotlib 1.4.x (currently 1.4.2)

  3. Download and install NumPy 1.9.x (currently 1.9.1)

  4. Install pyparsing via pip

    • In the Powershell, run pip.exe install pyparsing
  5. Install mtools via pip

    • In the Powershell, run pip.exe install mtools

Usage

You can now run the mtools scripts mloginfo.exe, mlogfilter.exe, mplotqueries.exe, and mlogvis.exe from the Powershell. Note that mlaunch is currently not support for Windows platforms.

Example Powershell command:

> mlogfilter.exe .\mongod.log --slow | mplotqueries.exe

This finds all slow queries in the log file and shows them as a graph.