MCPcopy Create free account

hub / github.com/GuillaumeGomez/sysinfo / functions

Functions1,805 in github.com/GuillaumeGomez/sysinfo

↓ 55 callersMethodlen
(&self)
src/unix/linux/cpu.rs:198
↓ 53 callersMethoditer
(&self)
src/unix/network_helper.rs:41
↓ 43 callersMethodis_empty
(&self)
src/unix/linux/cpu.rs:202
↓ 31 callersMethodnext
(&mut self)
src/unix/linux/gpu.rs:234
↓ 29 callersMethodrefresh_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 callersMethoditer_mut
This function is voluntarily made generic in case we want to generalize it.
src/unix/linux/cpu.rs:171
↓ 24 callersMethodlen
(&mut self)
src/windows/cpu.rs:261
↓ 21 callersMethodget
(&self, name: &str)
src/windows/cpu.rs:106
↓ 21 callersMethoditer
(&'a self, buf: &'a mut Vec<u8>)
src/unix/linux/process.rs:528
↓ 20 callersMethodprocess
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 callersMethodget
(&self)
src/unix/linux/process.rs:965
↓ 17 callersMethodget_mut
(&mut self)
src/unix/bsd/freebsd/cpu.rs:188
↓ 17 callersMethodrefresh
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 callersMethodrefresh_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 callersMethodneeds_update
Needed for unsupported targets.
src/common/system.rs:2514
↓ 16 callersMethodprocesses
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 callersMethodid
(&self)
src/unix/users.rs:28
↓ 13 callersFunctionget_current_pid
()
src/common/system.rs:2954
↓ 12 callersFunctionget_kenv_var
Get the value of a kernel environment variable.
src/unix/bsd/freebsd/utils.rs:265
↓ 12 callersMethodkill
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 callersFunctionget_sys_value_str_by_name
(name: &[u8])
src/unix/bsd/netbsd/utils.rs:171
↓ 11 callersMethodwait
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 callersFunctionget_all_utf8_data
(file_path: P, size: usize)
src/unix/linux/utils.rs:41
↓ 10 callersFunctioninit_mib
(name: &[u8], mib: &mut [libc::c_int])
src/unix/bsd/common.rs:5
↓ 10 callersMethoditer
(&mut self)
src/unix/bsd/freebsd/disk.rs:536
↓ 10 callersMethoditer_mut
(&mut self, refresh_kind: CpuRefreshKind)
src/windows/cpu.rs:266
↓ 10 callersFunctionread_dir
(dir: P, callback: &mut F)
tests/code_checkers/utils.rs:25
↓ 9 callersMethodinto_iter
(self)
src/common/gpu.rs:105
↓ 8 callersMethodcpus
(&self)
src/windows/cpu.rs:251
↓ 8 callersMethodrefresh_from_sys_class_path
(&mut self, path: &Path)
src/unix/linux/component.rs:431
↓ 7 callersFunctionboot_time
()
src/unix/bsd/common.rs:13
↓ 7 callersFunctionget_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 callersFunctionget_sys_value_by_name
(name: &[u8], value: &mut T)
src/unix/bsd/freebsd/utils.rs:133
↓ 7 callersMethodinner
(&self)
src/unix/apple/macos/component/x86.rs:311
↓ 7 callersFunctionparse_cgroup_mounts
(content: &str)
src/unix/linux/cgroup.rs:366
↓ 7 callersFunctionparse_cgroup_path
(content: &str)
src/unix/linux/cgroup.rs:398
↓ 7 callersMethodrefresh_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 callersFunctionget_sys_value_by_name
(name: &[u8], value: &mut T)
src/unix/bsd/netbsd/utils.rs:154
↓ 6 callersFunctionlimits_for_process_with_context
( cgroup_path: &CGroupPath, cgroup_mounts: &CGroupMounts, context: CGroupLimitsContext, )
src/unix/linux/cgroup.rs:78
↓ 6 callersMethodparent
(&self)
src/unix/linux/process.rs:234
↓ 6 callersFunctionparse_stat_file
(data: &[u8], start_time_raw: Option<u64>)
src/unix/linux/process.rs:1704
↓ 6 callersMethodrefresh_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 callersFunctionround_trip
(value: T)
src/serde.rs:644
↓ 6 callersFunctionshow_error
(p: &Path, err: &str)
tests/code_checkers/utils.rs:56
↓ 5 callersMethodgpu_memory
(&self)
src/unix/linux/process.rs:368
↓ 5 callersMethodgpu_usage
(&self)
src/unix/linux/process.rs:363
↓ 5 callersMethodlist
(&self)
src/windows/disk.rs:270
↓ 5 callersMethodname
(&self)
src/unix/users.rs:36
↓ 5 callersMethodnext
(&mut self)
src/unix/linux/process.rs:562
↓ 5 callersMethodrefresh_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 callersMethodrefresh_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 callersFunctionrefresh_networks_addresses
Interface addresses are OS-independent
src/network.rs:9
↓ 5 callersFunctionto_utf8_str
(p: windows::core::PWSTR)
src/windows/utils.rs:9
↓ 5 callersFunctionv2_limits
( base: &Path, root: &Path, context: CGroupLimitsContext, )
src/unix/linux/cgroup.rs:139
↓ 4 callersFunctionbuild_test_binary
(file_name: &str)
tests/process.rs:89
↓ 4 callersMethodfrequency
(&self)
src/windows/cpu.rs:308
↓ 4 callersMethodget_handle
(&self)
src/windows/process.rs:403
↓ 4 callersFunctionget_int_value
(dict: &CFDictionary, key: Option<&CFString>)
src/unix/apple/disk.rs:433
↓ 4 callersFunctionget_reg_string_value
(hkey: HKEY, path: &str, field_name: &str)
src/windows/system.rs:614
↓ 4 callersFunctionget_sys_value
(mib: &[libc::c_int], value: &mut T)
src/unix/bsd/netbsd/utils.rs:9
↓ 4 callersFunctionget_system_info
(mib: &[c_int])
src/unix/bsd/freebsd/system.rs:718
↓ 4 callersFunctionget_system_info
(mib: &[c_int])
src/unix/bsd/netbsd/system.rs:467
↓ 4 callersFunctionget_system_info_android
(info: InfoType)
src/unix/linux/system.rs:677
↓ 4 callersFunctionget_system_info_linux
(info: InfoType, path: &Path, fallback_path: &Path)
src/unix/linux/system.rs:614
↓ 4 callersMethodis_empty
(&self)
src/unix/linux/cgroup.rs:24
↓ 4 callersMethodlist_mut
(&mut self)
src/windows/disk.rs:274
↓ 4 callersFunctionrefresh_networks_list_from_sysfs
( interfaces: &mut HashMap<OsString, NetworkData>, remove_not_listed_interfaces: bool, sysfs_net:
src/unix/linux/network.rs:95
↓ 4 callersMethodtasks
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 callersMethodusage
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 callersFunctionv1_limits
( base: &Path, root: &Path, context: CGroupLimitsContext, )
src/unix/linux/cgroup.rs:170
↓ 4 callersFunctionwrite_memory_cgroup
(path: &Path, v1: bool, limit: &str)
src/unix/linux/cgroup.rs:971
↓ 3 callersFunctionc_buf_to_os_string
(buf: &[libc::c_char])
src/unix/bsd/freebsd/utils.rs:81
↓ 3 callersFunctionc_buf_to_utf8_str
(buf: &[libc::c_char])
src/unix/bsd/freebsd/utils.rs:49
↓ 3 callersFunctionc_buf_to_utf8_string
(buf: &[libc::c_char])
src/unix/bsd/freebsd/utils.rs:63
↓ 3 callersFunctionc_buf_to_utf8_string
(buf: &[libc::c_char])
src/unix/bsd/netbsd/utils.rs:53
↓ 3 callersMethodcpu_usage
(&self)
src/windows/cpu.rs:300
↓ 3 callersFunctiondisk_stats_inner
We split this function out to make it possible to test it.
src/unix/linux/disk.rs:501
↓ 3 callersMethodefficient_refresh
( &mut self, refresh_kind: DiskRefreshKind, procfs_disk_stats: &HashMap<String, DiskSt
src/unix/linux/disk.rs:119
↓ 3 callersMethodexists
(&self)
src/unix/linux/process.rs:321
↓ 3 callersFunctionget_dict_value
( dict: &CFDictionary, key: Option<&CFString>, callback: F, )
src/unix/apple/disk.rs:401
↓ 3 callersFunctionget_file_line
Read arbitrary data from sysfs.
src/unix/linux/component.rs:135
↓ 3 callersMethodget_mut
(&mut self)
src/unix/bsd/netbsd/cpu.rs:222
↓ 3 callersFunctionget_sys_value
( mut len: usize, value: *mut libc::c_void, mib: &mut [i32], )
src/unix/apple/utils.rs:4
↓ 3 callersFunctionget_sys_value_by_name
( name: &[u8], len: &mut usize, value: *mut libc::c_void, )
src/unix/apple/utils.rs:22
↓ 3 callersFunctionget_system_info
(value: c_int)
src/unix/apple/system.rs:582
↓ 3 callersFunctionget_vendor_id_and_brand_inner
(data: &str)
src/unix/linux/cpu.rs:828
↓ 3 callersFunctiongpu_vendor_name
(vendor_id: u32)
src/utils.rs:75
↓ 3 callersMethodinit_if_needed
(&mut self, refresh_kind: CpuRefreshKind)
src/windows/cpu.rs:255
↓ 3 callersFunctionip_mask_to_prefix
(mask: IpAddr)
src/unix/network_helper.rs:270
↓ 3 callersFunctionipv4_mask_to_prefix
(mask: Ipv4Addr)
src/unix/network_helper.rs:277
↓ 3 callersMethodkill_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 callersMethodmemory
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 callersMethodnext
(&mut self)
src/windows/network_helper.rs:53
↓ 3 callersMethodparent
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 callersMethodpci
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 callersFunctionprint_process
examples/simple.c:10
↓ 3 callersFunctionread
(parent: P, path: &str, data: &mut [u8])
src/unix/linux/network.rs:24
↓ 3 callersMethodread_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 callersFunctionread_u64
(filename: &Path)
src/unix/linux/cgroup.rs:276
↓ 3 callersMethodrefresh_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