Skip to main content

The top-like text-based user interface for Austin

Project description


Austin TUI

A Top-like Interface for Austin

         

GitHub Actions: Tests Travis CI PyPI LICENSE

Synopsis • Installation • Usage • Compatibility • Contribute

Buy Me A Coffee

Synopsis

The Python TUI is a top-like text-based user interface for Austin, written in pure Python. Originally planned as a sample application to showcase Austin uses, it's been promoted to a full-fledged project thanks to great popularity.

Austin TUI

The header shows you the information of the application that is being profiled, like its PID, the command line used to invoke it, as well as a plot of the amount of CPU and memory that is being used by it, in a system-monitor style.

Installation

Austin TUI can be installed directly from PyPI with

pip install austin-tui --upgrade

NOTE In order for the TUI to work, the Austin 2 binary needs to be on the PATH environment variable. See Austin installation instructions to see how you can easily install Austin on your platform.

Usage

Once Austin and Austin TUI are installed, you can start using them straight-away. If you want to launch and profile a Python script, say myscript.py, you can do

austin-tui python3 myscript.py

or, if myscript.py is an executable script,

austin-tui myscript.py

Like Austin, the TUI can also attach to a running Python application. To analyse the frame stacks of all the processes of a running WSGI server, for example, get hold of the PID of the parent process and do

sudo austin-tui -Cp <pid>

The -C option will instruct Austin to look for child Python processes, and you will be able to navigate through them with the arrow keys.

The TUI is based on python-curses. The version included with the standard Windows installations of Python is broken so it won't work out of the box. A solution is to install the the wheel of the port to Windows from this page. Wheel files can be installed directly with pip, as described in the linked page.

Full mode

By default, Austin TUI shows you statistics of the last seen stack for each process and thread when the UI is refreshed (about every second). This is similar to what top does with all the running processes on your system.

Austin TUI - Default mode

If you want to see all the collected statistics, with the frame stacks represented as a rooted tree, you can press F to enter the Full mode. The last seen stack will be highlighted so that you also have that information available while in this mode.

Austin TUI - Full mode

Save statistics

Peeking at a running Python application is nice but in many cases you would want to save the collected data for further offline analysis (for example, you might want to represent it as a flame graph). At any point, whenever you want to dump the collected data to a file, you can press the S key and a file with all the samples will be generated for you in the working directory, prefixed with austin_ and followed by a timestamp. The TUI will notify of the successful operation on the bottom-right corner.

Austin TUI - Save notification

Compatibility

Austin TUI has been tested with Python 3.6-3.9 and is known to work on Linux, MacOS and Windows.

Since Austin TUI uses Austin to collect samples, the same note applies here:

Due to the System Integrity Protection introduced in MacOS with El Capitan, Austin cannot profile Python processes that use an executable located in the /bin folder, even with sudo. Hence, either run the interpreter from a virtual environment or use a Python interpreter that is installed in, e.g., /Applications or via brew with the default prefix (/usr/local). Even in these cases, though, the use of sudo is required.

Contribute

If you like Austin TUI and you find it useful, there are ways for you to contribute.

If you want to help with the development, then have a look at the open issues and have a look at the contributing guidelines before you open a pull request.

You can also contribute to the development of the Austin TUI by becoming a sponsor and/or by buying me a coffee on BMC or by chipping in a few pennies on PayPal.Me.

Buy Me A Coffee

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

austin-tui-0.1.2.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

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

austin_tui-0.1.2-py3-none-any.whl (51.8 kB view details)

Uploaded Python 3

File details

Details for the file austin-tui-0.1.2.tar.gz.

File metadata

  • Download URL: austin-tui-0.1.2.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.6 Linux/5.4.0-1026-azure

File hashes

Hashes for austin-tui-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d7796abcd057ddc2c47ab51dfd040d6a75e9200e5d8cc430c0041632f9a1b18b
MD5 09a4eea1e689646a94513be1b41e55c3
BLAKE2b-256 4cdc8a67b57bc40c7242a53d25b3752b3fa45dff6fb360938bd4d710a7f9dcf3

See more details on using hashes here.

File details

Details for the file austin_tui-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: austin_tui-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 51.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.6 Linux/5.4.0-1026-azure

File hashes

Hashes for austin_tui-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bd10a66a8281b7c99ba259fa8100a727332b4eb9e46b7cd97476c884527a9499
MD5 ec95a9c1581ba5ec6c6a33287f4c8a82
BLAKE2b-256 88303b15f35d70453c0b74aa03cdf7bbcad303e79f24614fc636802e7031cd47

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