243c97d71b
Remplace sysinfo::Disks par un appel direct à libc::statvfs("/").
- used = (f_blocks − f_bfree) × f_frsize → correspond à df "Utilisé"
- free = f_bavail × f_frsize → correspond à df "Dispo"
- total = f_blocks × f_frsize
Avant (sysinfo) : used comptait les blocs réservés root → surestimation de ~3-4 Go.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
544 B
TOML
30 lines
544 B
TOML
[package]
|
|
name = "nanometrics-agent"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
name = "nanometrics_agent"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "nanometrics-agent"
|
|
path = "src/main.rs"
|
|
|
|
[profile.release]
|
|
strip = true
|
|
opt-level = "z"
|
|
lto = true
|
|
codegen-units = 1
|
|
|
|
[dependencies]
|
|
sysinfo = { version = "0.30", default-features = false }
|
|
libc = "0.2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
toml = "0.8"
|
|
rumqttc = { version = "0.24", default-features = false, features = ["use-rustls"] }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|