pub struct PsiLine {
pub avg10: f32,
pub avg60: f32,
pub avg300: f32,
pub total_us: u64,
}Expand description
One PSI resource’s some and full averages.
/proc/pressure/<resource> reports two lines:
some avg10=0.00 avg60=0.00 avg300=0.00 total=0
full avg10=0.00 avg60=0.00 avg300=0.00 total=0some is the share of wall time during which at least one task was
stalled; full is the share during which every runnable task was stalled,
i.e. the machine genuinely had nothing to run.
All four resources report both lines, cpu included. An earlier revision
of this comment claimed cpu had no full line — that is wrong, and checking
a real /proc/pressure/cpu (Linux 6.x) shows both. The two lines mean slightly
different things for cpu (a task runnable-but-not-running is some; the
whole CPU idle while tasks wait is full), which is exactly why the kernel
reports both. Code here must not assume has_full is false for any resource.
Fields§
§avg10: f32Percentage of wall time stalled, averaged over 10 s.
avg60: f32Percentage of wall time stalled, averaged over 60 s.
avg300: f32Percentage of wall time stalled, averaged over 300 s.
total_us: u64Total microseconds stalled since boot. Cumulative, so it can be used for a rate the same way the network counters are.
Trait Implementations§
impl Copy for PsiLine
impl StructuralPartialEq for PsiLine
Auto Trait Implementations§
impl Freeze for PsiLine
impl RefUnwindSafe for PsiLine
impl Send for PsiLine
impl Sync for PsiLine
impl Unpin for PsiLine
impl UnsafeUnpin for PsiLine
impl UnwindSafe for PsiLine
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
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> ⓘ
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> ⓘ
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