Skip to main content

Module sys

Module sys 

Source
Expand description

Operating-system resource and platform-integration utilities.

Submodules expose compute, resource-limit, storage, and usage information. Top-level helpers normalize executable paths, parse device metadata, and classify socket file descriptors on Unix.

Re-exportsยง

use std::os::fd::AsFd; ๐Ÿ”’
use std::env::vars_os; ๐Ÿ”’
use std::path::PathBuf; ๐Ÿ”’
use std::process::Command; ๐Ÿ”’
use nix::errno::Errno; ๐Ÿ”’
use nix::sys::socket::getsockopt; ๐Ÿ”’
use nix::sys::socket::sockopt::Ipv6V6Only; ๐Ÿ”’
pub use self::compute::available_parallelism;
pub use self::usage::Usage;
pub use self::usage::statm;
pub use self::usage::thread_usage;
pub use self::usage::usage;
use crate::Result; ๐Ÿ”’
use crate::at; ๐Ÿ”’
pub use self::limits::*;

Modulesยง

compute
CPU topology, affinity, and parallelism utilities.
limits
Process resource-limit utilities.
storage
Block-device, filesystem, and queue-discovery utilities.
usage
Process and thread resource-usage utilities.

Enumsยง

SocketFamily
Classifies the socket address families recognized by the server.

Functionsยง

command_without_env_prefixes
Removes inherited environment names matching any supplied prefix from a command.
current_exe
Returns the current executable path without a trailing deletion marker.
current_exe_deleted
Reports whether the current executable path carries a deletion marker.
get_socket_family
Determines the address family of an open socket file descriptor on Unix.
is_ipv6_only
Whether an IPv6 socket serves IPv6 traffic alone.
uevent_find
Searches newline-delimited KEY=VALUE text for a key.