Lots of changes

This commit is contained in:
Ilya Zlobintsev
2020-10-17 17:09:15 +03:00
parent c482961c49
commit 7f8d4e1372
6 changed files with 169 additions and 30 deletions

View File

@@ -3,13 +3,24 @@ use structopt::StructOpt;
#[derive(StructOpt)]
#[structopt(rename_all = "lower")]
enum Opt {
///Get information about the GPU.
///Gets realtime GPU information
Stats,
Info,
}
fn main() {
let opt = Opt::from_args();
match opt {
Opt::Info => daemon::get_info(),
Opt::Stats => {
let gpu_stats = daemon::get_gpu_stats();
println!("VRAM: {}/{}", gpu_stats.mem_used, gpu_stats.mem_total);
},
Opt::Info => {
let gpu_info = daemon::get_gpu_info();
println!("GPU Vendor: {}", gpu_info.gpu_vendor);
println!("GPU Model: {}", gpu_info.card_model);
println!("Driver in use: {}", gpu_info.driver);
print!("VBIOS Version: {}", gpu_info.vbios_version);
}
}
}