sinf 0.1.0

Library for obtaining in-depth system information at both the hardware and software levels
Documentation
use std::ffi::OsString;
use std::path::PathBuf;

use crate::{Gid, Pid, ProcessStatus, Signal, Uid};

use crate::sys::process::ThreadStatus;

pub(crate) struct ProcessInner {
    pub(crate) name: OsString,
    pub(crate) cmd: Vec<OsString>,
    pub(crate) exe: Option<PathBuf>,
    pid: Pid,
    parent: Option<Pid>,
    pub(crate) environ: Vec<OsString>,
    cwd: Option<PathBuf>,
    pub(crate) root: Option<PathBuf>,
    pub(crate) memory: u64,
    pub(crate) virtual_memory: u64,
    old_utime: u64,
    old_stime: u64,
    start_time: u64,
    run_time: u64,
    pub(crate) updated: bool,
    cpu_usage: f32,
    user_id: Option<Uid>,
    effective_user_id: Option<Uid>,
    group_id: Option<Gid>,
    effective_group_id: Option<Gid>,
    pub(crate) process_status: ProcessStatus,
    /// Status of the process (running, stopped, waiting, etc.).
    pub(crate) status: Option<ThreadStatus>,
    pub(crate) old_read_bytes: u64,
    pub(crate) old_written_bytes: u64,
    pub(crate) read_bytes: u64,
    pub(crate) written_bytes: u64,
    accumulated_cpu_time: u64,
    exists: bool,
    #[cfg(feature = "gpu")]
    pub(crate) gpu_usage: Option<f32>,
    #[cfg(feature = "gpu")]
    pub(crate) gpu_time: u64,
    #[cfg(feature = "gpu")]
    pub(crate) gpu_instant: Option<std::time::Instant>,
}

mod inner;

mod accessors;
mod cpu;
mod gpu;
mod info;
mod lifecycle;
mod list;
mod update;

pub(crate) use self::list::get_proc_list;
pub(crate) use self::update::update_process;