Package: django-processinfo
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 timesNumber of average/max living processesmin/average/max response timesTotal request/exceptions countMemory statistics:min/average/max memory usage (VmRSS, VmPeak)System informations:System memory usageSwap usageload averagedjango-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 actionscollect infos which are found in e.g. apache.logIts not a sourcecode profiler (readhttps://code.djangoproject.com/wiki/ProfilingDjango)more info:https://www.python-forum.de/viewtopic.php?f=6&t=27168(de)limitationThis only works, if/proc/$$/statusexists. So only on unix/linux like platforms, yet.TODOAdd unittestsscreenshotsHeresome screenshots (from v0.2 - 19.08.2011)how it looks like:installinstall it e.g.:pip install django-processinfoadd settings (see below)create tables (run syncdb)settingsadd this to your settings.py:import os

import django_processinfo


INSTALLED_APPS = (
    ...
    'django_processinfo',
    ...
)

MIDDLEWARE = (
    'django_processinfo.middlewares.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 = TrueProcessInfoMiddlewareTheProcessInfoMiddlewarecan actually be inserted anywhere.
However, it should be added far above. Thus, to capture everything.For performance enhancement, you can putProcessInfoMiddlewareafterLocalSyncCacheMiddleware.
But then, however, lacks statistical values on every cache hit!app settingsAvailable django-processinfo settings can you found in./django_processinfo/app_settings.pydeveloper infoe.g.:~$ git clone https://github.com/jedie/django-processinfo.git
~$ cd django-processinfo
~/django-processinfo$ make
help                 List all commands
install-poetry       install or update poetry
install              install PyInventory via poetry
update               update the sources and installation
lint                 Run code formatters and linter
fix-code-style       Fix code formatting
tox-listenvs         List all tox test environments
tox                  Run pytest via tox with all environments
tox-py36             Run pytest via tox with *python v3.6*
tox-py37             Run pytest via tox with *python v3.7*
tox-py38             Run pytest via tox with *python v3.8*
pytest               Run pytest
update-rst-readme    update README.rst from README.creole
publish              Release new version to PyPi
run-dev-server       Run the django dev server in endless loop.run test projectThere exists a test project that can be easy run localy using the django dev. server and SQLite database.
To run this project, do this:~/django-processinfo$ make run-dev-serverYou must also setup a test user, call this:~/django-processinfo$ ./manage.sh createsuperuserDjango compatibilityVersionPythonDjango>=v1.1.03.7,3.8,3.9,3.103.2,4.0,4.1v0.9.0python 3django v2.2 LTSv0.8.0python 3django v1.11 LTSv0.7.0python 2django v1.5v0.6.1python 2django v1.4historydev-compare v1.1.0…masterTBCv1.1.0 - 16.08.2022Test against Django 3.2, 4.0 and 4.1 with Python 3.7, 3.8, 3.9 and 3.10Modernize project setupv1.0.2 - 09.12.2020 -compare v1.0.1…v1.0.2Bugfix “DataError: smallint out of range” on bigger PID numbersv1.0.1 - 2.11.2020 -compare v1.0.0…v1.0.1Bugfix injected footerFix/cleanup change listBugfix test projectmanage.shcleanup test projectv1.0.0 - 1.11.2020 -compare v0.9.0…v1.0.0modernize project setup using poetryAdd a test projectAdd testsupgrade code stylev0.9.0 - 26.02.2020 -compare v0.8.0…v0.9.0Updates for Django 2.2v0.8.0 - 09.03.2018 -compare v0.7.1…v0.8.0Updates for Python v3 and Django 1.11v0.7.1 - 20.08.2015 -compare v0.6.3…v0.7.1Changes for django 1.5 supportchange setup install_requires to Django v1.3.x - v1.5.xBugfix in templates: missed i18nv0.6.3 - 24.08.2012remove auto commit date from versionv0.6.2Auto cleanup ProcessInfo table to protect against overloading.Don’t insert django-processinfo “time cost” info if response.status_code is not 200v0.6.1Tested also with django v1.4change setup install_requires to Django v1.3.x - v1.4.xv0.6.0Add “Reset all data” in object tools.Make “Remove dead PIDs” and “Reset all data” available on both admin pages.v0.5.2Bugfix if no SWAP used.v0.5.1Add “Remove dead PIDs” as admin view in “Process statistics” object tools (top, right, grey links)v0.5.0Model changes: Please recreate tables, e.g.:./manage.py reset django_processinfoNew: 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 timev0.4.1Bugfix for UnicodeEncodeError in setup: Use new solution, see:https://code.google.com/p/python-creole/wiki/UseInSetupv0.4Bugfix with “Total created processes”Display “Process lifetime”v0.3.0Display some system information from /proc/meminfo and ‘load average’Many Bugfixesv0.2.0Many things changes! Recreate tables, e.g:./manage.py reset django_processinfov0.1.0first VersionDonationpaypal.me/JensDiemerFlattr This!SendBitcoinsto1823RZ5Md1Q2X5aSXRC5LRPcYdveCiVX6FlinksGitHubhttps://github.com/jedie/django-processinfoPyPihttp://pypi.python.org/pypi/django-processinfocontactCome into the conversation, besides the github communication features:Forumhttp://www.pylucid.org/en/forum/10/IRC#pylucid on freenode.net (Yes, the PyLucid channel…)webchathttp://webchat.freenode.net/?channels=pylucidNote: this file is generated from README.creole2022-08-1618:56:10 with"python-creole"