Was this page helpful?

Enabling Checkdeki

    Overview

    checkdeki is a BASH script that is run as a cron job. It checks the status of your MindTouch install and if it detects that it isn't running properly, it will automatically restart the MindTouch API.

    Goal

    After completing this tutorial you will have checkdeki running on your system

     

    Steps

    1. Download the checkdeki script to your home directory:
      cd ~
      wget https://svn.mindtouch.com/source/public/dekiwiki/10.0.2/src/scripts/checkdeki
    2. Give the script execute permission:
      chmod 755 ~/checkdeki
    3. Move the script to /usr/local/bin:
      mv ~/checkdeki /usr/local/bin/checkdeki.sh
    4. Setup the cron job to execute the script every 10 minutes.
      crontab -e
    5. Add the following line to the crontab:
      */10 * * * * sh /usr/local/bin/checkdeki.sh
    6. Exit crontab to reload your crontab.

    Customizing checkdeki

    Checkdeki has two configurable variables. They are as follows:

    MEM_THRESHOLD=300000     # set memory threshold at 300MB
    EMAIL=""                 # change to appropriate email address

    MEM_THRESHOLD is the memory limit for Mono. If Mono exceeds this amount of memory usage, it will cause MindTouch to restart. We suggest you set this to 1/3rd of your system RAM.

    The EMAIL variable is the e-mail address you would like checkdeki to e-mail when it restarts the API. By default, this e-mail will be sent to the root account on the server. To set the variable to send e-mail to your e-mail address, replace the username@example.com in the line below with your email address.

    EMAIL="username@example.com"

    What's Next

    If the api is restarting frequently, it is recommended to review the API logs to see if there is a fatal error causing the crash.  

    Related


    Was this page helpful?
    Tag page
    Viewing 2 of 2 comments: view all
    I had to remove sh in crontab - the script is a bash script! -> #!/bin/bash
    Posted 00:52, 23 Nov 2010
    1. on debian, you should "apt-get install tidy". 2. don't forget to use the good version when wgetting "https://svn.mindtouch.com/source/public/dekiwiki/blahblah"
    Posted 07:36, 23 Aug 2012
    Viewing 2 of 2 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by