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.

alt text

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.0.tar.gz (14.4 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.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tpu_top-0.1.0.tar.gz
  • Upload date:
  • Size: 14.4 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.0.tar.gz
Algorithm Hash digest
SHA256 a51d1572e332341aa4a491aca6c862305a8ac59a8cb0a5957e98eeb99a884a8a
MD5 a1fa8b87b64e03b9dc6678b3f1525da8
BLAKE2b-256 299cb7a5012117062aed82cf437a357c379a5b3c6734dff41e66449bdd987f37

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tpu_top-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7081c3d0d0718a7c54ebd30c0b68e4e9e4f2278e9a0a7ef4bf962b45e050f242
MD5 721f80e9fce308559b62a726c53b670c
BLAKE2b-256 5fa53d03b196b055197ce64a20d7ccb196694459357379b38ca26c853f96ef0e

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