pub struct Psi {
pub cpu: PsiResource,
pub memory: PsiResource,
pub io: PsiResource,
pub irq: PsiResource,
}Expand description
Host pressure stall information.
§Why this exists on top of CPU% and load average
Neither of those answers “is the machine actually struggling”. A box at 90 %
CPU with nothing waiting is busy but healthy; a box at 30 % CPU with an io
full average of 40 % is making every process wait on the disk, and both
CPU% and load average look unremarkable while it happens. PSI is the kernel’s
own answer to “how much time did work actually lose”, and it is the one
number that distinguishes the two cases.
Fields§
§cpu: PsiResource§memory: PsiResource§io: PsiResource§irq: PsiResourceImplementations§
Source§impl Psi
impl Psi
Sourcepub fn any_present(&self) -> bool
pub fn any_present(&self) -> bool
Whether any resource was readable. A Psi where nothing is present is
worse than None: it draws three empty bars that look like an idle
machine instead of an absent feature.
Sourcepub fn rows(&self) -> [(&'static str, PsiResource); 4]
pub fn rows(&self) -> [(&'static str, PsiResource); 4]
The resources in display order, with their labels.
Trait Implementations§
impl Copy for Psi
impl StructuralPartialEq for Psi
Auto Trait Implementations§
impl Freeze for Psi
impl RefUnwindSafe for Psi
impl Send for Psi
impl Sync for Psi
impl Unpin for Psi
impl UnsafeUnpin for Psi
impl UnwindSafe for Psi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more