# Reading system information
Create a `System`, refresh it, then read the values:
```rust,no_run
# fn main() -> Result<(), Box<dyn std::error::Error>> {
use sinf::system::{RefreshKind, System};
let mut sys = System::new_with_specifics(RefreshKind::everything())?;
sys.refresh_all();
println!("{} {}", System::name()?, System::os_version()?);
println!("memory: {} / {} bytes", sys.used_memory(), sys.total_memory());
println!("cpus: {}", sys.cpus().len());
for (pid, process) in sys.processes() {
println!("[{pid}] {:?}", process.name());
}
# Ok(())
# }
```
Values based on differences (CPU usage, process usage, network traffic) require
two refreshes. Keep the same `System` instance alive for the lifetime of the
program instead of rebuilding it for every query.
## Platform-specific values
The static information methods return platform-dependent strings:
| `System::name` | `"Ubuntu"` | `"Pixel 9 Pro"` | `"Darwin"` | `"Windows"` |
| `System::kernel_version` | `"6.8.0-48-generic"` | `"6.1.84-android14-11"` | `"24.1.0"` | `"20348"` |
| `System::os_version` | `"24.04"` | `"15"` | `"15.1.1"` | `"10 (20348)"` |
| `System::long_os_version` | `"Linux (Ubuntu 24.04)"` | `"Android 15 on Pixel 9 Pro"` | `"macOS 15.1.1 Sequoia"` | `"Windows Server 2022 Datacenter"` |
| `System::distribution_id` | `"ubuntu"` | `"android"` | `"macos"` | `"windows"` |
`System::distribution_id_like` returns IDs such as `["rhel", "fedora"]` on
CentOS or `["debian"]` on Ubuntu.
`System::kernel_long_version` formats the kernel name and version, for example
`"Linux 6.12.13-200.fc41.x86_64"` or `"Windows OS Build 20348.2227"`.