improves system
only show what we need.
This commit is contained in:
parent
6f7ea17a43
commit
b17feb6b54
@ -12,14 +12,15 @@ impl SystemData {}
|
|||||||
impl Fact for SystemData {
|
impl Fact for SystemData {
|
||||||
fn gather(&self) -> String {
|
fn gather(&self) -> String {
|
||||||
if System::IS_SUPPORTED {
|
if System::IS_SUPPORTED {
|
||||||
let mut sys = System::new_all();
|
let mut sys = System::new();
|
||||||
// we only need certain values.
|
// we only need certain values.
|
||||||
sys.refresh_cpu();
|
sys.refresh_cpu();
|
||||||
sys.refresh_disks();
|
sys.refresh_disks();
|
||||||
|
sys.refresh_disks_list();
|
||||||
sys.refresh_memory();
|
sys.refresh_memory();
|
||||||
sys.refresh_system();
|
sys.refresh_system();
|
||||||
sys.refresh_components();
|
sys.refresh_components();
|
||||||
sys.refresh_disks_list();
|
sys.refresh_components_list();
|
||||||
sys.refresh_users_list();
|
sys.refresh_users_list();
|
||||||
serde_json::to_string(&sys).unwrap()
|
serde_json::to_string(&sys).unwrap()
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user