datasette-psutil
Datasette plugin adding a /-/psutil debugging endpoint
Installation
Install this plugin in the same environment as Datasette.
$ pip install datasette-psutil
Usage
Visit /-/psutil on your Datasette instance to see various information provided by psutil.
Example
You can visit a live demo here: https://datasette-psutil-demo-j7hipcg4aq-uw.a.run.app/-/psutil
Sample output:
process.open_files()
popenfile(path='/tmp/fixtures.db', fd=6)
process.connections()
pconn(fd=5, family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, laddr=addr(ip='169.254.8.130', port=8080), raddr=addr(ip='169.254.8.129', port=52621), status='ESTABLISHED')
pconn(fd=3, family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, laddr=addr(ip='0.0.0.0', port=8080), raddr=(), status='LISTEN')
process.memory_info()
pmem(rss=56827904, vms=242540544, shared=0, text=0, lib=0, data=0, dirty=0)
process.cmdline()
'/usr/local/bin/python'
'/usr/local/bin/datasette'
'serve'
'--host'
'0.0.0.0'
'-i'
'fixtures.db'
'--cors'
'--inspect-file'
'inspect-data.json'
'--port'
'8080'
process.parents()
psutil.Process(pid=1, name='sh', started='23:19:29')
process.threads()
pthread(id=2, user_time=7.27, system_time=3.99)
pthread(id=4, user_time=0.01, system_time=0.0)
pthread(id=5, user_time=0.0, system_time=0.0)
pthread(id=6, user_time=0.0, system_time=0.0)
pthread(id=7, user_time=0.0, system_time=0.0)
pthread(id=8, user_time=0.0, system_time=0.0)
psutil.getloadavg()
(0.0, 0.0, 0.0)
psutil.cpu_times(True)
scputimes(user=0.0, nice=0.0, system=0.0, idle=0.0, iowait=0.0, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)
scputimes(user=0.0, nice=0.0, system=0.0, idle=0.0, iowait=0.0, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)
psutil.virtual_memory()
svmem(total=2147483648, available=2093080576, percent=2.5, used=31113216, free=2093080576, active=42860544, inactive=11513856, buffers=0, cached=23289856, shared=262144, slab=0)
list(psutil.process_iter())
psutil.Process(pid=1, name='sh', started='23:19:29')
psutil.Process(pid=2, name='datasette', started='23:19:29')
Release files for datasette-psutil 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datasette_psutil-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Release files / datasette_psutil-0.2-py3-none-any.whl
| Download URL | datasette_psutil-0.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3e1cdee93bb5efda5f946ed945f965fb806a635e7a2eec76508775653cfe222
|
|
BLAKE2b-256 checksum How to use checksums |
a85013638bed9fef1be07a18b736ecd24e528f2af7cbc85e4e88bc9f94d033eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10
|