Skip to main content

TPU Monitoring Dashboard

Project description

TPU-TOP

A modern, terminal-based monitoring dashboard for Google Cloud TPUs, designed to give you real-time visibility into your machine's performance.

Project Overview

tpu-top provides a visual, interactive TUI (Terminal User Interface) to monitor system and TPU resources. It is specifically tailored for high-performance computing environments like GKE (Google Kubernetes Engine) where deep learning models are trained on TPUs.

tpu-top UI

Key Features

  • 2x2 Metric Grid: Real-time tracking of CPU, RAM, Average TPU Utilization, and Average TPU HBM (Memory).
  • Visual Bar Charts: Multi-line vertical bar charts filling the display boxes to show resource usage scaling up to 100%.
  • Device Status Table: Detailed per-device breakdown showing duty cycle and memory usage for each local TPU chip.
  • Process Monitor: Lists active processes consuming CPU or TPU resources on the host.
  • Google Brand Styling: Color-coded graphs using Google's signature color palette (Blue, Red, Yellow, Green).
  • Version Awareness: Displays JAX, libtpu, and tpu-info versions directly in the header alongside detected TPU generation.

Installation

You can install tpu-top directly from the source directory.

Prerequisites

Ensure you have Python 3.8+ and access to a Cloud TPU environment. The tool relies on tpu-info to communicate with the TPU driver.

Standard Install

Navigate to the project root directory and run:

pip install .

Developer Install

If you are making modifications and want them to reflect immediately:

pip install -e .

How to Use

Once installed, you can launch the dashboard from anywhere in your terminal:

tpu-top

Environment Variables

  • TPU_TOP_MOCK=1: Force mock mode for testing on machines without physical TPUs.
  • TPU_TOP_ITERATIONS=N: Run for exactly N refresh cycles and exit (useful for automated tests).

Running Tests

To validate changes, run the unit tests:

python -m unittest test_main.py

(Note: If testing inside a GKE container, ensure dependencies are installed in your target environment).

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

tpu_top-0.1.2.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

tpu_top-0.1.2-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file tpu_top-0.1.2.tar.gz.

File metadata

  • Download URL: tpu_top-0.1.2.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for tpu_top-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a248373b14be57bd5b649b2b7f82ba8443fd7e908bc5d1fccd47545e05aa5181
MD5 89e3ec7b075a89c1e5f13050c6476e2f
BLAKE2b-256 3b710bbbe63862fd0f58cfaa7a5130c4a0eed3b451dafa44825a47e59b2a568e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tpu_top-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for tpu_top-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d1caa4f07971561b09c4e776c40fcd0f9b9cc7cfc2438f0e2fa4bab621f6cf1
MD5 39c2536183d0c1cbd4168de2408fad24
BLAKE2b-256 64bc6c4a3d9131a7e3b7a60aa73dd081adcd1383c0026e304cf450005be40576

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