This installation guide provides step-by-step instructions to install mtools on Microsoft Windows Server 2008 R2, based on 64bit packages. For the 32bit 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 the latest 2.7.x folder
    • download Windows x86-64 MSI Installer (not the 32bit Windows x86 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.4)

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

    • There is no official 64bit binary package available (see reason here), but an unofficial binary can be found at http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
    • download numpy‑1.9.2+mkl‑cp27‑none‑win_amd64.whl
    • in the Powershell, change into the Downloads directory and install with pip.exe install numpy‑1.9.2+mkl‑cp27‑none‑win_amd64.whl
  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.