Skip to content

Make HOME and DATASETS filesystem paths configurable via env vars#1

Open
david-PHR wants to merge 1 commit intomainfrom
update/home-datasets-path
Open

Make HOME and DATASETS filesystem paths configurable via env vars#1
david-PHR wants to merge 1 commit intomainfrom
update/home-datasets-path

Conversation

@david-PHR
Copy link
Copy Markdown
Contributor

Description:
The paths used to collect local filesystem usage were hardcoded to /home
and /mnt/data. These are now read from environment variables at runtime.

Changes:

  • $HOME controls the home filesystem path (fallback: /home)
  • $DATASETS controls the datasets filesystem path (fallback: /mnt/data)

Usage:
DATASETS=/mnt/datasets ctop

Note: if a collector is already running, stop it first:
ctop --stop-collector

@david-PHR david-PHR requested a review from photoroman March 16, 2026 10:58
Copy link
Copy Markdown
Contributor

@photoroman photoroman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Suggestion is optional.

Comment thread src/collect.rs
collect_local_filesystem("/home"),
collect_local_filesystem("/mnt/data"),
collect_local_filesystem(&home_path),
collect_local_filesystem(&datasets_path),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe call the env vars CTOP_MONITORED_FOLDER1 and CTOP_MONITORED_FOLDER2 to make it truly generic, i.e. for other clusters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants