django-processinfo 0.6.2.0103
django-processinfo is a Django application to collect information about the running server processes.
Latest Version: 0.6.1.0503
django-processinfo is a reuseable Django application for collecing information about the running server processes. We try to cause as little additional overhead: django-processinfo creates most of the time only one database query to update the data.
The most important data that django-processinfo will be captured:
Process statistics:
- process PID, start time, life times
- Number of average/max living processes
- min/average/max response times
- Total request/exceptions count
Memory statistics:
- min/average/max memory usage (VmRSS, VmPeak)
System informations:
- System memory usage
- Swap usage
- load average
django-processinfo splits some of these data per SITE_ID, so you can see e.g. which site is mostly used.
What is it not:
- track user actions
- collect infos which are found in e.g. apache.log
- Its not a sourcecode profiler (read https://code.djangoproject.com/wiki/ProfilingDjango)
more info: http://www.python-forum.de/viewtopic.php?f=6&t=27168 (de)
limitation
This only works, if /proc/$$/status exists. So only on unix/linux like platforms, yet.
install
- install it e.g.:
pip install django-processinfo
- add settings (see below)
- create tables (run syncdb)
settings
add this to your settings.py:
import os
import django_processinfo
INSTALLED_APPS = (
...
'django_processinfo',
...
)
MIDDLEWARE_CLASSES = (
'django_processinfo.middlewares.django_processinfo.ProcessInfoMiddleware',
...
)
# Put templates above admin contrib, e.g.:
TEMPLATE_DIRS = (
...
os.path.join(os.path.abspath(os.path.dirname(django_processinfo.__file__)), "templates/"),
...
)
# include app settings from ./django_processinfo/app_settings.py
from django_processinfo import app_settings as PROCESSINFO
# Change settings like this:
PROCESSINFO.ADD_INFO = True
ProcessInfoMiddleware
The ProcessInfoMiddleware can actually be inserted anywhere. However, it should be added far above. Thus, to capture everything.
For performance enhancement, you can put ProcessInfoMiddleware after LocalSyncCacheMiddleware. But then, however, lacks statistical values on every cache hit!
app settings
Available django-processinfo settings can you found in ./django_processinfo/app_settings.py
history
v0.6.2
- Don't insert django-processinfo "time cost" info if response.status_code is not 200
v0.6.1
- Auto cleanup ProcessInfo table to protect against overloading.
v0.6.0
- Add "Reset all data" in object tools.
- Make "Remove dead PIDs" and "Reset all data" available on both admin pages.
v0.5.2
v0.5.1
- Add "Remove dead PIDs" as admin view in "Process statistics" object tools (top, right, grey links)
v0.5.0
- Model changes: Please recreate tables, e.g.: ./manage.py reset django_processinfo
- New: Display some static system informations (uname, domain name, ip adress, python version, sys.prefix)
- New: current living processes (also per site)
- display sum of user/system mode time
v0.4.1
- Bugfix for UnicodeEncodeError in setup: Use new solution, see: https://code.google.com/p/python-creole/wiki/UseInSetup
v0.4
- Bugfix with "Total created processes"
- Display "Process lifetime"
v0.3.0
- Display some system information from /proc/meminfo and 'load average'
- Many Bugfixes
v0.2.0
- Many things changes! Recreate tables, e.g: ./manage.py reset django_processinfo
v0.1.0
- first Version
donation
If you like it, send some Bitcoins to 1J2gfYNSjpB9P7EkpTVWUY3rWQCpbfjEhX ;)
links
| GitHub | https://github.com/jedie/django-processinfo |
| PyPi | http://pypi.python.org/pypi/django-processinfo |
| IRC | #pylucid on freenode.net |
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| django-processinfo-0.6.2.0103.tar.gz (md5) | Source | 2012-01-03 | 17KB | 279 | |
- Author: Jens Diemer
- Home Page: https://github.com/jedie/django-processinfo
-
Categories
- Development Status :: 1 - Planning
- Development Status :: 2 - Pre-Alpha
- Environment :: Web Environment
- Framework :: Django
- Intended Audience :: Developers
- License :: OSI Approved :: GNU General Public License (GPL)
- Operating System :: POSIX
- Operating System :: Unix
- Programming Language :: Python
- Topic :: Database :: Front-Ends
- Topic :: Documentation
- Topic :: Internet :: WWW/HTTP :: Dynamic Content
- Topic :: Internet :: WWW/HTTP :: WSGI :: Application
- Package Index Owner: pylucid
- DOAP record: django-processinfo-0.6.2.0103.xml


