mirror of
https://codeberg.org/icewind/palantir.git
synced 2026-06-03 18:24:08 +02:00
amdgpu temp
This commit is contained in:
parent
3af0288836
commit
56ccc821fb
2 changed files with 14 additions and 10 deletions
14
src/lib.rs
14
src/lib.rs
|
|
@ -102,12 +102,14 @@ pub fn get_metrics() -> Result<String> {
|
|||
}
|
||||
}
|
||||
for (label, temp) in temperatures {
|
||||
writeln!(
|
||||
&mut result,
|
||||
"temperature{{host=\"{}\", sensor=\"{}\"}} {:.1}",
|
||||
hostname, label, temp
|
||||
)
|
||||
.ok();
|
||||
if temp != 0.0 {
|
||||
writeln!(
|
||||
&mut result,
|
||||
"temperature{{host=\"{}\", sensor=\"{}\"}} {:.1}",
|
||||
hostname, label, temp
|
||||
)
|
||||
.ok();
|
||||
}
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue