PyCon: Introspecting Running Python Processes

See the website.

What is your application doing?

Logging is your application's diary, but there are some drawbacks.

gdb-heap, eventlet's backdoor module, and Werkzeug's debugger are all useful tools.

These all have tradeoffs.

What's missing compared to the JVM? Look at JMX.

jconsole connects to a running JVM.

jstack sends a signal to the JVM to dump the stack of every thread.

You can expose metrics via JMX.

New Relic and Graphite are also useful.

New Relic does hosted web app monitoring.

Graphite is a scalable graphing system for time series data.

socketconsole is a tool that can provide stack trace dumps for Python processes. It even works with multi-processed and multi-threaded apps. It does not use UNIX signals.

mmstats is "the /proc filesystem for your application." It uses shared memory to expose data from an app. It has a simple API.

mmash is a web server that exposes stuff from mmstats.

He uses Nagios. He has pretty graphs.

See also:Projects used in this talk:See also:

(There wasn't enough time for more than a few questions for each of the talks this year. That's really too bad because, often, the questions are really interesting.)