diff --git a/Cargo.toml b/Cargo.toml index ead770d..62ae3bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "Oxide" +name = "oxide" version = "0.1.0" edition = "2021" diff --git a/src/main.rs b/src/main.rs index e0bb3a4..8b9d0fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,17 +5,20 @@ fn main() { } fn get_sys_info() { + // Please note that we use "new_all" to ensure that all list of + // components, network interfaces, disks and users are already + // filled! let mut sys = System::new_all(); // First we update all information of our `System` struct. sys.refresh_all(); - // Display system information: + // Print system information: println!("System name: {:?}", System::name()); println!("Kernel version: {:?}", System::kernel_version()); println!("System OS version: {:?}", System::os_version()); println!("System host name: {:?}", System::host_name()); - // Number of CPUs: + // Print number of CPUs: println!("Number of CPUs: {}", sys.cpus().len()); } \ No newline at end of file