nvitop/examples/collector-csv
2026-05-16 15:37:30 +08:00
..
collector_csv.py chore: update license header 2026-05-16 15:37:30 +08:00
README.md feat(examples): add examples/ folder and relocate the deprecated nvitop.callbacks (#216) 2026-05-16 15:34:29 +08:00
requirements.txt feat(examples): add examples/ folder and relocate the deprecated nvitop.callbacks (#216) 2026-05-16 15:34:29 +08:00

Collector → CSV

Polls ResourceMetricCollector.collect() on a fixed interval and appends each sample to a pandas DataFrame, then writes the result to results.csv with a parsed time column. Designed to be the simplest possible offline logger.

APIs Used

Install + Run

pip install -r examples/collector-csv/requirements.txt
python3 examples/collector-csv/collector_csv.py

By default the script takes 5 samples at 2-second intervals (≈10s wall time). Bump the SAMPLES / SAMPLE_INTERVAL_SECONDS constants at the top of the file for a longer run.

See ../README.md for the full example index.