Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changelogs/1.2.0/16-add-list-only-mode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
added:
- Add list only mode to print out desired cpu type to stdout (@gyptazy). [#16]
1 change: 1 addition & 0 deletions .changelogs/1.2.0/release_meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
date: 2026-01-06
10 changes: 10 additions & 0 deletions ProxCLMC/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ struct Cli {
#[arg(short, long = "ssh-file", default_value = "/root/.ssh/id_rsa")]
ssh_file: PathBuf,

#[arg(long)]
list_only: bool,

#[arg(long)]
version: bool,

Expand Down Expand Up @@ -251,6 +254,13 @@ fn main() -> io::Result<()> {
enrich_node_cpu_ssh(node, "root", &args.ssh_file);
}

if args.list_only {
if let Some(cluster_cpu) = cluster_min_cpu_type(&nodes) {
println!("{}", cluster_cpu.as_str());
}
return Ok(());
}

println!("Detected nodes:");
for n in &nodes {
println!("{} | {} | {}", n.name, n.ring0_addr, n.cpu_type);
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ proxclmc
### Options
The following cli options are available:

| Short | Long | Argument | Default | Description |
|------:|-------------|--------------|--------------------------|--------------------|
| `-s` | `--ssh-file`| `<SSH_FILE>` | `/root/.ssh/id_rsa` | SSH private key to use |
| | `--version` | | | Print version information |
| `-v` | `--verbose` | | | Enable verbose output |
| `-h` | `--help` | | | Print help |
| Short | Long | Argument | Default | Description |
|------:|---------------|--------------|--------------------------|--------------------|
| `-s` | `--ssh-file`. | `<SSH_FILE>` | `/root/.ssh/id_rsa` | SSH private key to use |
| | `--version` | | | Print version information |
| `-l` | `--list-only` | | | Returns only the desired CPU type on stdout |
| `-v` | `--verbose` | | | Enable verbose output |
| `-h` | `--help` | | | Print help |

## Building from Source
Building ProxCLMC is easy and can be done by installing the following requirements for Rust/Cargo:
Expand Down
Loading