Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/GuillaumeGomez/sysinfo
/ functions
Functions
1,805 in github.com/GuillaumeGomez/sysinfo
⨍
Functions
1,805
◇
Types & classes
230
↓ 55 callers
Method
len
(&self)
src/unix/linux/cpu.rs:198
↓ 53 callers
Method
iter
(&self)
src/unix/network_helper.rs:41
↓ 43 callers
Method
is_empty
(&self)
src/unix/linux/cpu.rs:202
↓ 31 callers
Method
next
(&mut self)
src/unix/linux/gpu.rs:234
↓ 29 callers
Method
refresh_processes
Gets all processes and updates their information, along with all the tasks each process has. It does the same as: ```no_run # use sysinfo::{Processe
src/common/system.rs:316
↓ 24 callers
Method
iter_mut
This function is voluntarily made generic in case we want to generalize it.
src/unix/linux/cpu.rs:171
↓ 24 callers
Method
len
(&mut self)
src/windows/cpu.rs:261
↓ 21 callers
Method
get
(&self, name: &str)
src/windows/cpu.rs:106
↓ 21 callers
Method
iter
(&'a self, buf: &'a mut Vec<u8>)
src/unix/linux/process.rs:528
↓ 20 callers
Method
process
Returns the process corresponding to the given `pid` or `None` if no such process exists. ```no_run use sysinfo::{Pid, System}; if let Ok(s) = Syste
src/common/system.rs:505
↓ 19 callers
Method
get
(&self)
src/unix/linux/process.rs:965
↓ 17 callers
Method
get_mut
(&mut self)
src/unix/bsd/freebsd/cpu.rs:188
↓ 17 callers
Method
refresh
Refreshes the list of GPUs. ```no_run use sysinfo::Gpus; if let Ok(mut gpus) = Gpus::new_with_refreshed_list() { // Wait some time...? Then refresh
src/common/gpu.rs:75
↓ 17 callers
Method
refresh_processes_specifics
Gets all processes and updates the specified information. Returns the number of updated processes. ⚠️ `remove_dead_processes` works as follows: if a
src/common/system.rs:352
↓ 16 callers
Method
needs_update
Needed for unsupported targets.
src/common/system.rs:2514
↓ 16 callers
Method
processes
Returns the process list. ```no_run use sysinfo::System; if let Ok(s) = System::new_all() { for (pid, process) in s.processes() { println!("{} {:?}"
src/common/system.rs:490
↓ 15 callers
Method
id
(&self)
src/unix/users.rs:28
↓ 13 callers
Function
get_current_pid
()
src/common/system.rs:2954
↓ 12 callers
Function
get_kenv_var
Get the value of a kernel environment variable.
src/unix/bsd/freebsd/utils.rs:265
↓ 12 callers
Method
kill
Sends [`Signal::Kill`] to the process (which is the only signal supported on all supported platforms by this crate). Returns `true` if the signal was
src/common/system.rs:1649
↓ 11 callers
Function
get_sys_value_str_by_name
(name: &[u8])
src/unix/bsd/netbsd/utils.rs:171
↓ 11 callers
Method
wait
Waits for process termination and returns its [`ExitStatus`] if it could be retrieved, returns `None` otherwise. It means that as long as the process
src/common/system.rs:1767
↓ 10 callers
Function
get_all_utf8_data
(file_path: P, size: usize)
src/unix/linux/utils.rs:41
↓ 10 callers
Function
init_mib
(name: &[u8], mib: &mut [libc::c_int])
src/unix/bsd/common.rs:5
↓ 10 callers
Method
iter
(&mut self)
src/unix/bsd/freebsd/disk.rs:536
↓ 10 callers
Method
iter_mut
(&mut self, refresh_kind: CpuRefreshKind)
src/windows/cpu.rs:266
↓ 10 callers
Function
read_dir
(dir: P, callback: &mut F)
tests/code_checkers/utils.rs:25
↓ 9 callers
Method
into_iter
(self)
src/common/gpu.rs:105
↓ 8 callers
Method
cpus
(&self)
src/windows/cpu.rs:251
↓ 8 callers
Method
refresh_from_sys_class_path
(&mut self, path: &Path)
src/unix/linux/component.rs:431
↓ 7 callers
Function
boot_time
()
src/unix/bsd/common.rs:13
↓ 7 callers
Function
get_sys_value
Reads a sysctl value of exactly `size_of::<T>()` bytes. Panics if the kernel hands back a value of another size: a narrower one would otherwise land
src/unix/bsd/freebsd/utils.rs:13
↓ 7 callers
Function
get_sys_value_by_name
(name: &[u8], value: &mut T)
src/unix/bsd/freebsd/utils.rs:133
↓ 7 callers
Method
inner
(&self)
src/unix/apple/macos/component/x86.rs:311
↓ 7 callers
Function
parse_cgroup_mounts
(content: &str)
src/unix/linux/cgroup.rs:366
↓ 7 callers
Function
parse_cgroup_path
(content: &str)
src/unix/linux/cgroup.rs:398
↓ 7 callers
Method
refresh_all
Refreshes all system and processes information. It is the same as calling `system.refresh_specifics(RefreshKind::everything())`. Don't forget to tak
src/common/system.rs:140
↓ 6 callers
Function
get_sys_value_by_name
(name: &[u8], value: &mut T)
src/unix/bsd/netbsd/utils.rs:154
↓ 6 callers
Function
limits_for_process_with_context
( cgroup_path: &CGroupPath, cgroup_mounts: &CGroupMounts, context: CGroupLimitsContext, )
src/unix/linux/cgroup.rs:78
↓ 6 callers
Method
parent
(&self)
src/unix/linux/process.rs:234
↓ 6 callers
Function
parse_stat_file
(data: &[u8], start_time_raw: Option<u64>)
src/unix/linux/process.rs:1704
↓ 6 callers
Method
refresh_cpu_usage
Refreshes CPUs usage. ⚠️ Please note that the result will very likely be inaccurate at the first call. You need to call this method at least twice (w
src/common/system.rs:196
↓ 6 callers
Function
round_trip
(value: T)
src/serde.rs:644
↓ 6 callers
Function
show_error
(p: &Path, err: &str)
tests/code_checkers/utils.rs:56
↓ 5 callers
Method
gpu_memory
(&self)
src/unix/linux/process.rs:368
↓ 5 callers
Method
gpu_usage
(&self)
src/unix/linux/process.rs:363
↓ 5 callers
Method
list
(&self)
src/windows/disk.rs:270
↓ 5 callers
Method
name
(&self)
src/unix/users.rs:36
↓ 5 callers
Method
next
(&mut self)
src/unix/linux/process.rs:562
↓ 5 callers
Method
refresh_cpu_specifics
Refreshes CPUs specific information. It does not refresh the CPU list. If you want to refresh the CPU list, use [`System::refresh_cpu_list`] instead.
src/common/system.rs:274
↓ 5 callers
Method
refresh_memory
Refreshes RAM and SWAP usage. It is the same as calling `system.refresh_memory_specifics(MemoryRefreshKind::everything())`. If you don't want to ref
src/common/system.rs:157
↓ 5 callers
Function
refresh_networks_addresses
Interface addresses are OS-independent
src/network.rs:9
↓ 5 callers
Function
to_utf8_str
(p: windows::core::PWSTR)
src/windows/utils.rs:9
↓ 5 callers
Function
v2_limits
( base: &Path, root: &Path, context: CGroupLimitsContext, )
src/unix/linux/cgroup.rs:139
↓ 4 callers
Function
build_test_binary
(file_name: &str)
tests/process.rs:89
↓ 4 callers
Method
frequency
(&self)
src/windows/cpu.rs:308
↓ 4 callers
Method
get_handle
(&self)
src/windows/process.rs:403
↓ 4 callers
Function
get_int_value
(dict: &CFDictionary, key: Option<&CFString>)
src/unix/apple/disk.rs:433
↓ 4 callers
Function
get_reg_string_value
(hkey: HKEY, path: &str, field_name: &str)
src/windows/system.rs:614
↓ 4 callers
Function
get_sys_value
(mib: &[libc::c_int], value: &mut T)
src/unix/bsd/netbsd/utils.rs:9
↓ 4 callers
Function
get_system_info
(mib: &[c_int])
src/unix/bsd/freebsd/system.rs:718
↓ 4 callers
Function
get_system_info
(mib: &[c_int])
src/unix/bsd/netbsd/system.rs:467
↓ 4 callers
Function
get_system_info_android
(info: InfoType)
src/unix/linux/system.rs:677
↓ 4 callers
Function
get_system_info_linux
(info: InfoType, path: &Path, fallback_path: &Path)
src/unix/linux/system.rs:614
↓ 4 callers
Method
is_empty
(&self)
src/unix/linux/cgroup.rs:24
↓ 4 callers
Method
list_mut
(&mut self)
src/windows/disk.rs:274
↓ 4 callers
Function
refresh_networks_list_from_sysfs
( interfaces: &mut HashMap<OsString, NetworkData>, remove_not_listed_interfaces: bool, sysfs_net:
src/unix/linux/network.rs:95
↓ 4 callers
Method
tasks
Tasks run by this process. If there are none, returns `None`. ⚠️ This method always returns `None` on other platforms than Linux. ```no_run use sysi
src/common/system.rs:2246
↓ 4 callers
Method
usage
Returns the % usage of this GPU. On Linux, it's generally very tricky to get this information, as such, only some GPUs like NVIDIA's or AMD's provide
src/common/gpu.rs:267
↓ 4 callers
Function
v1_limits
( base: &Path, root: &Path, context: CGroupLimitsContext, )
src/unix/linux/cgroup.rs:170
↓ 4 callers
Function
write_memory_cgroup
(path: &Path, v1: bool, limit: &str)
src/unix/linux/cgroup.rs:971
↓ 3 callers
Function
c_buf_to_os_string
(buf: &[libc::c_char])
src/unix/bsd/freebsd/utils.rs:81
↓ 3 callers
Function
c_buf_to_utf8_str
(buf: &[libc::c_char])
src/unix/bsd/freebsd/utils.rs:49
↓ 3 callers
Function
c_buf_to_utf8_string
(buf: &[libc::c_char])
src/unix/bsd/freebsd/utils.rs:63
↓ 3 callers
Function
c_buf_to_utf8_string
(buf: &[libc::c_char])
src/unix/bsd/netbsd/utils.rs:53
↓ 3 callers
Method
cpu_usage
(&self)
src/windows/cpu.rs:300
↓ 3 callers
Function
disk_stats_inner
We split this function out to make it possible to test it.
src/unix/linux/disk.rs:501
↓ 3 callers
Method
efficient_refresh
( &mut self, refresh_kind: DiskRefreshKind, procfs_disk_stats: &HashMap<String, DiskSt
src/unix/linux/disk.rs:119
↓ 3 callers
Method
exists
(&self)
src/unix/linux/process.rs:321
↓ 3 callers
Function
get_dict_value
( dict: &CFDictionary, key: Option<&CFString>, callback: F, )
src/unix/apple/disk.rs:401
↓ 3 callers
Function
get_file_line
Read arbitrary data from sysfs.
src/unix/linux/component.rs:135
↓ 3 callers
Method
get_mut
(&mut self)
src/unix/bsd/netbsd/cpu.rs:222
↓ 3 callers
Function
get_sys_value
( mut len: usize, value: *mut libc::c_void, mib: &mut [i32], )
src/unix/apple/utils.rs:4
↓ 3 callers
Function
get_sys_value_by_name
( name: &[u8], len: &mut usize, value: *mut libc::c_void, )
src/unix/apple/utils.rs:22
↓ 3 callers
Function
get_system_info
(value: c_int)
src/unix/apple/system.rs:582
↓ 3 callers
Function
get_vendor_id_and_brand_inner
(data: &str)
src/unix/linux/cpu.rs:828
↓ 3 callers
Function
gpu_vendor_name
(vendor_id: u32)
src/utils.rs:75
↓ 3 callers
Method
init_if_needed
(&mut self, refresh_kind: CpuRefreshKind)
src/windows/cpu.rs:255
↓ 3 callers
Function
ip_mask_to_prefix
(mask: IpAddr)
src/unix/network_helper.rs:270
↓ 3 callers
Function
ipv4_mask_to_prefix
(mask: Ipv4Addr)
src/unix/network_helper.rs:277
↓ 3 callers
Method
kill_with
Sends the given `signal` to the process. If the signal doesn't exist on this platform, it'll do nothing and will return `None`. Otherwise it'll return
src/common/system.rs:1678
↓ 3 callers
Method
memory
Returns the memory usage (in bytes). This method returns the [size of the resident set], that is, the amount of memory that the process allocated and
src/common/system.rs:1947
↓ 3 callers
Method
next
(&mut self)
src/windows/network_helper.rs:53
↓ 3 callers
Method
parent
Returns the parent PID. ```no_run use sysinfo::{Pid, System}; if let Ok(s) = System::new_all() && let Some(process) = s.process(Pid::from(1337)) { p
src/common/system.rs:1991
↓ 3 callers
Method
pci
Returns the PCI of this GPU. Can be used as ID as it's unique to this GPU. Returns an invalid PCI Address, `ffffffff:ff:ff.255`, for Apple M Series G
src/common/gpu.rs:243
↓ 3 callers
Function
print_process
examples/simple.c:10
↓ 3 callers
Function
read
(parent: P, path: &str, data: &mut [u8])
src/unix/linux/network.rs:24
↓ 3 callers
Method
read_into
Reads the whole content of `name` into `buf`, replacing its previous content. Returns `false` if an error occurred.
src/unix/linux/process.rs:913
↓ 3 callers
Function
read_u64
(filename: &Path)
src/unix/linux/cgroup.rs:276
↓ 3 callers
Method
refresh_cpu_all
Refreshes all information related to CPUs information. It does not refresh the CPU list. If you want to refresh the CPU list, use [`System::refresh_cp
src/common/system.rs:260
next →
1–100 of 1,805, ranked by callers