My favorites | Sign in
Project Logo
                
Code license: MIT License
Labels: zope, memory, flot, svg
Feeds:
People details
Project owners:
  peterbe

Description

This is a (Linux only) python script that reads your Zope's Z2.log file at the same time it reads your memory usage using /proc/<pid>status.

When it's done reading and taking measurements it generates a user friendly graphs that displays the memory usage over time with the ability to find out what URLs caused what changes to the memory usage.

Why bother

To try to track down what in your Zope application causes the RAM memory to fill up. Running this takes plenty of RAM too but not as much as some Zopes do.

How to use it

No need to install anything. Just download the package and run python get_readings like this

$ python get_readings.py --help
$ python get_readings.py /var/zope2.8.10

Then click around in your application so that it has work a bit and hopefully trigger some URL that will cause major memory usage changes. Once you feel you've tested enough (say 5 min of clicking around), the hit Ctrl-C which stops the readings and generates a graph. Once generated, open the generated index.html file in Firefox. Use the mouse to select areas of interest and it'll tell you what URLs caused what memory increase. If you have a long running Zope that you want to keep an eye on over a longer period of time you might want to use the --long-term option which means it only records measurements where there is an actual change in memory usage. Like this:

$ python get_readings.py --long-term /var/zope2.8.10

Below is a screenshot of what the report graph might look like:

About the developer

This project started as a very rough script in a short time frame and I've now spent equally long preparing it as an Open Source project as I have coding on it.

My name is Peter Bengtsson and my company is Fry-IT









Hosted by Google Code