Crate procfs[−][src]
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.
Kernel support
Not all fields/data are available in each kernel. Some fields were added in specific kernel
releases, and other fields are only present in certain kernel configuration options are
enabled. These are represented as Option
fields in this crate.
This crate aims to support all 2.6 kernels
Documentation
In almost all cases, the documentation is taken from the
proc.5
manual page. This means that
sometimes the style of writing is not very "rusty", or may do things like reference related files
(instead of referencing related structs). Contributions to improve this are welcome.
Panicing
This crate is not panic-free. It will panic if it encounters data in some unexpected format; this represents a bug in this crate, and should be reported.
Structs
BOOTTIME |
The boottime of the system. |
Io |
This struct contains I/O statistics for the process, built from |
KERNEL |
The version of the currently running kernel. |
KernelVersion |
Represents a kernel version, in major.minor.release version. |
LoadAverage |
Load average figures. |
Meminfo |
This struct reports statistics about memory usage on the system, based on
the |
MemoryMap |
Represents an entry in a |
PAGESIZE |
Memory page size, in bytes. |
Process |
Represents a process in |
Stat |
Status information about the process, based on the |
StatFlags | |
TICKS_PER_SECOND |
The number of clock ticks per second. |
TcpNetEntry |
An entry in the TCP socket table |
Enums
MMapPath | |
ProcResult |
Common result type of procfs operations. |
ProcState |
Represents the state of a process. |
TcpState |
Functions
all_processes | |
tcp |
Reads the tcp socket table |
tcp6 |
Reads the tcp6 socket table |