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.1.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.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tpu_top-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 b15265cc0735d3526811d181994d06633f675e1dd45f193284377803a2bbc4b3
MD5 e96c399de10c94a1db7762c0e856ce32
BLAKE2b-256 2eb26f53784148323bba37eae101c0a54919b8ad22f3ed43a0c3d81c827197c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tpu_top-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e162acf1cd4536b1f7ce69564dd2fdf80b7a7771971bbc9cfe1c882939b4355e
MD5 81b8a294afa0be36ca5e5f0bc1dc7c09
BLAKE2b-256 534d9bacf362b0c2f85b56ef3144349d99b63b2e391973a8ba7cc1e92c29441f

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