Overview¶
File location and format¶
slurmhub looks for a configuration file in the following order; the first
existing file wins:
~/.config/slurmhub/config.toml(preferred — written by the wizard)~/.config/slurmhub/config.json(legacy)./config.toml(working directory)./config.json
Tip
If none of these exists, the
first-run wizard launches
automatically — you don’t have to write a config by hand. Pass
--config /path/to/file.toml to point at a specific file and skip the search.
Structure¶
A config has two sections:
defaults— values applied to every profile, unless overriddenprofiles.<name>— one block per cluster you want to monitor
[defaults]
ssh_timeout = 10 # seconds per SSH command
refresh_interval = 5 # how often squeue is re-fetched
sacct_refresh_interval = 60 # how often sacct (history) is re-fetched
[defaults.ssh]
# username = "myuser"
# port = 22
# key_filename = "~/.ssh/id_rsa"
# passphrase = "" # leave empty if using ssh-agent
# jump_host = ""
[defaults.log]
default_pattern = "{work_dir}/logs/{job_id}.out"
view_command = "tail -f {log_path}"
[defaults.slurm]
squeue_format = "%i|%j|%T|%M|%Z|%b"
sacct_format = "JobID,JobName,State,Elapsed,WorkDir"
[profiles.mycluster]
host = "mycluster" # required — SSH alias or hostname
JSON is still supported for backward compatibility, but it only understands the old flat schema — no multi-profile support, no per-profile overrides:
{
"remote_host": "mycluster",
"ssh_timeout": 10,
"refresh_interval": 5,
"log_paths": {
"default_pattern": "{work_dir}/logs/{job_id}.out",
"specific_projects": {
"ml_project": "{work_dir}/ml/logs/{job_id}.log"
}
}
}
The loader converts this to a single default profile at runtime.
Warning
The JSON format is frozen — new features are added to the TOML schema only. If you maintain a JSON config today, plan to migrate; the first-run wizard writes a fresh TOML file you can use as a starting point.
Field reference¶
Field |
Section |
Type |
Default |
Meaning |
|---|---|---|---|---|
|
defaults / profile |
int (s) |
|
Per-command SSH timeout. |
|
defaults / profile |
int (s) |
|
How often |
|
defaults / profile |
int (s) |
|
How often |
|
profile |
string |
— |
Hostname or |
|
ssh |
int |
|
SSH port. |
|
ssh |
string |
(current user) |
Login user. |
|
ssh |
string |
(default keys) |
Path to a specific private key. |
|
ssh |
string |
|
Key passphrase (prefer using |
|
ssh |
string |
|
Hostname of an SSH bastion. |
|
log |
string |
|
Fallback log path if |
|
log |
table |
|
Per-project log path overrides. |
|
log |
string |
|
Command used internally when streaming logs. Supports |
|
slurm |
string |
|
|
|
slurm |
string |
|
|