Datasette plugin adding a /-/psutil debugging endpoint
Project description
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')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datasette_psutil-0.2-py3-none-any.whl.
File metadata
- Download URL: datasette_psutil-0.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3e1cdee93bb5efda5f946ed945f965fb806a635e7a2eec76508775653cfe222
|
|
| MD5 |
88f729f8d8c655ef642f9fa780432068
|
|
| BLAKE2b-256 |
a85013638bed9fef1be07a18b736ecd24e528f2af7cbc85e4e88bc9f94d033eb
|