Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

Latest commit

 

History

History
26 lines (19 loc) · 1.1 KB

README.md

File metadata and controls

26 lines (19 loc) · 1.1 KB

MemWatcher

This is a small Sinatra app that's designed to run on a server that you want to monitor memory usage on. You configure a memory threshold and every time the /memcheck page is hit the memory usage on the server is checked. If it exceeds the specified amount, it records the running processes and the memory usage at that time. Subsequent memory checks won't be recorded unless they exceed the last highest memory usage seen. The max seen memory is reset after a configurable number of times.

Configuration

The following configuration options are available via environment variables:

  • MEMWATCHER_MEMORY_THRESHOLD - The memory threshold to record a process listing if exceeded. Defaults to 50MB.
  • MEMWATCHER_MAX_CHECKS - The number of checks before the max seen memory usage is reset. Dfaults to 6.
  • MEMWATCHER_LOGS_TO_KEEP - The number of log files to keep. Defaults to 25.
  • MEMWATCHER_LOG_DIR - The location to store the logs. Defaults to log/procs.

Copyright

Copyright (c) 2012 Joel Watson. See LICENSE for details.