Skip to main content

list process' PSS sorted descendingly within their parent-child hierarchy. can also do same for disk-space usage

Project description

PSS-tree

# python -m psstree --help

usage: __main__.py [-h] [--expand] [--raw] [--du PATH]

gets process' PSS via /proc/<PID>/smaps(_rollup), sorts it descendingly within their parent-child hierarchy, and displays it in an interactive TUI with collapsible sections. alternatively can do the same for disk-space usage given a root-path


options:
  -h, --help  show this help message and exit
  --expand    [TUI only] expand all collapsible sections at start
  --raw       disable TUI and dump formatted repr directly to stdout
  --du PATH   report disk space instead, for given root-path

# python -m psstree --raw

Proportional Set Size (PSS) "[<total-PSS-including-all-children>] command-name(pid): `<individual-PSS>` <full-cmdline-args>"
 ╭─[15.78MB] bash(7): `2.06MB` ['bash']
 │  ├─[12.77MB] python(148): `12.77MB` ['python', '-m', 'psstree', '--raw']
 │  ├─[0.32MB] sleep(144): `0.32MB` ['sleep', '10']
 │  ├─[0.31MB] sleep(143): `0.31MB` ['sleep', '10']
 │  ╰─[0.31MB] sleep(145): `0.31MB` ['sleep', '10']
 ╰─[1.83MB] bash(1): `1.51MB` ['bash']
    ╰─[0.32MB] sleep(147): `0.32MB` ['sleep', '10']

# python -m psstree --raw --du ./src/

Disk-Space usage "[<total-space-including-subdirs-recursively>] <path>"
 ╶─[0.098MB] ./src
    ├─[0.078MB] ./src/psstree
    │  ├─[0.059MB] ./src/psstree/__pycache__
    │  │  ├─[0.012MB] ./src/psstree/__pycache__/utils.cpython-314.pyc
    │  │  ├─[0.012MB] ./src/psstree/__pycache__/utils.cpython-311.pyc
    │  │  ├─[0.008MB] ./src/psstree/__pycache__/utils.cpython-39.pyc
    │  │  ├─[0.008MB] ./src/psstree/__pycache__/types.cpython-311.pyc
    │  │  ├─[0.004MB] ./src/psstree/__pycache__/__main__.cpython-39.pyc
    │  │  ├─[0.004MB] ./src/psstree/__pycache__/tui.cpython-39.pyc
    │  │  ├─[0.004MB] ./src/psstree/__pycache__/__main__.cpython-314.pyc
    │  │  ├─[0.004MB] ./src/psstree/__pycache__/tui.cpython-311.pyc
    │  │  ╰─[0.004MB] ./src/psstree/__pycache__/__main__.cpython-311.pyc
    │  ├─[0.008MB] ./src/psstree/utils.py
    │  ├─[0.004MB] ./src/psstree/types.py
    │  ├─[0.004MB] ./src/psstree/tui.py
    │  ╰─[0.004MB] ./src/psstree/__main__.py
    ╰─[0.020MB] ./src/psstree.egg-info
       ├─[0.004MB] ./src/psstree.egg-info/PKG-INFO
       ├─[0.004MB] ./src/psstree.egg-info/SOURCES.txt
       ├─[0.004MB] ./src/psstree.egg-info/requires.txt
       ├─[0.004MB] ./src/psstree.egg-info/top_level.txt
       ╰─[0.004MB] ./src/psstree.egg-info/dependency_links.txt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psstree-0.2.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

psstree-0.2.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file psstree-0.2.1.tar.gz.

File metadata

  • Download URL: psstree-0.2.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for psstree-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6ab31adb6982d08b78f293fff70b80ef0f84fb1047bf008ece0d0cb30ab56b33
MD5 59d34fe3412b08271c631030ee928b5d
BLAKE2b-256 cd318e3c3f0328521bf2f1d35937d62bb82d26f64526358c19e2d95695ffe901

See more details on using hashes here.

File details

Details for the file psstree-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: psstree-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for psstree-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e15af2c406e06570baf210741d89379938e9ae23b12a4faefa35f457058b8195
MD5 9bffc7fa99f00335097687fb0a56a7b4
BLAKE2b-256 fc3edab8a0c21f19c547533c9ece5623fe39b3e40eace70fcde78b3a6783a33b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page