pub struct Shm {}Expand description
A shared memory segment parsed from /proc/sysvipc/shm
Relation with [crate::process::process::MMapPath::Vsys]
Fields§
§key: i32Segment key
shmid: u64Segment ID, unique
perms: u16Access permissions, as octal
size: u32Size in bytes
cpid: i32Creator PID
lpid: i32Last operator PID
nattch: u32Number of attached processes
uid: u16User ID
gid: u16Group ID
cuid: u16Creator UID
cgid: u16Creator GID
atime: u64Time of last shmat (attach), epoch
dtime: u64Time of last shmdt (detach), epoch
ctime: u64Time of last permission change, epoch
rss: u64Current part of the shared memory resident in memory
swap: u64Current part of the shared memory in SWAP
Implementations§
source§impl Shm
impl Shm
sourcepub fn new() -> ProcResult<Vec<Shm>>
pub fn new() -> ProcResult<Vec<Shm>>
Reads and parses the /proc/sysvipc/shm, returning an error if there are problems.
sourcepub fn from_reader<R: Read>(r: R) -> ProcResult<Vec<Shm>>
pub fn from_reader<R: Read>(r: R) -> ProcResult<Vec<Shm>>
Get Meminfo from a custom Read instead of the default /proc/sysvipc/shm.