Crate procfs_core

Source
Expand description

This crate provides to an interface into the linux procfs filesystem, usually mounted at /proc.

This is a pseudo-filesystem which is available on most every linux system and provides an interface to kernel data structures.

§procfs-core

The procfs-core crate is a fully platform-independent crate that contains most of the data-structures and parsing code. Most people should first look at the procfs crate instead.

Re-exports§

pub use sys::kernel::Version as KernelVersion;

Modules§

keyring
Functions related to the in-kernel key management and retention facility
net
Information about the networking layer.
prelude
Extension traits useful for importing wholesale.
process
Functions and structs related to process information
sys
Sysctl is a means of configuring certain aspects of the kernel at run-time, and the /proc/sys/ directory is there so that you don’t even need special tools to do it!

Structs§

Aead
Ahash
BlockDeviceEntry
A block device entry under /proc/devices
CGroupController
Container group controller information.
CGroupControllers
Container group controller information.
CharDeviceEntry
A charcter device entry under /proc/devices
Cipher
CpuInfo
Represents the data from /proc/cpuinfo.
CpuPressure
CPU pressure information
CpuTime
The amount of time, measured in ticks, the CPU has been in specific states
CryptoBlock
Format of a crypto implementation represented in /proc/crypto.
CryptoTable
Represents the data from /proc/crypto.
Devices
Device entries under /proc/devices
DiskStat
Disk IO stat information
DiskStats
A list of disk stats.
ExplicitSystemInfo
A convenience stuct implementing SystemInfoInterface with explicitly-specified values.
InternalError
An internal error in the procfs crate
IoPressure
IO pressure information
Iomem
KernelCmdline
A list of the arguments passed to the Linux kernel at boot time.
KernelConfig
The kernel configuration.
KernelModule
Details about a loaded kernel module
KernelModules
A set of loaded kernel modules
KernelStats
Kernel/system statistics, from /proc/stat
Larval
LoadAverage
Load average figures.
Lock
Details about an individual file lock
Locks
Details about file locks
Meminfo
This struct reports statistics about memory usage on the system, based on the /proc/meminfo file.
MemoryPressure
Memory pressure information
MountEntry
A mountpoint entry under /proc/mounts
PartitionEntry
A partition entry under /proc/partitions
PhysicalMemoryMap
PhysicalPageFlags
Represents the fields and flags in a page table entry for a memory page.
PressureRecord
Pressure stall information for either CPU, memory, or IO.
ProcessCGroup
Information about a process cgroup
ProcessCGroups
Information about process cgroups.
Rng
SharedMemorySegments
A set of shared memory segments parsed from /proc/sysvipc/shm
Shash
Shm
A shared memory segment parsed from /proc/sysvipc/shm Relation with crate::process::MMapPath::Vsys
Skcipher
Unknown
Uptime
The uptime of the system, based on the /proc/uptime file.
VmStat
Various virtual memory statistics

Enums§

ConfigSetting
Possible values for a kernel config option
LockKind
The kind of a lock (read or write)
LockMode
The mode of a lock (advisory or mandatory)
LockType
The type of a file lock
ProcError
The various error conditions in the procfs crate.
SelfTest
Potential results for selftest.
Type
Enumeration of potential types and their associated data. Unknown at end to catch unrecognised types.

Traits§

FromBufRead
Types which can be parsed from a BufRead implementation.
FromBufReadSI
Types which can be parsed from a BufRead implementation and system info.
FromRead
Types which can be parsed from a Read implementation.
FromReadSI
Types which can be parsed from a Read implementation and system info.
FromStrRadix
ProcErrorExt
Extensions for dealing with ProcErrors.
SystemInfoInterface
Auxiliary system information interface.
WithSystemInfo
Values which can provide an output given the SystemInfo.

Type Aliases§

ProcResult
The main error type for the procfs crate.
SystemInfo
Auxiliary system information.