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
d120f43ce1dce25343dff61ce9d12cb3c135d467
Guillaume Gomez
2021-04-08T18:16:23
rename get_system_info into get_system_info_linux and get_system_info_android
diff --git a/src/linux/system.rs b/src/linux/system.rs index b550038..1b40c38 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -489,7 +489,7 @@ impl SystemExt for System { #[cfg(not(target_os = "android"))] fn get_name(&self) -> Option<String> { - get_system_info( + get_system_inf...
1
17
13
580ec7815ea8109f62ad0e6f239c0824dd9005bb
Guillaume Gomez
2021-04-08T18:13:33
Clean up "get_system_info" and fix tests
diff --git a/Cargo.toml b/Cargo.toml index 5c43227..8aa4316 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,9 @@ libc = "^0.2.92" [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] core-foundation-sys = "0.8" +[target.'cfg(all(target_os = "linux", not(target_os = "android")))'.dev-depend...
2
86
24
bf09dba8eb50d26500d0f5d5750b2b3dac5f84a1
Jason Ozias
2021-03-18T20:46:26
Added 'lsb-release -r' fallback on linux systems to get OS version, where VERSION_ID isn't included in the os-release file
diff --git a/src/linux/system.rs b/src/linux/system.rs index 0c64247..499fcd5 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -487,6 +487,15 @@ impl SystemExt for System { &self.users } + #[cfg(not(target_os = "android"))] + fn get_name(&self) -> Option<String> { + get_system_...
1
53
5
fa97e259aac2796b1aa4068502179797c1338471
Guillaume Gomez
2021-04-07T12:49:06
Fix ios warnings
diff --git a/src/apple/macos/mod.rs b/src/apple/macos/mod.rs index 972085a..36abf50 100644 --- a/src/apple/macos/mod.rs +++ b/src/apple/macos/mod.rs @@ -7,6 +7,7 @@ pub mod component; pub mod disk; pub mod ffi; +pub mod system; #[cfg(not(feature = "apple-app-store"))] pub mod process; diff --git a/src/apple/maco...
3
164
144
6e339a150ee2e8174df978b2dbae29c4b104fdb3
Guillaume Gomez
2021-03-30T13:53:22
Build sysinfo_debug macro on ios too
diff --git a/src/lib.rs b/src/lib.rs index 6beab57..5902f4f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -68,7 +68,6 @@ macro_rules! sysinfo_debug { }} } -#[cfg(not(target_os = "ios"))] #[cfg(not(feature = "debug"))] #[doc(hidden)] macro_rules! sysinfo_debug {
1
0
1
bd2ee0dc98e6b9862a789dd0ca8635dc0d075148
Guillaume Gomez
2021-03-29T20:49:01
Fix CPU computation on mac
diff --git a/Cargo.toml b/Cargo.toml index 51ae42a..5c43227 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ winapi = { version = "0.3", features = ["fileapi", "handleapi", "ifdef", "ioapis ntapi = "0.3" [target.'cfg(not(any(target_os = "unknown", target_arch = "wasm32")))'.dependencies] -libc = "^0.2.86"...
6
238
92
c18e7dcf32f551b2bc6a9fbc6fa40247269b27af
Guillaume Gomez
2021-03-30T12:16:35
Rename ProcessStatus to_string method to as_str
diff --git a/src/apple/process.rs b/src/apple/process.rs index e4826d4..b887ed5 100644 --- a/src/apple/process.rs +++ b/src/apple/process.rs @@ -40,7 +40,7 @@ impl From<u32> for ProcessStatus { impl ProcessStatus { /// Used to display `ProcessStatus`. - pub fn to_string(&self) -> &str { + pub fn as_str(&s...
3
6
6
d3b6fca13968b9a8c3d34f074f8f63be1f251235
Guillaume Gomez
2021-03-18T19:06:31
Upgrade crate version to 0.16.5
diff --git a/Cargo.toml b/Cargo.toml index e0a4b17..51ae42a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.16.4" +version = "0.16.5" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
fb6aab8a7f3edb2e7c787cb107d803dd4778b8ae
Jason Ozias
2021-03-16T23:29:00
Add support for uid/gid to User.
diff --git a/src/apple/users.rs b/src/apple/users.rs index 915a84c..4ca1499 100644 --- a/src/apple/users.rs +++ b/src/apple/users.rs @@ -4,7 +4,10 @@ // Copyright (c) 2020 Guillaume Gomez // -use crate::User; +use crate::{ + common::{Gid, Uid}, + User, +}; use crate::sys::utils; use libc::{c_char, endpwen...
7
197
61
58b31e3a5d2821fb0483125220331b3afab5cd11
ab-cgh
2021-03-18T15:37:32
Remove trailing NUL bytes from Windows hostnames (#450) * Remove trailing NUL bytes from Windows hostnames * Allow renamed_and_removed_lints Co-authored-by: ABGH, C <>
diff --git a/src/lib.rs b/src/lib.rs index 35a0bc9..673f18d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -55,6 +55,7 @@ //#![deny(warnings)] #![allow(unknown_lints)] #![allow(clippy::upper_case_acronyms)] +#![allow(renamed_and_removed_lints)] #[cfg(doctest)] doc_comment::doctest!("../README.md"); diff --git a/src...
8
39
29
e76508499410018de01db0ce34e0a8db9dcbb069
Guillaume Gomez
2021-02-19T18:52:31
Upgrade crate version to 0.16.4
diff --git a/Cargo.toml b/Cargo.toml index da4196b..e0a4b17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.16.3" +version = "0.16.4" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
ca95aa845ffcc70ecb66528563e8ced4c00a4e4c
Guillaume Gomez
2021-02-19T18:58:43
Fix clippy warnings
diff --git a/src/linux/component.rs b/src/linux/component.rs index 99cc06f..6b917da 100644 --- a/src/linux/component.rs +++ b/src/linux/component.rs @@ -47,32 +47,30 @@ fn append_files(components: &mut Vec<Component>, folder: &Path) { let mut matchings: HashMap<u32, Vec<String>> = HashMap::with_capacity(10); ...
3
78
86
f789724975156b78a45115fe8e41f726f6b01cd6
Brandon W Maister
2021-02-18T20:54:23
Check for and remove trailing nulls from sysctl strings In particular, the brand string was showing up with a trailing null for me on my 2019 MacBook Pro, and the test that I added does fail if you remove the check that I added.
diff --git a/src/apple/processor.rs b/src/apple/processor.rs index e3b393d..1b43fe4 100644 --- a/src/apple/processor.rs +++ b/src/apple/processor.rs @@ -230,6 +230,9 @@ fn get_sysctl_str(s: &[u8]) -> String { unsafe { buf.set_len(len); } + while buf.last() == Some(&b'\0') { + ...
2
10
1
bd892bc6ccf8161633e1151a2fda1614fc390276
Guillaume Gomez
2021-02-15T15:21:25
Update crate version to 0.16.3
diff --git a/Cargo.toml b/Cargo.toml index 40f4b50..da4196b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.16.2" +version = "0.16.3" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
90dcb082e1470ac27a4f390fc709f2da292d9b8d
Guillaume Gomez
2021-02-15T15:21:05
Update minimal libc version to 0.2.86
diff --git a/Cargo.toml b/Cargo.toml index 708d27f..40f4b50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ winapi = { version = "0.3", features = ["fileapi", "handleapi", "ifdef", "ioapis ntapi = "0.3" [target.'cfg(not(any(target_os = "unknown", target_arch = "wasm32")))'.dependencies] -libc = "0.2" +li...
1
1
1
84905a4ce6af111b90a366350ea8462342cda296
Guillaume Gomez
2021-02-14T16:54:29
Upgrade crate version to 0.16.2
diff --git a/Cargo.toml b/Cargo.toml index 1adb224..708d27f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.16.1" +version = "0.16.2" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
c0bc912fb1d9239da9d0ccee48307f6e061c2146
Guillaume Gomez
2021-02-14T14:15:59
Prevent "Subtract Overflow" in network modules
diff --git a/src/apple/network.rs b/src/apple/network.rs index 3e98fd4..736df3f 100644 --- a/src/apple/network.rs +++ b/src/apple/network.rs @@ -172,7 +172,7 @@ pub struct NetworkData { impl NetworkExt for NetworkData { fn get_received(&self) -> u64 { - self.current_in - self.old_in + self.current...
4
24
19
6c9c046f2d4204bdb43b0e4b01f5c05c7e3eba11
Vladyslav Yamkovyi
2021-02-09T23:29:57
Convert KiB from /proc/meminfo into KB Discussed in #241
diff --git a/src/linux/system.rs b/src/linux/system.rs index 62b33b1..8701c6e 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -309,7 +309,8 @@ impl SystemExt for System { }; if let Some(val_str) = line.rsplit(' ').nth(1) { if let Ok(value) = u64::from...
1
2
1
07f465b00d20014d83e6e1681b3a4202b7d9bfa3
Ricky
2021-02-08T20:18:22
move test into check_system_info and be smarter about linux implementation
diff --git a/src/lib.rs b/src/lib.rs index 267d459..35a0bc9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -216,35 +216,28 @@ mod test { assert!(!s .get_kernel_version() - .expect("Failed to get system version") + .expect("Failed to get kernel version") ...
2
14
24
be99a87e1e3ef2738e08fba7a821d56f841cb064
Ricky (deg4usser)
2021-02-08T15:26:21
rustfmt linux
diff --git a/src/linux/system.rs b/src/linux/system.rs index 1f57d77..e8972fa 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -492,10 +492,18 @@ impl SystemExt for System { fn get_long_os_version(&self) -> Option<String> { #[cfg(target_os = "android")] - let long_name = format!("And...
1
10
2
bb8ccddb09d6c0c0e1e8e2a933aa419d978bf196
Ricky
2021-02-08T15:04:54
Fixed grammar mistake in traits, and adjusted Windows os_version to return 'CurrentMajorVersionNumber (CurrentBuildVersion)'
diff --git a/src/traits.rs b/src/traits.rs index 87f9c16..e52f541 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -980,7 +980,7 @@ pub trait SystemExt: Sized + Debug + Default { /// ``` fn get_os_version(&self) -> Option<String>; - /// Returns the system long os version (e.g MacOS 11.2 BigSur). + //...
2
18
21
93d05b25f206b704c2b2663332228f64895676a1
Ricky (deg4usser)
2021-02-08T00:26:33
fix linux implementation
diff --git a/src/linux/system.rs b/src/linux/system.rs index 52abede..1f57d77 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -492,10 +492,10 @@ impl SystemExt for System { fn get_long_os_version(&self) -> Option<String> { #[cfg(target_os = "android")] - let long_name = format!("And...
1
2
2
de9402c85db6fed76648ff533a19bf28aa526924
Ricky
2021-02-08T00:18:39
Adding long_os_version for MacOS, iOS, Android, Linux, and Windows
diff --git a/src/apple/system.rs b/src/apple/system.rs index 8017e73..1fc365d 100644 --- a/src/apple/system.rs +++ b/src/apple/system.rs @@ -464,6 +464,39 @@ impl SystemExt for System { get_system_info(libc::KERN_OSTYPE, Some("Darwin")) } + fn get_long_os_version(&self) -> Option<String> { + #...
6
157
13
190b88b6c5c751c4a88b2d2e984357efd6949949
Peter De Schrijver
2021-02-05T16:53:51
Fix a few issues 1) Correctly unescape the following sequences as per https://github.com/torvalds/linux/blob/dd86e7fa07a3ec33c92c957ea7b642c4702516a0/fs/proc_namespace.c#L152 : ' ' becomes \040 '\' becomes \134 '\t' becomes \\011 '\n' becomes \\012 2) Allow /run/media as the mount path as this is often used for moun...
diff --git a/src/linux/disk.rs b/src/linux/disk.rs index 2e54f67..fe211dc 100644 --- a/src/linux/disk.rs +++ b/src/linux/disk.rs @@ -175,7 +175,13 @@ fn get_all_disks_inner(content: &str) -> Vec<Disk> { // fs_spec<tab>fs_file<tab>fs_vfstype<tab>other fields let mut fields = line.split_whitespa...
1
9
3
f8446af3c65c0ec90352fbc6046060b8eb722e54
mjarkk
2021-02-05T16:51:34
Windows use partition size instaid of disk size
diff --git a/src/windows/tools.rs b/src/windows/tools.rs index f03e57b..a332611 100644 --- a/src/windows/tools.rs +++ b/src/windows/tools.rs @@ -25,7 +25,7 @@ use winapi::um::ioapiset::DeviceIoControl; use winapi::um::sysinfoapi::{GetSystemInfo, SYSTEM_INFO}; use winapi::um::winbase::DRIVE_FIXED; use winapi::um::win...
1
6
9
eec458855ecd52f232c529bfe1ef0cdb8c33239a
Darren Schroeder
2021-02-05T16:34:13
update virtual_memory method for linux
diff --git a/src/linux/system.rs b/src/linux/system.rs index 14ccef6..aae1b35 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -652,7 +652,7 @@ fn update_time_and_memory( entry.memory -= parent_memory; } // vsz - entry.virtual_memory = u64::from_str(parts[22]).unwrap_o...
1
1
1
e9064ffb58bdcc725a971a6a2a8bac5f0bb83bfd
Guillaume Gomez
2021-02-03T16:32:56
Upgrade crate version to 0.16.1
diff --git a/Cargo.toml b/Cargo.toml index 808b204..b40bf3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.16.0" +version = "0.16.1" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
f2258c4f2679839becebcbbe11d74cf12b919dc2
ABGH, C
2021-02-02T20:50:18
Implement Android system information retrieval
diff --git a/src/linux/system.rs b/src/linux/system.rs index be5b4dd..14ccef6 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -13,7 +13,7 @@ use crate::{Disk, LoadAvg, Networks, Pid, ProcessExt, RefreshKind, SystemExt, Us use libc::{self, c_char, gid_t, sysconf, uid_t, _SC_CLK_TCK, _SC_HOST_NAME_MAX, _SC...
1
68
21
6547a2d3a76d2197242b7cdf5c3c362cbc13e72b
ABGH, C
2021-02-02T21:50:34
Prefix unused field in Linux Processor
diff --git a/src/linux/processor.rs b/src/linux/processor.rs index 4244408..b201786 100644 --- a/src/linux/processor.rs +++ b/src/linux/processor.rs @@ -23,8 +23,8 @@ pub struct CpuValues { irq: u64, softirq: u64, steal: u64, - guest: u64, - guest_nice: u64, + _guest: u64, + _guest_nice: u64,...
1
8
8
55a6daaa05b6d2a83bd476bdbbc98f43d019a4d9
ABGH, C
2021-02-02T21:30:35
Allow upper_case_acroynms lint
diff --git a/src/lib.rs b/src/lib.rs index 7c84187..25e61b3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -54,6 +54,7 @@ #![deny(broken_intra_doc_links)] //#![deny(warnings)] #![allow(unknown_lints)] +#![allow(clippy::upper_case_acronyms)] #[cfg(doctest)] doc_comment::doctest!("../README.md");
1
1
0
ba31a422d71246e6e2e77361917db5b3fa3a9282
ABGH, C
2021-02-01T18:49:38
Remove process information from iOS backend iOS apps are sandboxed and unable to fetch this information at all
diff --git a/src/apple/ffi.rs b/src/apple/ffi.rs index 4b82b3b..01c243d 100644 --- a/src/apple/ffi.rs +++ b/src/apple/ffi.rs @@ -10,22 +10,6 @@ use libc::{c_int, c_uchar, c_uint, c_ushort, c_void}; pub use crate::sys::inner::ffi::*; extern "C" { - pub fn proc_pidinfo( - pid: c_int, - flavor: c_int,...
10
712
593
b109e6112e2631ae3864605b37b20e18390f2f32
Guillaume Gomez
2021-01-30T23:29:35
Upgrade version to 0.16
diff --git a/Cargo.toml b/Cargo.toml index 178ff9e..49f538c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.11" +version = "0.16.0" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pr...
1
1
1
b26c93f9a6f95df9db79af58fcb1d913b022d832
Guillaume Gomez
2021-01-30T16:26:59
Upgrade crate version to 0.15.11
diff --git a/Cargo.toml b/Cargo.toml index a097350..178ff9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.10" +version = "0.15.11" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, p...
1
1
1
1b61d80729d0a5c049c33662cff4a75a65dec5d2
Jonathan Nilsson
2021-01-30T16:03:01
Also expose type
diff --git a/src/windows/tools.rs b/src/windows/tools.rs index 968a49b..f03e57b 100644 --- a/src/windows/tools.rs +++ b/src/windows/tools.rs @@ -112,6 +112,8 @@ pub unsafe fn get_disks() -> Vec<Disk> { let drive_type = GetDriveTypeW(mount_point.as_ptr()); + let is_removable = drive_type == D...
1
23
3
fa677180cf522194227b1121dd33b747b06222f9
Jonathan Nilsson
2021-01-30T15:55:56
Also show removable drives
diff --git a/src/windows/tools.rs b/src/windows/tools.rs index a1941c2..968a49b 100644 --- a/src/windows/tools.rs +++ b/src/windows/tools.rs @@ -13,7 +13,7 @@ use std::collections::HashMap; use std::ffi::OsStr; use std::mem::{size_of, zeroed}; -use winapi::ctypes::c_void; +use winapi::{ctypes::c_void, um::winbase::...
1
5
2
104cdf020949dfe74e0a88e90427bc35b17baf69
Guillaume Gomez
2021-01-30T15:25:48
Upgrade version to 0.15.10
diff --git a/Cargo.toml b/Cargo.toml index 6d40c86..a097350 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.9" +version = "0.15.10" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pr...
1
1
1
72c6c01aa5d5768ecb227ee62c1d33ec45dfcc12
Guillaume Gomez
2021-01-30T15:02:10
Rename src/sysinfo.rs to src/lib.rs
diff --git a/Cargo.toml b/Cargo.toml index bfe1a01..6d40c86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,6 @@ cc = "1.0" [lib] name = "sysinfo" crate_type = ["rlib", "cdylib"] -path = "src/sysinfo.rs" [features] default = ["multithread"] diff --git a/src/sysinfo.rs b/src/lib.rs similarity index 100% ren...
2
0
1
31f258fbab790f78c02e113bd0de2d415fc6052b
Guillaume Gomez
2021-01-30T15:01:13
Remove uneeded cfg_if redeclaration
diff --git a/src/apple/ffi.rs b/src/apple/ffi.rs index cbef91e..4b82b3b 100644 --- a/src/apple/ffi.rs +++ b/src/apple/ffi.rs @@ -51,38 +51,7 @@ extern "C" { } // TODO: waiting for https://github.com/rust-lang/libc/pull/678 -macro_rules! cfg_if { - ($( - if #[cfg($($meta:meta),*)] { $($it:item)* } - ) e...
1
1
32
626512693678dd2e20c07978227a2bf2f9401870
Guillaume Gomez
2021-01-30T15:00:27
end transition to 2018 edition
diff --git a/benches/basic.rs b/benches/basic.rs index d2e9827..f825be6 100644 --- a/benches/basic.rs +++ b/benches/basic.rs @@ -1,8 +1,5 @@ #![feature(test)] -extern crate sysinfo; -extern crate test; - use sysinfo::get_current_pid; use sysinfo::{DiskExt, SystemExt}; diff --git a/build.rs b/build.rs index 9cd0e...
11
8
37
5ef6d7f361cb0130d7b8f636e66385168c5bb741
mjarkk
2021-01-30T13:45:24
Remove windows expection for the implmentations of this pr
diff --git a/src/sysinfo.rs b/src/sysinfo.rs index d96a5d3..d48ad5a 100644 --- a/src/sysinfo.rs +++ b/src/sysinfo.rs @@ -224,14 +224,10 @@ mod test { let s = System::new(); assert!(!s.get_name().expect("Failed to get system name").is_empty()); - cfg_if! { - if #[cfg...
1
4
8
b3b3d75bcff217bb65ba787dbddb7208f117b088
mjarkk
2021-01-30T13:44:01
Fix sugestions
diff --git a/src/windows/system.rs b/src/windows/system.rs index da203e2..846390c 100644 --- a/src/windows/system.rs +++ b/src/windows/system.rs @@ -508,14 +508,14 @@ fn get_reg_string_value(hkey: HKEY, path: &str, field_name: &str) -> Option<Stri } { 0 => break, winerror::ERROR_MORE_...
1
3
3
af0c9d028a8918cbffb8959b81bc7c16ef095f62
mjarkk
2021-01-30T11:01:30
Remove some comments
diff --git a/src/windows/system.rs b/src/windows/system.rs index 76a3c24..da203e2 100644 --- a/src/windows/system.rs +++ b/src/windows/system.rs @@ -406,10 +406,6 @@ impl SystemExt for System { get_dns_hostname() } - // FIXME currently we are figuring out the best way to return kernel version for Win...
1
0
7
9286cc9657ac8892e654c238a74db53668b1967f
mjarkk
2021-01-30T10:59:33
Implemented get_kernel_version & get_os_version
diff --git a/src/windows/system.rs b/src/windows/system.rs index 08937d9..76a3c24 100644 --- a/src/windows/system.rs +++ b/src/windows/system.rs @@ -5,6 +5,7 @@ // use crate::{LoadAvg, Networks, Pid, ProcessExt, RefreshKind, SystemExt, User}; +use winapi::um::winreg::HKEY_LOCAL_MACHINE; use crate::sys::component...
1
68
17
bec6bedfc4e2e754e6c07f6a7a86bb353fcc42c8
Guillaume Gomez
2021-01-26T15:04:25
Switch to 2018 edition
diff --git a/Cargo.toml b/Cargo.toml index 7af876b..bfe1a01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ readme = "README.md" categories = ["filesystem", "os", "api-bindings"] build = "build.rs" +edition = "2018" [dependencies] cfg-if = "1.0" diff --git a/src/apple/component.rs b/src/apple/compone...
36
175
222
8f8b1e1fe285c14a50be3ef3612e06401ceaae24
Guillaume Gomez
2021-01-25T20:39:13
Change return type of SystemExt::get_physical_core_count from "usize" into "Option<usize>"
diff --git a/src/apple/system.rs b/src/apple/system.rs index 84fb886..0705c6d 100644 --- a/src/apple/system.rs +++ b/src/apple/system.rs @@ -347,7 +347,7 @@ impl SystemExt for System { &self.processors } - fn get_physical_core_count(&self) -> usize { + fn get_physical_core_count(&self) -> Option<u...
8
27
26
3310517964f2015b7aa55c16ea23501dd05bfc13
Mark Kopenga
2021-01-16T14:44:40
Add get_physical_core_numbers (#408) Add System::get_physical_core_numbers
diff --git a/src/apple/system.rs b/src/apple/system.rs index 9e48fc8..84fb886 100644 --- a/src/apple/system.rs +++ b/src/apple/system.rs @@ -6,6 +6,7 @@ #[cfg(target_os = "macos")] use core_foundation_sys::base::{kCFAllocatorDefault, CFRelease}; +use libc::c_char; use sys::component::Component; use sys::disk::*; ...
8
134
1
ac414aef59b4e9c2efb5aa18c7acad9be10bfee8
Brandon W Maister
2021-01-12T21:16:28
Correct build for cross-compilation The build target of the build script is not the same as the build target of the final lib. Using the *runtime* environment variable (as opposed to the cfg var or `env!()`) determines the actual target of the library. For example, if you are running `cargo build --target=x86_64-appl...
diff --git a/Cargo.toml b/Cargo.toml index 0656a3d..6cf01f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,10 @@ libc = "0.2" [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] core-foundation-sys = "0.8" -[target.'cfg(target_os = "macos")'.build-dependencies] +[build-dependencies] +# T...
2
20
17
e8d4fe693178716122bb054172a002a5010894bd
Guillaume Gomez
2021-01-13T14:24:57
Upgrade crate version to 0.15.9
diff --git a/Cargo.toml b/Cargo.toml index 0656a3d..c4a768e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.8" +version = "0.15.9" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
b1b419c1d56a7c4eeeff8638cbe8712c9485333f
Guillaume Gomez
2021-01-13T14:07:25
Fix iOS warning
diff --git a/src/apple/disk.rs b/src/apple/disk.rs index fd72731..b0ad098 100644 --- a/src/apple/disk.rs +++ b/src/apple/disk.rs @@ -13,6 +13,7 @@ use std::mem; use std::path::{Path, PathBuf}; use utils::to_cpath; +#[cfg(target_os = "macos")] pub(crate) use sys::inner::disk::*; /// Struct containing a disk info...
2
1
1
31ef4ccec83f2700a7912b6ee0cfebf4d59da879
Guillaume Gomez
2021-01-13T13:38:35
Clean up imports/reexports in apple module
diff --git a/src/apple/component.rs b/src/apple/component.rs index b8264fb..161bc92 100644 --- a/src/apple/component.rs +++ b/src/apple/component.rs @@ -4,11 +4,4 @@ // Copyright (c) 2021 Guillaume Gomez // -cfg_if! { - if #[cfg(target_os = "macos")] { - pub use super::macos::Component; - pub(crate...
10
25
33
2b35894164ccce663b09d35ca2488f777b603840
ABGH, C
2021-01-12T20:21:35
Don't keep macOS struct fields on iOS
diff --git a/src/apple/ffi.rs b/src/apple/ffi.rs index 180dbe7..016b1cc 100644 --- a/src/apple/ffi.rs +++ b/src/apple/ffi.rs @@ -144,7 +144,6 @@ pub struct __DASession(c_void); // pub type io_name_t = [u8; 128]; // #[allow(non_camel_case_types)] // pub type io_registry_entry_t = io_object_t; -pub type DASessionRef =...
3
35
36
877ed84924c9b40aa3178ebdecb770122c084bfe
ABGH, C
2021-01-12T00:02:10
Component details aren't available on iOS
diff --git a/src/mac/component/ios.rs b/src/mac/component/ios.rs new file mode 100644 index 0000000..23d2ab8 --- /dev/null +++ b/src/mac/component/ios.rs @@ -0,0 +1,31 @@ +// +// Sysinfo +// +// Copyright (c) 2018 Guillaume Gomez +// + +use ComponentExt; + +/// Dummy struct representing a component since iOS doesn't su...
5
91
9
4a11fb2be3d7c30dad9980d0855180880324de17
Guillaume Gomez
2021-01-11T19:42:52
Upgrade crate version to 0.15.8
diff --git a/Cargo.toml b/Cargo.toml index 91a8444..ff336c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.7" +version = "0.15.8" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
61707ed709eb97396aad702fafbf9ae280ca2979
Guillaume Gomez
2021-01-09T21:54:50
Upgrade crate version to 0.15.7
diff --git a/Cargo.toml b/Cargo.toml index d986686..91a8444 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.6" +version = "0.15.7" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
ccd550f6c19de39a76618778edd661cb917dafe8
Guillaume Gomez
2021-01-09T21:28:14
Add more subcommands in example
diff --git a/examples/src/simple.rs b/examples/src/simple.rs index a2c932a..6aa1ff4 100644 --- a/examples/src/simple.rs +++ b/examples/src/simple.rs @@ -132,6 +132,10 @@ fn print_help() { "frequency : Displays processor frequency" ); writeln!(&mut io::stdout(), "users : Displays...
1
22
0
bfc3cedfd04d64667d18f26a36391935b242c580
Guillaume Gomez
2021-01-09T21:21:03
Remove unneeded memchr dependency
diff --git a/Cargo.toml b/Cargo.toml index 1b8320a..e95c492 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,9 +31,6 @@ core-foundation-sys = "0.8" [target.'cfg(any(target_os = "macos", target_os = "ios"))'.build-dependencies] cc = "1.0" -[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] -...
3
4
10
393071d80140b57c99182e300515193f87306063
Ricky
2021-01-09T19:56:04
from review; added a few comments, and used memchr for stripping null bytes from result
diff --git a/Cargo.toml b/Cargo.toml index e95c492..1b8320a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,9 @@ core-foundation-sys = "0.8" [target.'cfg(any(target_os = "macos", target_os = "ios"))'.build-dependencies] cc = "1.0" +[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] +...
4
25
1
64ab021657497e2bd6eeae4aad700d879395310d
Ricky
2021-01-09T18:17:27
❤️ Clippy
diff --git a/src/linux/system.rs b/src/linux/system.rs index 5e0834a..7ad13fc 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -509,7 +509,7 @@ impl SystemExt for System { fn get_host_name(&self) -> Option<String> { let hostname_max = unsafe { sysconf(_SC_HOST_NAME_MAX) }; - let mut ...
1
1
1
d081a761f4c946654a8406a86cc366c133717bf5
Ricky
2021-01-09T18:00:57
rust fmt
diff --git a/src/linux/system.rs b/src/linux/system.rs index d3d06a2..5e0834a 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -16,7 +16,7 @@ use Pid; use User; use {ProcessExt, RefreshKind, SystemExt}; -use libc::{self, gid_t, sysconf, c_char, uid_t, _SC_CLK_TCK, _SC_PAGESIZE, _SC_HOST_NAME_MAX}; +use...
3
22
6
dade5dd3601d2db9c70487094faba32bdee63ee9
Ricky
2021-01-09T17:55:32
Updated decoumentation and added newline at the end of windows/system.rs
diff --git a/src/traits.rs b/src/traits.rs index 0322469..d587c5b 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -959,7 +959,14 @@ pub trait SystemExt: Sized + Debug + Default { /// ``` fn get_version(&self) -> Option<String>; - /// Testing + /// Returns the system hostname based off DNS + /// ...
2
9
2
f22b6d412ee97ae0762c21a5ab0749abb853304a
Ricky
2021-01-09T17:40:51
default to None for Unknown systems
diff --git a/src/unknown/system.rs b/src/unknown/system.rs index 1c59d35..e7f7725 100644 --- a/src/unknown/system.rs +++ b/src/unknown/system.rs @@ -144,6 +144,10 @@ impl SystemExt for System { None } + fn get_host_name(&self) -> Option<String> { + None + } + fn get_version(&self) -> O...
1
4
0
5aee2cec264e125b761684aba5fa03e4aacb4279
Ricky
2021-01-09T17:40:29
Working windows implementation
diff --git a/src/windows/system.rs b/src/windows/system.rs index 330a106..10e0e4c 100644 --- a/src/windows/system.rs +++ b/src/windows/system.rs @@ -31,12 +31,13 @@ use windows::tools::*; use ntapi::ntexapi::{ NtQuerySystemInformation, SystemProcessInformation, SYSTEM_PROCESS_INFORMATION, }; +use winapi::ctypes:...
1
25
1
e13c3d3ed9f4fb2dd7c2dbdcbcc062aaed7115a4
Ricky (deg4usser)
2021-01-09T16:24:27
Working linux implementation
diff --git a/src/linux/system.rs b/src/linux/system.rs index 594117e..d3d06a2 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -16,7 +16,7 @@ use Pid; use User; use {ProcessExt, RefreshKind, SystemExt}; -use libc::{self, gid_t, sysconf, uid_t, _SC_CLK_TCK, _SC_PAGESIZE}; +use libc::{self, gid_t, syscon...
1
5
5
ee2db4ee7501e349978e5aea239f375834a8ba40
Ricky
2021-01-08T23:30:37
Working MacOS implementation, and the basics for linux to test in a VM
diff --git a/src/linux/system.rs b/src/linux/system.rs index a4ebe7c..594117e 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -507,6 +507,17 @@ impl SystemExt for System { get_system_info("NAME=") } + fn get_host_name(&self) -> Option<String> { + let hostname_max = unsafe { sysco...
3
18
0
efff2bd398baacdd08fe9f99a83518562c6d8259
Guillaume Gomez
2021-01-08T16:10:14
Upgrade crate version to 0.15.6
diff --git a/Cargo.toml b/Cargo.toml index ad791c6..e95c492 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.5" +version = "0.15.6" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
bd97147ace05e02d5250c5da3601b916e917f0b0
Nikhil Benesch
2021-01-08T04:47:42
Upgrade to cfg-if 1.0
diff --git a/Cargo.toml b/Cargo.toml index 0775853..a4cfd29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ categories = ["filesystem", "os", "api-bindings"] build = "build.rs" [dependencies] -cfg-if = "0.1" +cfg-if = "1.0" rayon = "^1.5" doc-comment = "0.3" once_cell = "1.0"
1
1
1
b4d7e7d04f5f38ba4794454a00f9fc44942a63f9
Guillaume Gomez
2021-01-05T23:38:01
Upgrade crate version to 0.15.5
diff --git a/Cargo.toml b/Cargo.toml index c36008c..0775853 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.4" +version = "0.15.5" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
79d4051a66ae88112eea2543176848b8b0d99d34
Guillaume Gomez
2021-01-05T21:39:24
Add System::get_name and System::get_version on mac
diff --git a/src/mac/system.rs b/src/mac/system.rs index 42c39b2..b9981a5 100644 --- a/src/mac/system.rs +++ b/src/mac/system.rs @@ -410,6 +410,14 @@ impl SystemExt for System { fn get_boot_time(&self) -> u64 { self.boot_time } + + fn get_name(&self) -> Option<String> { + get_system_info(li...
1
33
0
e37a8d2cac0f1a58bab11f0d0f4cde5320f46c29
Guillaume Gomez
2021-01-05T21:10:05
Add System::get_name and System::get_version on Windows
diff --git a/src/windows/system.rs b/src/windows/system.rs index 8716206..5a89703 100644 --- a/src/windows/system.rs +++ b/src/windows/system.rs @@ -11,7 +11,7 @@ use sys::users::get_users; use std::cell::UnsafeCell; use std::collections::HashMap; -use std::mem::{size_of, zeroed}; +use std::mem::{size_of, zeroed, M...
1
25
4
37f907d79fa0fa85f97b7c05dfe6e9338808e5ca
Guillaume Gomez
2021-01-05T20:50:52
Add System::get_name and System::get_version on unsupported systems
diff --git a/src/unknown/system.rs b/src/unknown/system.rs index e50ed15..1c59d35 100644 --- a/src/unknown/system.rs +++ b/src/unknown/system.rs @@ -139,6 +139,14 @@ impl SystemExt for System { fn get_users(&self) -> &[User] { &[] } + + fn get_name(&self) -> Option<String> { + None + } +...
1
8
0
06b882ac617f5f0102a9090ed96d968c0f8b8275
Guillaume Gomez
2021-01-05T20:49:44
Add System::get_name and System::get_version on linux
diff --git a/src/linux/system.rs b/src/linux/system.rs index 1c865eb..8f274e4 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -503,6 +503,14 @@ impl SystemExt for System { fn get_users(&self) -> &[User] { &self.users } + + fn get_name(&self) -> Option<String> { + get_system_in...
3
58
0
4391bf8412f3bef8219421c83f186ce5238bee8f
Guillaume Gomez
2021-01-04T10:36:27
Add sleep in linux test
diff --git a/tests/process.rs b/tests/process.rs index d30e113..9d6a3aa 100644 --- a/tests/process.rs +++ b/tests/process.rs @@ -61,10 +61,14 @@ fn test_get_cmd_line() { } fn unix_like_cmd() { + use std::{thread, time}; + let p = std::process::Command::new("sleep") .arg("3") .spawn() ...
1
4
0
49b77b1fbefcfb4c43e46dfe26429171d9a87875
Guillaume Gomez
2021-01-01T15:21:16
Upgrade crate version
diff --git a/Cargo.toml b/Cargo.toml index 21c331c..c36008c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.3" +version = "0.15.4" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
2370da87f9e9e7761131225ab4ea561e59f1d0e4
Guillaume Gomez
2021-01-01T13:42:45
Remove unneeded as_str() call
diff --git a/src/linux/system.rs b/src/linux/system.rs index d1532f7..1c865eb 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -876,7 +876,7 @@ fn _get_process_data( } fn copy_from_file(entry: &Path) -> Vec<String> { - match File::open(entry.to_str().unwrap_or("/")) { + match File::open(entry) { ...
1
1
1
1906bfcf962b114449732fb625098b8a687cf850
Guillaume Gomez
2021-01-01T13:16:11
Add more information for test failure
diff --git a/tests/process.rs b/tests/process.rs index d30e113..3832fa1 100644 --- a/tests/process.rs +++ b/tests/process.rs @@ -43,9 +43,9 @@ fn test_get_cmd_line() { .spawn() .unwrap(); let mut s = sysinfo::System::new(); - assert!(s.get_processes().len() == 0); + assert!(s.get_processes(...
1
5
3
583ace5d7e6ab1762d760b987531eb82f2d28a89
Guillaume Gomez
2020-12-31T15:49:20
Continue mac cleanup
diff --git a/Cargo.toml b/Cargo.toml index a6711d3..21c331c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ ntapi = "0.3" libc = "0.2" [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] -core-foundation = "0.9" +core-foundation-sys = "0.8" [target.'cfg(any(target_os = "macos", ta...
5
34
158
aca2912f88425176fe9af177a8755b2f7644100d
Guillaume Gomez
2020-12-31T14:58:29
Update rayon minimum version to 1.5
diff --git a/Cargo.toml b/Cargo.toml index ab4ddb1..a6711d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ build = "build.rs" [dependencies] cfg-if = "0.1" -rayon = "^1.0" +rayon = "^1.5" doc-comment = "0.3" once_cell = "1.0"
1
1
1
e4da6cdae8087e96a418628d160bbe74c795c7ed
Guillaume Gomez
2020-12-27T22:33:39
Fix build
diff --git a/build.rs b/build.rs index 54f6c79..29653f0 100644 --- a/build.rs +++ b/build.rs @@ -1,12 +1,14 @@ #[cfg(any(target_os = "macos", target_os = "ios"))] extern crate cc; +#[cfg(any(target_os = "macos", target_os = "ios"))] fn main() { - if std::env::var("TARGET").unwrap().contains("-apple") { - ...
2
22
14
67f14d36ac589bce5d03e269ca6263ceb17d85e0
Guillaume Gomez
2020-12-25T18:04:54
Rework on disk discovery
diff --git a/Cargo.toml b/Cargo.toml index 397cdb5..4056e1d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,9 @@ ntapi = "0.3" [target.'cfg(not(any(target_os = "unknown", target_arch = "wasm32")))'.dependencies] libc = "0.2" +[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] +core-found...
8
157
42
4b1ba0c89e996e4611f4b264d66272a31f1a2a50
Guillaume Gomez
2020-12-24T15:39:09
Fix clippy lint on windows
diff --git a/src/windows/system.rs b/src/windows/system.rs index 22ae49b..8716206 100644 --- a/src/windows/system.rs +++ b/src/windows/system.rs @@ -418,6 +418,8 @@ fn refresh_existing_process(s: &mut System, pid: Pid) -> bool { } } +#[allow(clippy::size_of_in_element_count)] +//^ needed for "name.Length as usi...
1
3
1
77824175f8a0a7304d6b8ac4a9966cfebe87d3a8
Guillaume Gomez
2020-12-24T15:06:28
Remove definition of FFI functions available in libc
diff --git a/src/mac/ffi.rs b/src/mac/ffi.rs index f07a67f..997306d 100644 --- a/src/mac/ffi.rs +++ b/src/mac/ffi.rs @@ -120,14 +120,6 @@ extern "C" { // pub fn proc_pidpath(pid: i32, buf: *mut i8, bufsize: u32) -> i32; // pub fn proc_name(pid: i32, buf: *mut i8, bufsize: u32) -> i32; pub fn vm_deallocat...
3
5
13
71118a93e6c3db402595ef13bb7e90b8ee3b371c
Guillaume Gomez
2020-12-01T15:31:08
Remove #[no_mangle] attribute on FFI items
diff --git a/src/mac/ffi.rs b/src/mac/ffi.rs index 06c0f97..f07a67f 100644 --- a/src/mac/ffi.rs +++ b/src/mac/ffi.rs @@ -7,11 +7,11 @@ use libc::{c_char, c_int, c_uchar, c_uint, c_ushort, c_void, size_t}; extern "C" { - #[no_mangle] + // #[no_mangle] pub static kCFAllocatorDefault: CFAllocatorRef; /...
1
2
2
0880de6eab8fd18e8f669a001013e7f34052337a
Guillaume Gomez
2020-12-01T10:26:13
Fix clippy warnings
diff --git a/src/c_interface.rs b/src/c_interface.rs index 43d82dd..ce7ad7d 100644 --- a/src/c_interface.rs +++ b/src/c_interface.rs @@ -353,7 +353,7 @@ pub extern "C" fn sysinfo_process_get_pid(process: CProcess) -> pid_t { pub extern "C" fn sysinfo_process_get_parent_pid(process: CProcess) -> pid_t { assert!(!p...
17
56
55
348facbab98bd1e860d20c1d9eec29ec91f4394a
Guillaume Gomez
2020-10-02T14:51:48
Upgrade crate version
diff --git a/Cargo.toml b/Cargo.toml index 105770a..397cdb5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.2" +version = "0.15.3" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
876618986a97b753d540b4bf9a6ee03e36686956
Guillaume Gomez
2020-10-02T14:51:19
Prevent CPU to be NaN
diff --git a/src/linux/system.rs b/src/linux/system.rs index 22e0bfc..befd4c8 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -377,7 +377,7 @@ impl SystemExt for System { if found && !self.processors.is_empty() { self.refresh_processors(Some(1)); let (new, old) = get_raw...
3
25
2
da13df37c5c372bf831e9bec839b9557e3c45c79
Guillaume Gomez
2020-09-16T09:23:13
Update crate version
diff --git a/Cargo.toml b/Cargo.toml index bd8ee8e..105770a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.1" +version = "0.15.2" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
56675780577d6cde5485f4dd3da4af0ec3baef1a
Andrew
2020-09-14T12:57:39
Fix disk space reporting on macOS Do not multiply two block counts (free and total), but rather the block size and the number of available blocks.
diff --git a/src/mac/disk.rs b/src/mac/disk.rs index 59adf21..e1599fa 100644 --- a/src/mac/disk.rs +++ b/src/mac/disk.rs @@ -184,7 +184,7 @@ fn new_disk(name: OsString, mount_point: &Path, type_: DiskType) -> Option<Disk> let mut stat: statfs = mem::zeroed(); if statfs(mount_point_cpath.as_ptr() as *c...
1
1
1
46c406a5baa01cec694a09b13373467786e3e167
Uri Blumenthal
2020-08-07T19:15:56
Remove older 'CPU' sensor, because it doesn't work on iMac
diff --git a/src/mac/component.rs b/src/mac/component.rs index 383e4f7..bc6a942 100644 --- a/src/mac/component.rs +++ b/src/mac/component.rs @@ -12,7 +12,6 @@ use ComponentExt; pub(crate) const COMPONENTS_TEMPERATURE_IDS: &[(&str, &[i8])] = &[ ("PECI CPU", &['T' as i8, 'C' as i8, 'X' as i8, 'C' as i8]), // PECI C...
1
0
1
04fe5df1dfb6973f56fca1483f71f1c2070700fa
Guillaume Gomez
2020-08-07T08:44:36
Upgrade crate version
diff --git a/Cargo.toml b/Cargo.toml index 9816e5e..bd8ee8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.15.0" +version = "0.15.1" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
9f8ace451433fb74705f99c787af38ad2cf05ec2
Guillaume Gomez
2020-08-07T08:42:35
Add more explanations about "free" vs "available" memory
diff --git a/src/traits.rs b/src/traits.rs index 3d7b548..33fe1cd 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -745,6 +745,12 @@ pub trait SystemExt: Sized + Debug + Default { /// Returns the amount of free RAM in kB. /// + /// Generally, "free" memory refers to unallocated memory whereas "available...
1
12
0
d301e49a505f9d4840d2373f8e2e156a94e805b9
Uri Blumenthal
2020-08-07T03:25:04
Add PECI CPU temperature sensors that provide correct value on iMac and MacBook
diff --git a/src/mac/component.rs b/src/mac/component.rs index 2ac1a61..383e4f7 100644 --- a/src/mac/component.rs +++ b/src/mac/component.rs @@ -10,6 +10,8 @@ use sys::ffi; use ComponentExt; pub(crate) const COMPONENTS_TEMPERATURE_IDS: &[(&str, &[i8])] = &[ + ("PECI CPU", &['T' as i8, 'C' as i8, 'X' as i8, 'C' a...
1
2
0
64ba266f5522b7a85b3089ea77b701f70ec4fb77
Guillaume Gomez
2020-07-23T17:41:04
Upgrade version to 0.15
diff --git a/Cargo.toml b/Cargo.toml index bc3b19e..9816e5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.14.15" +version = "0.15.0" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pr...
1
1
1
7762d6aeaf22782c6b988773bc26cd289a863352
Paho Lurie-Gregg
2020-07-23T03:24:09
Add available memory Generally, "free" memory refers to unallocated memory and "available" memory refers to that that is available for (re)use. Currently, available memory is being reported on Mac and Windows as "free", whereas only free memory is reported on Linux. As Windows does not seem to report free memory, wi...
diff --git a/src/linux/system.rs b/src/linux/system.rs index 703de46..22e0bfc 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -131,6 +131,7 @@ pub struct System { process_list: Process, mem_total: u64, mem_free: u64, + mem_available: u64, mem_buffers: u64, mem_page_cache: u64, ...
5
39
7
ff96195b13181ec0715224816fe6f00f81b2f591
Guillaume Gomez
2020-07-22T11:42:28
Upgrade crate version to 0.14.15
diff --git a/Cargo.toml b/Cargo.toml index 9a5e715..bc3b19e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.14.14" +version = "0.14.15" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, p...
1
1
1
9e4e4b5d0a031d167d1c5727853c8466d34f0b53
Guillaume Gomez
2020-07-22T10:32:14
Add missing cleanup for tasks in linux
diff --git a/src/linux/system.rs b/src/linux/system.rs index e49661b..703de46 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -364,8 +364,8 @@ impl SystemExt for System { self.uptime, get_secs_since_epoch(), ) { - Ok(Some(p)) => { - self.process...
1
18
18
5c89d813ce5cc67e6f5eb08c1e688dbe65ef08e4
Guillaume Gomez
2020-07-20T11:22:07
Upgrade crate version to 0.14.14
diff --git a/Cargo.toml b/Cargo.toml index 00b9290..9a5e715 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.14.13" +version = "0.14.14" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, p...
1
1
1
8ca74895b7f259467a78a30264c25462e0e0657a
Guillaume Gomez
2020-07-20T11:21:40
Simplify Path handling a bit on linux
diff --git a/src/linux/system.rs b/src/linux/system.rs index 136f5ee..e49661b 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -344,7 +344,7 @@ impl SystemExt for System { self.uptime = get_uptime(); if refresh_procs( &mut self.process_list, - "/proc", + ...
1
5
5
72e7b0d4393a9f38381854c37b9f7ecfdcb680e8
ThoFrank
2020-07-17T21:23:48
improved naming and description for mac/component.rs
diff --git a/src/mac/component.rs b/src/mac/component.rs index 45c3c5c..1a33c47 100644 --- a/src/mac/component.rs +++ b/src/mac/component.rs @@ -10,8 +10,8 @@ use sys::ffi; use ComponentExt; pub(crate) const COMPONENTS_TEMPERATURE_IDS: &[(&str, &[i8])] = &[ - ("CPU Die", &['T' as i8, 'C' as i8, '0' as i8, 'F' as...
1
2
2
06590d0e9f308b830ab0e13c2c6282f9d80495f3
Thomas Frank
2020-07-17T07:55:27
Renamed CPU proximity temp and added cpu die temp Source: https://github.com/beltex/SMCKit/blob/master/SMCKit/SMC.swift
diff --git a/src/mac/component.rs b/src/mac/component.rs index 56db664..45c3c5c 100644 --- a/src/mac/component.rs +++ b/src/mac/component.rs @@ -10,7 +10,8 @@ use sys::ffi; use ComponentExt; pub(crate) const COMPONENTS_TEMPERATURE_IDS: &[(&str, &[i8])] = &[ - ("CPU", &['T' as i8, 'C' as i8, '0' as i8, 'P' as i8]...
1
2
1
23f1dde4eeaf7fd184aa2d2a9af9f1fd36ba8978
Guillaume Gomez
2020-07-11T15:15:06
Update crate version
diff --git a/Cargo.toml b/Cargo.toml index 364bb3b..00b9290 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.14.12" +version = "0.14.13" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, p...
1
1
1