commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
1a8182788b9d6e600edcb386420bf5b0bcefa3d1
STSchiff
2023-04-09T23:43:13
Fix windows core load: use 100 - idle_time (Fix #968)
diff --git a/src/windows/system.rs b/src/windows/system.rs index 0fc6267..4864d22 100644 --- a/src/windows/system.rs +++ b/src/windows/system.rs @@ -119,14 +119,14 @@ impl SystemExt for System { self.query = Query::new(); if let Some(ref mut query) = self.query { add_english_c...
1
12
10
ebb01c4ffc4cb61ed1e17a9c46f3c4714a776bb0
James Rimbault
2023-04-03T09:27:46
rename public DiskExt method `type_` to `kind` (#966) Rename "Type" to "Kind" for `Disk` types and methods.
diff --git a/src/apple/disk.rs b/src/apple/disk.rs index d866d5b..0ea492d 100644 --- a/src/apple/disk.rs +++ b/src/apple/disk.rs @@ -4,7 +4,7 @@ use crate::sys::{ ffi, utils::{self, CFReleaser}, }; -use crate::{DiskExt, DiskType}; +use crate::{DiskExt, DiskKind}; use core_foundation_sys::array::CFArrayCre...
11
48
48
184bf6d2be48d279392ba6ca853a2c8ff89cc1d3
Guillaume Gomez
2023-03-24T10:18:38
Update crate version to 0.28.4
diff --git a/Cargo.toml b/Cargo.toml index fb03181..5db3997 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.28.3" +version = "0.28.4" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPUs,...
1
1
1
004907a8870a128f3a09b98dfba855d0ebd33fb8
Guillaume Gomez
2023-03-24T09:48:32
Strenghten test `test_wait_non_child`
diff --git a/tests/process.rs b/tests/process.rs index 35f0f74..3a4f916 100644 --- a/tests/process.rs +++ b/tests/process.rs @@ -531,6 +531,8 @@ fn test_wait_non_child() { return; } + let before = std::time::Instant::now(); + // spawn non child process. let p = if !cfg!(target_os = "linux")...
1
12
4
42a556d693c7d65876afe252cf6a4bb0ce7ec136
ClementTsang
2023-03-24T05:08:23
add test
diff --git a/src/apple/macos/system.rs b/src/apple/macos/system.rs index 1fbe13f..7c8b957 100644 --- a/src/apple/macos/system.rs +++ b/src/apple/macos/system.rs @@ -137,3 +137,29 @@ impl SystemTimeInfo { } } } + +#[cfg(test)] +mod test { + + use super::*; + + /// Regression test for <https://github...
1
26
0
e8fc7cb123ae3b4cffa76345a0712e32cb56f4b8
Clement Tsang
2023-03-24T02:30:51
hoist out timebase_to_ns in process interval calculation
diff --git a/src/apple/macos/system.rs b/src/apple/macos/system.rs index e7c165b..1fbe13f 100644 --- a/src/apple/macos/system.rs +++ b/src/apple/macos/system.rs @@ -126,8 +126,14 @@ impl SystemTimeInfo { // Now we convert the ticks to nanoseconds (if the interval is less than // `MINIMUM_CPU...
1
8
2
7f7caf85836f415b2c8e99cccae3fb8b011b303e
Guillaume Gomez
2023-03-17T17:01:04
Update crate version to 0.28.3
diff --git a/Cargo.toml b/Cargo.toml index 271f1a8..fb03181 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.28.2" +version = "0.28.3" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPUs,...
1
1
1
86ca5252c38c5b705dd2ccd9090fbd5b231a5c1e
Guillaume Gomez
2023-03-17T16:35:36
Replace assert! with debug_assert! in linux when retrieving UID and GID
diff --git a/src/linux/process.rs b/src/linux/process.rs index f603053..52c8e30 100644 --- a/src/linux/process.rs +++ b/src/linux/process.rs @@ -675,10 +675,10 @@ fn get_uid_and_gid(file_path: &Path) -> Option<(uid_t, gid_t)> { let mut gid = None; for line in status_data.lines() { if let Some(u) = f(...
1
2
2
510965208a27c9d3c8bac93ed4c507b904abd740
Guillaume Gomez
2023-03-17T16:34:38
Fix panic in windows when ReadProcessMemory returns unexpected number of bytes
diff --git a/src/windows/process.rs b/src/windows/process.rs index 1e32895..62a0490 100644 --- a/src/windows/process.rs +++ b/src/windows/process.rs @@ -690,8 +690,10 @@ unsafe fn get_process_data( return Err("Unable to read process data"); } - // Documentation states that the function fails if not a...
1
4
2
348d1cb6719f812e699fedf66108a834fae66d42
Guillaume Gomez
2023-03-16T22:17:46
Fix used memory computation on mac and improve available memory computation
diff --git a/src/apple/system.rs b/src/apple/system.rs index ae50b13..0691a23 100644 --- a/src/apple/system.rs +++ b/src/apple/system.rs @@ -81,6 +81,7 @@ pub struct System { process_list: HashMap<Pid, Process>, mem_total: u64, mem_free: u64, + mem_used: u64, mem_available: u64, swap_total: ...
1
10
1
b708696a01c5dc682bde6ccc4bf72a6d8d5e9a92
Guillaume Gomez
2023-03-16T13:26:45
Add missing frequency for global CPU on FreeBSD
diff --git a/src/freebsd/system.rs b/src/freebsd/system.rs index d667378..a591737 100644 --- a/src/freebsd/system.rs +++ b/src/freebsd/system.rs @@ -145,6 +145,9 @@ impl SystemExt for System { self.system_info .get_cpu_usage(&mut self.global_cpu, &mut self.cpus); } + if ref...
1
3
0
dba372ae7e76e6ea1d389fcf13b51ce3fea71a44
Guillaume Gomez
2023-03-16T13:13:52
Add missing frequency for global CPU on windows
diff --git a/src/windows/cpu.rs b/src/windows/cpu.rs index 5a9edfd..f32ddf8 100644 --- a/src/windows/cpu.rs +++ b/src/windows/cpu.rs @@ -296,6 +296,8 @@ impl CpusWrapper { for (cpu, frequency) in self.cpus.iter_mut().zip(frequencies) { cpu.set_frequency(frequency); } + self.global ...
1
2
0
58093491001f6b3969f09153d63e0f54bccc7cbe
Guillaume Gomez
2023-03-04T10:58:37
Update crate version to 0.28.2
diff --git a/Cargo.toml b/Cargo.toml index f24526a..271f1a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.28.1" +version = "0.28.2" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPUs,...
1
1
1
915516760c2625aaecb96c0d239489d5a3f49c5c
Guillaume Gomez
2023-03-03T23:11:27
Fix CPU computation usage in linux: * Exclude guest times from CPU but not from total * Don't set minimum value to 1 for work_time (in work_time / total_time)
diff --git a/src/linux/cpu.rs b/src/linux/cpu.rs index fb9e6af..d99b325 100644 --- a/src/linux/cpu.rs +++ b/src/linux/cpu.rs @@ -234,8 +234,8 @@ pub(crate) struct CpuValues { irq: u64, softirq: u64, steal: u64, - _guest: u64, - _guest_nice: u64, + guest: u64, + guest_nice: u64, } impl Cpu...
1
24
51
95eb0e89e4cdb5eb851f32ced06ab06ee1c9c26e
Guillaume Gomez
2023-02-26T13:54:34
Update crate version to 0.28.1
diff --git a/Cargo.toml b/Cargo.toml index 91b6cdf..f24526a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.28.0" +version = "0.28.1" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPUs,...
1
1
1
a42bee5c8798e6930caaa2f4d3bdde539ff157d1
Guillaume Gomez
2023-02-25T14:11:27
Fix overflow on macOS
diff --git a/src/apple/cpu.rs b/src/apple/cpu.rs index 158cfa2..9eda48d 100644 --- a/src/apple/cpu.rs +++ b/src/apple/cpu.rs @@ -137,11 +137,13 @@ pub(crate) fn get_cpu_frequency() -> u64 { } #[inline] -fn get_in_use(cpu_info: *mut i32, offset: isize) -> i32 { +fn get_in_use(cpu_info: *mut i32, offset: isize) -> i6...
1
11
7
da7b187ebfcba4269cd61a8f5e4ac5cd6555727d
Guillaume Gomez
2023-02-17T17:15:44
Update crate version to 0.28.0
diff --git a/Cargo.toml b/Cargo.toml index 72cc3eb..91b6cdf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.27.7" +version = "0.28.0" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPUs,...
1
1
1
d0aac39965be78b2b114552bbb4b471adaa4ea21
Jori Winderickx
2023-02-17T15:50:50
fix only compile tasks related test on Linux
diff --git a/tests/process.rs b/tests/process.rs index 0f72485..35f0f74 100644 --- a/tests/process.rs +++ b/tests/process.rs @@ -401,6 +401,10 @@ fn test_refresh_processes() { // Checks that `refresh_processes` is adding and removing task. #[test] +#[cfg(all( + any(target_os = "linux", target_os = "android"), + ...
1
4
0
c74cf77887df1cea59857c214ee2ad1e046c0859
Jori Winderickx
2023-02-17T14:12:56
fix recursively calc cpu usage fix recursively unset updated on processes/tasks
diff --git a/src/linux/process.rs b/src/linux/process.rs index f7953a7..f603053 100644 --- a/src/linux/process.rs +++ b/src/linux/process.rs @@ -247,6 +247,17 @@ pub(crate) fn compute_cpu_usage(p: &mut Process, total_time: f32, max_value: f32 / total_time * 100.) .min(max_value); + + for t...
2
14
15
c5839c3afcaa1df99954d288f685652da49ddf6e
Jori Winderickx
2023-02-17T14:13:30
add test on tasks
diff --git a/tests/process.rs b/tests/process.rs index 98183f0..0f72485 100644 --- a/tests/process.rs +++ b/tests/process.rs @@ -399,6 +399,46 @@ fn test_refresh_processes() { assert!(s.process(pid).is_none()); } +// Checks that `refresh_processes` is adding and removing task. +#[test] +fn test_refresh_tasks() ...
1
40
0
5c0bcc235dd785c4589d4fac65845ad0cc9e0e51
Guillaume Gomez
2023-02-15T23:13:20
Fix invalid cargo feature usage
diff --git a/Cargo.toml b/Cargo.toml index aea4024..72cc3eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ multithread = ["rayon"] debug = ["libc/extra_traits"] # This feature is used on CI to emulate unknown/unsupported target. unknown-ci = [] -serde = ["dep:serde"] [package.metadata.docs.rs] featur...
1
0
1
c0640aac90a8bc289501deae7bbacfe7b749ad5c
Guillaume Gomez
2023-02-15T23:09:03
Update build for docs.rs
diff --git a/Cargo.toml b/Cargo.toml index 29f96c7..aea4024 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,18 +2,32 @@ name = "sysinfo" version = "0.27.7" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] - description = "Library to get system information such as processes, CPUs, disks, components and netw...
1
17
17
5b677db32a8eecaed2d180cc37d7671ed72ecc7d
Guillaume Gomez
2023-02-15T22:47:02
Fix code checker
diff --git a/tests/code_checkers/utils.rs b/tests/code_checkers/utils.rs index 8932019..159b30d 100644 --- a/tests/code_checkers/utils.rs +++ b/tests/code_checkers/utils.rs @@ -28,7 +28,11 @@ fn read_dir<P: AsRef<Path>, F: FnMut(&Path, &str)>(dir: P, callback: &mut F) { let path = entry.path(); if pat...
1
12
4
f4e238f1aeb4fd1da2f85ee2ab20b5bfa3df370c
yozhgoor
2023-02-09T11:32:03
Clean up comments
diff --git a/src/serde.rs b/src/serde.rs index 9e5999f..033a846 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -94,34 +94,33 @@ impl serde::Serialize for dyn SystemExt { // IS_SUPPORTED: bool // SUPPORTED_SIGNALS: &'static [Signal] // MINIMUM_CPU_UPDATE_INTERVAL: Duration; - // &self....
1
27
28
3677cece45c65e709e922ced6d91c26e3bff798c
yozhgoor
2023-02-02T12:29:32
After review
diff --git a/src/serde.rs b/src/serde.rs index e5ee581..9e5999f 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -1,5 +1,8 @@ use crate::common::PidExt; -use crate::{ComponentExt, CpuExt, DiskExt, NetworkExt, ProcessExt, SystemExt, UserExt}; +use crate::{ + ComponentExt, CpuExt, DiskExt, DiskType, DiskUsage, MacAddr...
1
4
6
c2c31bf99339a551d7791e754092cc9fc95ac18f
yozhgoor
2023-01-23T16:39:25
Comment the implementation of `SystemExt`
diff --git a/src/serde.rs b/src/serde.rs index 6e23124..e5ee581 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -81,6 +81,7 @@ impl Serialize for dyn CpuExt { } } +/* impl serde::Serialize for dyn SystemExt { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where @@ -124,6 +125,7 @@ i...
1
2
0
6699b8d373caaca3dd42931d263701db3af05189
yozhgoor
2023-01-21T18:21:43
Add the `serde.rs` file with initial implementation
diff --git a/src/lib.rs b/src/lib.rs index d1e0a01..b3ec1b7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -84,6 +84,8 @@ pub use c_interface::*; mod c_interface; mod common; mod debug; +#[cfg(feature = "serde")] +mod serde; mod system; mod traits; mod utils; diff --git a/src/serde.rs b/src/serde.rs new file mode 10...
2
269
0
7c118eb5a73d1dd57aec01e727e56437bfa3ccb6
yozhgoor
2023-01-21T18:21:19
Add the `serde` feature and dependency
diff --git a/Cargo.toml b/Cargo.toml index eac6703..fcba9b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ edition = "2018" [dependencies] cfg-if = "1.0" rayon = { version = "^1.5.1", optional = true } +serde = { version = "^1.0.152", optional = true } [target.'cfg(any(windows, target_os = "linux", ta...
1
2
0
7600853d5face686671770e29b6a4e58a99f1fb6
Jori Winderickx
2023-02-15T16:19:53
fix also compute cpu usage of tasks in general process refresh
diff --git a/src/linux/system.rs b/src/linux/system.rs index e2d8c26..fcb5b30 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -204,6 +204,12 @@ impl System { } if compute_cpu { compute_cpu_usage(proc_, total_time, max_value); + if !proc_.tasks.is_e...
1
6
0
fa51b7710269198acfe6e00cbf4a3f61d63193f9
Jori Winderickx
2023-02-15T14:39:06
fix read name for tasks in processes
diff --git a/src/linux/process.rs b/src/linux/process.rs index d9008cf..f7953a7 100644 --- a/src/linux/process.rs +++ b/src/linux/process.rs @@ -365,35 +365,24 @@ fn retrieve_all_new_process_info( refresh_user_group_ids(&mut p, &mut tmp); } - if proc_list.pid.0 != 0 { - // If we're getting inf...
1
14
25
c52281c892a5d2d6d14ccde86c237cda4d89d6b0
Jori Winderickx
2023-02-15T14:38:40
fix calculate cpu usage for tasks in processes
diff --git a/src/linux/system.rs b/src/linux/system.rs index 822814f..e2d8c26 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -336,11 +336,18 @@ impl SystemExt for System { } let (new, old) = self.cpus.get_global_raw_times(); let total_time = (if old >= new { 1 } els...
1
8
1
327190e836a9c910d59fabaf681cf74d1dcc7f6d
Guillaume Gomez
2023-02-13T17:43:33
keep all users, even fake ones
diff --git a/src/lib.rs b/src/lib.rs index f83dce0..d1e0a01 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -349,7 +349,7 @@ mod test { // to find that user ID in the global user list for process in s.processes().values() { if let Some(uid) = process.user_id() { - ...
2
46
56
da498a86aa98d13519e1443b19a5baa9c0c3f80d
Michael Bikovitsky
2023-02-11T17:21:04
Suppress Clippy lint for test_send_sync
diff --git a/tests/send_sync.rs b/tests/send_sync.rs index 1f8cc19..435b23a 100644 --- a/tests/send_sync.rs +++ b/tests/send_sync.rs @@ -1,6 +1,7 @@ // Take a look at the license at the top of the repository in the LICENSE file. #[test] +#[allow(clippy::extra_unused_type_parameters)] fn test_send_sync() { fn ...
1
1
0
7ca70664c95d3bb3cbac70b371daf57ac9e8941f
Michael Bikovitsky
2023-02-10T19:56:17
Fix Vec::set_len call in ph_query_process_variable_size
diff --git a/src/windows/process.rs b/src/windows/process.rs index 64527dc..1e32895 100644 --- a/src/windows/process.rs +++ b/src/windows/process.rs @@ -595,7 +595,6 @@ pub(crate) fn get_start_time(handle: HANDLE) -> u64 { } } -#[allow(clippy::uninit_vec)] unsafe fn ph_query_process_variable_size( process...
1
1
3
88f87a67a29ee2aa468810eb61cccd305a189a84
Michael Bikovitsky
2023-02-10T18:12:59
Fix buffer overflow in get_process_data
diff --git a/src/windows/process.rs b/src/windows/process.rs index d310bda..64527dc 100644 --- a/src/windows/process.rs +++ b/src/windows/process.rs @@ -673,24 +673,31 @@ unsafe fn get_region_size(handle: &HandleWrapper, ptr: LPVOID) -> Result<usize, Ok((meminfo.RegionSize as isize - ptr.offset_from(meminfo.BaseAd...
1
11
4
8cb102d2e2cb9b818f15b9a6017fa57a256ba704
Guillaume Gomez
2023-02-03T10:04:15
Handle Idle state in `ProcessStatus` on linux and clean up ProcessStatus variants documentation
diff --git a/src/common.rs b/src/common.rs index 315110c..b9d02b6 100644 --- a/src/common.rs +++ b/src/common.rs @@ -835,11 +835,11 @@ pub struct DiskUsage { /// Enum describing the different status of a process. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum ProcessStatus { - /// ## Linux/FreeBSD + ///...
2
28
23
174a49a74e411e1f574548b67d54494845ddecaa
Guillaume Gomez
2023-01-17T13:06:13
Update crate version to 0.27.7
diff --git a/Cargo.toml b/Cargo.toml index fbbf071..e905a28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.27.6" +version = "0.27.7" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
769b96d04853093bbcfc3597936d2038c5c44ec6
Guillaume Gomez
2023-01-17T12:45:29
Fix some spelling errors and some typos
diff --git a/src/c_interface.rs b/src/c_interface.rs index 0914a81..9810848 100644 --- a/src/c_interface.rs +++ b/src/c_interface.rs @@ -259,8 +259,8 @@ pub extern "C" fn sysinfo_networks_transmitted(system: CSystem) -> size_t { /// Equivalent of [`System::cpus_usage()`][crate::System#method.cpus_usage]. /// -/// *...
11
45
45
b68953f65784134ce72b11e244955ddad2412449
Guillaume Gomez
2023-01-17T12:32:41
Improve documentation for ProcessExt::cpu_usage
diff --git a/src/traits.rs b/src/traits.rs index b0da6f4..9a55321 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -346,11 +346,14 @@ pub trait ProcessExt: Debug { /// Returns the total CPU usage (in %). Notice that it might be bigger than 100 if run on a /// multicore machine. /// - /// If you want ...
1
7
4
9b5608191a5808cc82488df7f6550e885922cbac
Guillaume Gomez
2023-01-16T22:40:21
Linux: Default to "model name" value if the CPU brand cannot be retrieved
diff --git a/src/linux/cpu.rs b/src/linux/cpu.rs index 4ebd9fe..6a99298 100644 --- a/src/linux/cpu.rs +++ b/src/linux/cpu.rs @@ -790,7 +790,17 @@ pub(crate) fn get_vendor_id_and_brand() -> (String, String) { } if let (Some(implementer), Some(part)) = (implementer, part) { vendor_id = get_arm_implemen...
1
11
1
c732d8d50f82c5963d1d959da36dea52b9450719
Guillaume Gomez
2023-01-16T22:33:44
Remove unneeded "extern crate"
diff --git a/examples/simple.rs b/examples/simple.rs index 997a9d2..e736097 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -4,8 +4,6 @@ #![allow(unused_must_use, non_upper_case_globals)] #![allow(clippy::manual_range_contains)] -extern crate sysinfo; - use std::io::{self, BufRead, Write}; use std::st...
2
0
5
f5d7e765c7bbe939a340db42874224806aa2e87c
Guillaume Gomez
2023-01-16T22:31:38
Fix missing deallocation for RegOpenKeyExW
diff --git a/src/windows/system.rs b/src/windows/system.rs index 3ade65f..0fc6267 100644 --- a/src/windows/system.rs +++ b/src/windows/system.rs @@ -12,26 +12,22 @@ use crate::sys::disk::{get_disks, Disk}; use crate::sys::process::{get_start_time, update_memory, Process}; use crate::sys::tools::*; use crate::sys::us...
2
95
87
5e175318d37b11ebc12d17d2e60fa852a479ce84
Guillaume Gomez
2023-01-16T21:50:55
Reduce FreeBSD System::MINIMUM_CPU_UPDATE_INTERVAL to 100ms
diff --git a/src/freebsd/system.rs b/src/freebsd/system.rs index 210267d..d667378 100644 --- a/src/freebsd/system.rs +++ b/src/freebsd/system.rs @@ -78,7 +78,7 @@ pub struct System { impl SystemExt for System { const IS_SUPPORTED: bool = true; const SUPPORTED_SIGNALS: &'static [Signal] = supported_signals();...
1
1
1
9a66f7ad6821739ea479795af04d8d6940e10c8b
Guillaume Gomez
2023-01-16T16:44:35
Add regression test for #918
diff --git a/tests/process.rs b/tests/process.rs index f8f0576..98183f0 100644 --- a/tests/process.rs +++ b/tests/process.rs @@ -543,3 +543,23 @@ fn test_process_iterator_lifetimes() { } process.unwrap(); } + +// Regression test for <https://github.com/GuillaumeGomez/sysinfo/issues/918>. +#[test] +fn test_pr...
1
20
0
1d653d37311eab500752aac38c2ff5f2f4df1a4c
Guillaume Gomez
2023-01-16T16:40:02
Fix mac process CPU usage
diff --git a/src/apple/cpu.rs b/src/apple/cpu.rs index e613bdd..158cfa2 100644 --- a/src/apple/cpu.rs +++ b/src/apple/cpu.rs @@ -207,7 +207,7 @@ pub(crate) fn init_cpus( let frequency = if refresh_kind.frequency() { get_cpu_frequency() } else { - 0 + global_cpu.frequency }; ...
3
8
6
66507171267544d800c72ddaec657b4114b5511c
Emmanuel Gil Peyrot
2023-01-13T18:18:28
Add brand and name of ARM CPUs on Linux On ARM, Linux only obtains two numbers for CPU implementer and part, there is no marketing name encoded in the cpuid like on x86. This means we have to interpret those numbers ourselves. The list of CPU brands and names have been obtained from util-linux, see https://github.co...
diff --git a/src/linux/cpu.rs b/src/linux/cpu.rs index b3750da..4ebd9fe 100644 --- a/src/linux/cpu.rs +++ b/src/linux/cpu.rs @@ -531,6 +531,216 @@ pub(crate) fn get_physical_core_count() -> Option<usize> { Some(core_ids_and_physical_ids.len()) } +/// Obtain the implementer of this CPU core. +/// +/// This has b...
1
230
1
8e1c6711bf2f4749f0e978bea4a949e4916f675e
Guillaume Gomez
2023-01-13T15:35:48
Update crate version to 0.27.6
diff --git a/Cargo.toml b/Cargo.toml index d0c4eb0..fbbf071 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.27.5" +version = "0.27.6" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
cf92b41316f3295bce62efc845cd22f634a0a5be
Guillaume Gomez
2023-01-13T15:03:58
Reexport `MacAddr` type
diff --git a/src/common.rs b/src/common.rs index adc149a..315110c 100644 --- a/src/common.rs +++ b/src/common.rs @@ -982,12 +982,16 @@ pub fn get_current_pid() -> Result<Pid, &'static str> { } /// MAC address for network interface. +/// +/// It is returned by [`NetworkExt::mac_address`][crate::NetworkExt::mac_addre...
2
6
2
e160d138822f27203c088cdce872ceceacee9710
Guillaume Gomez
2023-01-10T19:55:24
Update crate version to 0.27.5
diff --git a/Cargo.toml b/Cargo.toml index 60801d8..d0c4eb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.27.4" +version = "0.27.5" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
5b699bb7a8b5ac11ad599d46adff479d7ec2a7e1
Wesley Wiser
2023-01-10T16:57:51
Update use of `libc::timespec` to prepare for future libc version In a future release of the `libc` crate, `libc::timespec` will contain private padding fields on `*-linux-musl` targets and so the struct will no longer be able to be created using the literal initialization syntax. Update the use of `libc::timespec` t...
diff --git a/src/linux/system.rs b/src/linux/system.rs index 3197233..2118b71 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -82,11 +82,8 @@ fn boot_time() -> u64 { } } // Either we didn't find "btime" or "/proc/stat" wasn't available for some reason... - let mut up = libc::timespec...
1
1
4
1bc6264e27442eef5be98d3e0f6e3e0f0c168c06
Guillaume Gomez
2023-01-09T23:48:09
Update crate version to 0.27.4
diff --git a/Cargo.toml b/Cargo.toml index ac1974d..60801d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.27.3" +version = "0.27.4" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
7cad3b38e535c3abbe03f15e3fb8f3350a6e7370
Guillaume Gomez
2023-01-09T17:04:04
Create SystemExt::MINIMUM_CPU_UPDATE_INTERVAL constant to unify minimum CPU update time across systems
diff --git a/src/apple/macos/system.rs b/src/apple/macos/system.rs index 998ebe0..e7c165b 100644 --- a/src/apple/macos/system.rs +++ b/src/apple/macos/system.rs @@ -1,5 +1,7 @@ // Take a look at the license at the top of the repository in the LICENSE file. +use crate::SystemExt; + #[allow(deprecated)] use libc::{m...
10
59
20
352a0f072c7e9a6b5545157ed6e3486d5477009c
Guillaume Gomez
2023-01-09T16:58:24
Fix processes CPU usage on consecutive updates on macOS
diff --git a/src/apple/macos/process.rs b/src/apple/macos/process.rs index 69ac4e7..3096537 100644 --- a/src/apple/macos/process.rs +++ b/src/apple/macos/process.rs @@ -221,7 +221,7 @@ pub(crate) fn compute_cpu_usage( ) { if let Some(time_interval) = time_interval { let total_existing_time = p.old_stime....
3
13
5
01bc4b7b594ac7cb7fafd8b255a72b3b5ae071de
Guillaume Gomez
2022-12-31T10:44:54
Extend test_consecutive_cpu_usage_update test
diff --git a/src/system.rs b/src/system.rs index ed1335c..8b9fafa 100644 --- a/src/system.rs +++ b/src/system.rs @@ -120,6 +120,8 @@ mod tests { #[test] fn test_consecutive_cpu_usage_update() { use crate::{PidExt, ProcessExt, ProcessRefreshKind, System, SystemExt}; + use std::sync::atomic::{At...
1
20
2
737eb161573f248462f442c1f7fceb2a7a416fb1
Guillaume Gomez
2023-01-07T17:15:24
Update crate version to 0.27.3
diff --git a/Cargo.toml b/Cargo.toml index 073b281..ac1974d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.27.2" +version = "0.27.3" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
db28e23529914f41784b115278b1c0a96fb3e57f
Aaron Robinson
2023-01-02T00:20:16
Add tests for process iterator lifetimes
diff --git a/tests/process.rs b/tests/process.rs index 3073ca6..f8f0576 100644 --- a/tests/process.rs +++ b/tests/process.rs @@ -517,3 +517,29 @@ fn test_wait_non_child() { assert!(before.elapsed() > std::time::Duration::from_millis(2000)); assert!(before.elapsed() < std::time::Duration::from_millis(3000)); ...
1
26
0
fc84c52aac853bb3fdaa529d45db2777063077da
Aaron Robinson
2023-01-01T07:22:18
Fix processes_by_name(_exact) lifetimes
diff --git a/src/traits.rs b/src/traits.rs index e328386..ab7b69f 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -934,10 +934,10 @@ pub trait SystemExt: Sized + Debug + Default + Send + Sync { /// } /// ``` // FIXME: replace the returned type with `impl Iterator<Item = &Process>` when it's supported! ...
1
6
6
cd6343c22c3befb8642437e1a47424395eb01c51
Guillaume Gomez
2022-12-30T00:17:16
Update crate version to 0.27.2
diff --git a/Cargo.toml b/Cargo.toml index 42a9396..073b281 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.27.1" +version = "0.27.2" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
96bbf5eea5a69784730738d391c6485a237617f0
Guillaume Gomez
2022-12-29T14:30:48
Ensure that the CPU list is not empty in test_consecutive_cpu_usage_update
diff --git a/src/system.rs b/src/system.rs index 61d87b9..ed1335c 100644 --- a/src/system.rs +++ b/src/system.rs @@ -128,6 +128,8 @@ mod tests { let mut sys = System::new(); sys.refresh_processes_specifics(ProcessRefreshKind::new().with_cpu()); + sys.refresh_cpu(); + assert!(!sys.cpus(...
1
2
0
c3af88f02f78817cf76799fe50ef68880fa31332
Guillaume Gomez
2022-12-29T14:10:03
Cleanup MacOS code for SystemTimeInfo
diff --git a/src/apple/macos/process.rs b/src/apple/macos/process.rs index eea205b..69ac4e7 100644 --- a/src/apple/macos/process.rs +++ b/src/apple/macos/process.rs @@ -265,14 +265,6 @@ pub(crate) fn compute_cpu_usage( } } -/*pub fn set_time(p: &mut Process, utime: u64, stime: u64) { - p.old_utime = p.utime;...
2
50
65
5b1ff6ac81d88501720fa8cd4d583955ed4e2b62
Guillaume Gomez
2022-12-29T10:51:22
Add test for consecutive CPU usage update
diff --git a/src/system.rs b/src/system.rs index 63a7065..61d87b9 100644 --- a/src/system.rs +++ b/src/system.rs @@ -114,4 +114,36 @@ mod tests { assert!(uptime < new_uptime); } } + + // This test is used to ensure that the CPU usage computation isn't completely going off + // when refr...
1
32
0
5b3f003f6721489d95c32221259085d442914072
Guillaume Gomez
2022-12-29T10:51:09
Fix linux CPU usage computation when consecutive updates are required
diff --git a/src/linux/cpu.rs b/src/linux/cpu.rs index 5c3293f..9e8a119 100644 --- a/src/linux/cpu.rs +++ b/src/linux/cpu.rs @@ -5,6 +5,7 @@ use std::collections::HashSet; use std::fs::File; use std::io::{BufRead, BufReader, Read}; +use std::time::{Duration, Instant}; use crate::sys::utils::to_u64; use crate::{C...
2
104
89
85417663a92023bbd8aadaec62b70b3642e11e0b
Guillaume Gomez
2022-12-29T14:59:22
Fix deprecation for kIOMasterPortDefault by turning it into a constant
diff --git a/src/apple/macos/ffi.rs b/src/apple/macos/ffi.rs index 0b9c82c..577ecd3 100644 --- a/src/apple/macos/ffi.rs +++ b/src/apple/macos/ffi.rs @@ -31,6 +31,11 @@ pub const kIOPropertyMediumTypeSolidStateKey: &str = "Solid State"; #[allow(non_upper_case_globals)] pub const kIOPropertyMediumTypeRotationalKey: &st...
1
5
3
19085faa6aac98dd23891258852e5456a0152c93
Guillaume Gomez
2022-12-18T10:40:26
Update crate version to 0.27.1
diff --git a/Cargo.toml b/Cargo.toml index 4d53eda..42a9396 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.27.0" +version = "0.27.1" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
8f7d65d5cfb0b533420b515d719b1d79f54c7ca3
Peter Michael Green
2022-12-17T17:29:40
Fix null pointer dereference in parse_interface_address.
diff --git a/src/network_helper_nix.rs b/src/network_helper_nix.rs index 458a966..c4684c3 100644 --- a/src/network_helper_nix.rs +++ b/src/network_helper_nix.rs @@ -70,6 +70,9 @@ impl From<&libc::sockaddr_dl> for MacAddr { #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "ios"))] unsafe fn parse_inte...
1
6
0
d4b3627b64df233467db32c1d3b968e75e95e46c
Elliot Saba
2022-12-13T00:25:32
Use more consistent definition for free/avail memory on Darwin Previously, we counted wired memory as available, which is incorrect; wired memory is memory that cannot be evicted from RAM to swap [0]. Looking over the definitions of the available counters, I came up with these simplified calculations for available and...
diff --git a/src/apple/system.rs b/src/apple/system.rs index 12abbd2..2c7ee41 100644 --- a/src/apple/system.rs +++ b/src/apple/system.rs @@ -220,15 +220,12 @@ impl SystemExt for System { // * used to hold data that was read speculatively from disk but // * haven't actually been used ...
1
6
9
353fbb7a2014f3f18f1b316c2e28e385044d0d6b
Guillaume Gomez
2022-12-08T19:36:42
Update crate version to 0.27.0
diff --git a/Cargo.toml b/Cargo.toml index 7cfd6d1..4d53eda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.26.8" +version = "0.27.0" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
4ac97aeb5c692871ef38069f5b6339827bdca6b2
Guillaume Gomez
2022-12-08T18:53:35
Small doc improvements
diff --git a/src/common.rs b/src/common.rs index 0e10839..adc149a 100644 --- a/src/common.rs +++ b/src/common.rs @@ -981,7 +981,7 @@ pub fn get_current_pid() -> Result<Pid, &'static str> { inner() } -/// MAC address for network interface +/// MAC address for network interface. #[derive(PartialEq, Eq, Copy, Clo...
2
3
2
220b35876a3f77ab10fa78c7cae82e0a92b52154
Guillaume Gomez
2022-12-07T12:35:36
Fix clippy lints
diff --git a/examples/simple.rs b/examples/simple.rs index b73984f..997a9d2 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -343,11 +343,7 @@ fn interpret_input(input: &str, sys: &mut System) -> bool { let minutes = uptime / 60; writeln!( &mut io::stdout(), - ...
1
4
14
f228f33b9be5ead86d43ae597be0e240dc435a16
kayoch1n
2022-11-26T11:21:02
Add MAC address to NetworkExt
diff --git a/Cargo.toml b/Cargo.toml index 40dbe23..7cfd6d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,9 @@ winapi = { version = "0.3.9", features = [ "ntlsa", "securitybaseapi", "shellapi", - "std" + "std", + "iphlpapi", + "winsock2" ]} ntapi = "0.4" diff --git a/examples/simple.rs b/exampl...
13
351
6
05c5c64f68a47daa9ea6f47aa364554c263921c0
Zeyi (Rice) Fan
2022-12-07T20:29:49
doc: update `System::new` document It looks like `System::new` no longer forces refreshing of CPU information. Update the document to reflect this.
diff --git a/src/traits.rs b/src/traits.rs index fa24cb4..495b81c 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -536,9 +536,10 @@ pub trait SystemExt: Sized + Debug + Default + Send + Sync { /// ``` const SUPPORTED_SIGNALS: &'static [Signal]; - /// Creates a new [`System`] instance with nothing loade...
1
4
3
d0290a6bc9811d55737990028eb5e46b422e0eab
Guillaume Gomez
2022-12-07T12:35:36
Fix clippy lints
diff --git a/src/linux/cpu.rs b/src/linux/cpu.rs index 103f536..5c3293f 100644 --- a/src/linux/cpu.rs +++ b/src/linux/cpu.rs @@ -427,8 +427,7 @@ impl CpuExt for Cpu { pub(crate) fn get_cpu_frequency(cpu_core_index: usize) -> u64 { let mut s = String::new(); if File::open(format!( - "/sys/devices/syste...
4
4
7
9ecd108acb0b86391b70ecc2b1fc40cba67453ca
Guillaume Gomez
2022-12-07T10:58:17
Add regression test for big environments
diff --git a/tests/process.rs b/tests/process.rs index efaaaa0..cd104f8 100644 --- a/tests/process.rs +++ b/tests/process.rs @@ -141,6 +141,57 @@ fn test_environ() { } } +// Test to ensure that a process with a lot of environment variables doesn't get truncated. +// More information in <https://github.com/Guill...
1
51
0
cdd604b46b08ef8cfd24798bcca8ddf9eedb9497
Guillaume Gomez
2022-12-07T10:57:43
Fix incomplete process environment retrieval
diff --git a/src/linux/process.rs b/src/linux/process.rs index eeb66ad..6d06a9a 100644 --- a/src/linux/process.rs +++ b/src/linux/process.rs @@ -620,10 +620,12 @@ pub(crate) fn refresh_procs( fn copy_from_file(entry: &Path) -> Vec<String> { match File::open(entry) { Ok(mut f) => { - let mut da...
1
9
6
6346b13e855e0a27638d29027bce6b4e86f95d9f
Guillaume Gomez
2022-12-01T12:54:30
Implement TryFrom for Pid
diff --git a/src/common.rs b/src/common.rs index 59f9d3c..abd5f2d 100644 --- a/src/common.rs +++ b/src/common.rs @@ -14,7 +14,7 @@ use std::str::FromStr; /// let p = Pid::from_u32(0); /// let value: u32 = p.as_u32(); /// ``` -pub trait PidExt<T>: Copy + From<T> + FromStr + fmt::Display { +pub trait PidExt: Copy + Fr...
1
39
15
0ed4950a2d8c1b61b8230ac08b8f329b26a59144
Guillaume Gomez
2022-12-01T12:47:48
Implement TryFrom and FromStr for `Gid` and `Uid` types
diff --git a/src/common.rs b/src/common.rs index 2710204..59f9d3c 100644 --- a/src/common.rs +++ b/src/common.rs @@ -2,7 +2,7 @@ use crate::{NetworkData, Networks, NetworksExt, UserExt}; -use std::convert::From; +use std::convert::{From, TryFrom}; use std::fmt; use std::str::FromStr; @@ -677,18 +677,47 @@ macr...
1
54
30
25b792ca4a444e40575097ba0f29c2b9abe5752a
Guillaume Gomez
2022-11-23T18:46:22
Update crate version to 0.26.8
diff --git a/Cargo.toml b/Cargo.toml index cb24bba..40dbe23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.26.7" +version = "0.26.8" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
e4d5936e94b0846095c7ef98df2d020206d33d21
Guillaume Gomez
2022-11-23T16:22:54
Add test for Process::session_id
diff --git a/tests/process.rs b/tests/process.rs index 2b88c7b..efaaaa0 100644 --- a/tests/process.rs +++ b/tests/process.rs @@ -293,6 +293,17 @@ fn test_process_times() { } } +// Checks that `session_id` is working. +#[test] +fn test_process_session_id() { + if !sysinfo::System::IS_SUPPORTED || cfg!(feature...
1
11
0
ed4a045a099424754d6321c1cfaba98e20046b41
Guillaume Gomez
2022-11-23T13:06:02
Fix clippy lint
diff --git a/src/linux/utils.rs b/src/linux/utils.rs index 60a9aa2..4866822 100644 --- a/src/linux/utils.rs +++ b/src/linux/utils.rs @@ -1,14 +1,14 @@ // Take a look at the license at the top of the repository in the LICENSE file. use std::fs::File; -use std::io::{self, Read, Seek, SeekFrom}; +use std::io::{self, R...
1
2
2
ef1cfd97eb77b5688e8910fc07d7a938f721e011
kayoch1n
2022-11-23T09:51:47
Ignore nfs on linux
diff --git a/src/linux/disk.rs b/src/linux/disk.rs index 6d7fc08..f3a8b5a 100644 --- a/src/linux/disk.rs +++ b/src/linux/disk.rs @@ -234,7 +234,9 @@ fn get_all_disks_inner(content: &str) -> Vec<Disk> { "pstore" | // https://www.kernel.org/doc/Documentation/ABI/testing/pstore "squashfs"...
1
3
1
c934ef3b8886eeb8a4e8ba42ee11dd7c051d28c6
Guillaume Gomez
2022-10-31T09:18:53
Update crate version to 0.26.7
diff --git a/Cargo.toml b/Cargo.toml index 7fdc4cb..cb24bba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.26.6" +version = "0.26.7" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
57883cdb7e7de1b8f478a8671eece69b569227c1
Guillaume Gomez
2022-10-30T19:50:57
Move to_cpath function into linux::utils
diff --git a/src/linux/disk.rs b/src/linux/disk.rs index c700a6c..6d7fc08 100644 --- a/src/linux/disk.rs +++ b/src/linux/disk.rs @@ -1,7 +1,7 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use crate::sys::utils::get_all_data; -use crate::{utils, DiskExt, DiskType}; +use crate::sy...
3
14
18
13c32c94c78caf9e22872b785cd729f5970912fb
ComplexSpaces
2022-10-23T01:21:48
Improve object releasers and cleanup usage sites
diff --git a/src/apple/disk.rs b/src/apple/disk.rs index b5595a1..d866d5b 100644 --- a/src/apple/disk.rs +++ b/src/apple/disk.rs @@ -62,16 +62,20 @@ impl DiskExt for Disk { fn refresh(&mut self) -> bool { unsafe { - let requested_properties = build_requested_properties(&[ + if let ...
4
82
61
a4e6255685d5321a31285bc9636da0f6d0e31108
ComplexSpaces
2022-10-05T02:17:46
Add implementation comments
diff --git a/src/apple/disk.rs b/src/apple/disk.rs index a1e91b7..b5595a1 100644 --- a/src/apple/disk.rs +++ b/src/apple/disk.rs @@ -126,6 +126,10 @@ pub(super) unsafe fn get_disks() -> Vec<Disk> { None => continue, }; + // Future note: There is a difference between `kCFURLVolumeIsBrowsab...
1
4
0
d4b4055e0003edceb34e4d6fae3650b3bd880166
ComplexSpaces
2022-10-04T05:44:09
Improve ejectable disk detection on Apple platforms
diff --git a/src/apple/disk.rs b/src/apple/disk.rs index d57d5fe..a1e91b7 100644 --- a/src/apple/disk.rs +++ b/src/apple/disk.rs @@ -100,6 +100,7 @@ pub(super) unsafe fn get_disks() -> Vec<Disk> { let requested_properties = build_requested_properties(&[ ffi::kCFURLVolumeIsEjectableKey, ffi::kCFUR...
2
18
2
62103073140891b4c8d38164f73ce830e9b3ce78
ComplexSpaces
2022-10-04T03:02:04
Add support for getting disk info on iOS
diff --git a/src/apple/disk.rs b/src/apple/disk.rs index 9f0b4a3..d57d5fe 100644 --- a/src/apple/disk.rs +++ b/src/apple/disk.rs @@ -1,15 +1,23 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use crate::utils::to_cpath; +use crate::sys::{ + ffi, + utils::{self, CFReleaser}, ...
9
377
355
b571367e41695288e04cf6e5552ca1f498125574
ComplexSpaces
2022-10-03T00:47:57
Remove build script in favor of link attribute
diff --git a/Cargo.toml b/Cargo.toml index 0f12934..8d9bea3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,6 @@ exclude = ["/test-unknown"] categories = ["filesystem", "os", "api-bindings"] -build = "build.rs" edition = "2018" [dependencies] diff --git a/build.rs b/build.rs deleted file mode 100644 inde...
4
4
18
c445b0d6ef0c259283a125fa7daec7970ea8415f
ComplexSpaces
2022-10-03T00:39:56
Replace DiskArbitration.framework with CoreFoundation for obtaining disk info on macOS
diff --git a/build.rs b/build.rs index 4373009..5b7fd58 100644 --- a/build.rs +++ b/build.rs @@ -8,8 +8,6 @@ fn main() { if is_apple { if !is_ios { - // DiskArbitration is not available on iOS: https://developer.apple.com/documentation/diskarbitration - println!("cargo:rustc-link-l...
6
247
243
f672f663670ec4f16eed9b572ad1a8e87307918e
ComplexSpaces
2022-09-30T20:26:38
Use a more reliable implementation for checking disk type on macOS
diff --git a/src/apple/macos/component/x86.rs b/src/apple/macos/component/x86.rs index 94eee1f..858ae61 100644 --- a/src/apple/macos/component/x86.rs +++ b/src/apple/macos/component/x86.rs @@ -3,7 +3,7 @@ use crate::sys::ffi; use crate::ComponentExt; -use libc::{c_char, c_int, c_void, mach_port_t}; +use libc::{c_ch...
4
225
68
a235b3736b28b39f4c8b810a4271f53851d9aa4e
Guillaume Gomez
2022-10-26T09:16:28
Update crate version to 0.26.6
diff --git a/Cargo.toml b/Cargo.toml index 0f12934..c116cbb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.26.5" +version = "0.26.6" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
d3daee6ec0e816224a74e02e302122e427e7b77a
Guillaume Gomez
2022-10-25T21:22:14
Fix doc comment formatting
diff --git a/src/traits.rs b/src/traits.rs index 8b70583..7b44299 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -415,7 +415,7 @@ pub trait ProcessExt: Debug { /// Wait for process termination. /// - ///```no_run + /// ```no_run /// use sysinfo::{Pid, ProcessExt, System, SystemExt}; /// ...
1
2
2
06cbb290e865a6ff96219411749f7369cba0586a
Guillaume Gomez
2022-10-25T14:13:52
Fix new clippy lints
diff --git a/examples/simple.rs b/examples/simple.rs index d800594..926cbca 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -2,6 +2,7 @@ #![crate_type = "bin"] #![allow(unused_must_use, non_upper_case_globals)] +#![allow(clippy::manual_range_contains)] extern crate sysinfo; @@ -152,7 +153,7 @@ fn i...
15
40
40
ab563bf10c4a67eab8940ebb800ad6b782a9fb7a
Prem
2022-10-25T21:21:02
Add wait() to process (#865) Add ProcessExt::wait() to process
diff --git a/src/apple/app_store/process.rs b/src/apple/app_store/process.rs index 8c3348e..7c43697 100644 --- a/src/apple/app_store/process.rs +++ b/src/apple/app_store/process.rs @@ -79,4 +79,6 @@ impl ProcessExt for Process { fn group_id(&self) -> Option<Gid> { None } + + fn wait(&self) {} } d...
9
155
1
b3565679510fb0cee2df50ce1a493daf17f8ac5b
Andrey Brusnik
2022-10-25T12:27:08
Use a reliable method of estimating mem_available on Linux
diff --git a/src/linux/system.rs b/src/linux/system.rs index bf15fcf..3c4fce3 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -157,6 +157,7 @@ pub struct System { mem_available: u64, mem_buffers: u64, mem_page_cache: u64, + mem_shmem: u64, mem_slab_reclaimable: u64, swap_total:...
1
20
1
0c7f94c6629c46609f21584f0dede1ea416c30ab
Andrey Brusnik
2022-10-24T15:05:32
Use MemTotal - MemAvailable on Linux for used memory calculation
diff --git a/src/linux/system.rs b/src/linux/system.rs index 2241327..bf15fcf 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -383,11 +383,7 @@ impl SystemExt for System { } fn used_memory(&self) -> u64 { - self.mem_total - - self.mem_free - - self.mem_buffers - ...
1
1
5
d344c582ecb1308f9aaa57917ec9e73265238e58
Guillaume Gomez
2022-10-21T13:57:35
Fix rustdoc warning
diff --git a/src/traits.rs b/src/traits.rs index 3ad5402..54bd52f 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -1251,8 +1251,8 @@ pub trait SystemExt: Sized + Debug + Default + Send + Sync { /// or [`std::env::consts::OS`]. /// /// See also - /// - https://www.freedesktop.org/software/systemd/man...
1
2
2
74d83ae661282dd96bbdb97ff27217d4760eb200
Guillaume Gomez
2022-10-17T16:30:04
Update crate version for 0.26.5
diff --git a/Cargo.toml b/Cargo.toml index cef3263..0f12934 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.26.4" +version = "0.26.5" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, CPU...
1
1
1
16689274581f362b136d5a31964b715576fd61b2
Guillaume Gomez
2022-10-17T13:06:53
Fix Disk kind information retrieval
diff --git a/src/windows/disk.rs b/src/windows/disk.rs index e9809f9..215fb8c 100644 --- a/src/windows/disk.rs +++ b/src/windows/disk.rs @@ -16,9 +16,10 @@ use winapi::um::handleapi::{CloseHandle, INVALID_HANDLE_VALUE}; use winapi::um::ioapiset::DeviceIoControl; use winapi::um::winbase::{DRIVE_FIXED, DRIVE_REMOVABLE}...
1
19
13
04ddd8e12a1a1cc4bdd95b4b67fc2d7c68c18624
Guillaume Gomez
2022-10-17T13:10:45
Fix clippy warnings
diff --git a/src/apple/macos/process.rs b/src/apple/macos/process.rs index 7968b0a..3728269 100644 --- a/src/apple/macos/process.rs +++ b/src/apple/macos/process.rs @@ -365,7 +365,7 @@ unsafe fn create_new_process( p => Some(Pid(p)), }; - let mut proc_args = Vec::with_capacity(size as usize); + le...
6
12
10
cecf1029734852d2d044187909d5af5504954487
Matthias
2022-10-17T10:08:33
added linux warning
diff --git a/src/traits.rs b/src/traits.rs index 7cc004c..3ad5402 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -878,6 +878,12 @@ pub trait SystemExt: Sized + Debug + Default + Send + Sync { /// If you want only the processes with exactly the given `name`, take a look at /// [`SystemExt::processes_by_exac...
1
12
0