Struct procinfo::pid::Stat [] [src]

pub struct Stat {
    pub pid: pid_t,
    pub command: String,
    pub state: State,
    pub ppid: pid_t,
    pub pgrp: pid_t,
    pub session: pid_t,
    pub tty_nr: pid_t,
    pub tty_pgrp: pid_t,
    pub flags: u32,
    pub minflt: usize,
    pub cminflt: usize,
    pub majflt: usize,
    pub cmajflt: usize,
    pub utime: clock_t,
    pub stime: clock_t,
    pub cutime: clock_t,
    pub cstime: clock_t,
    pub priority: i32,
    pub nice: i32,
    pub num_threads: i32,
    pub start_time: u64,
    pub vsize: usize,
    pub rss: usize,
    pub rsslim: usize,
    pub start_code: usize,
    pub end_code: usize,
    pub startstack: usize,
    pub kstkeep: usize,
    pub kstkeip: usize,
    pub signal: usize,
    pub blocked: usize,
    pub sigignore: usize,
    pub sigcatch: usize,
    pub wchan: usize,
    pub exit_signal: i32,
    pub processor: u32,
    pub rt_priority: u32,
    pub policy: u32,
    pub delayacct_blkio_ticks: u64,
    pub guest_time: clock_t,
    pub cguest_time: clock_t,
    pub start_data: usize,
    pub end_data: usize,
    pub start_brk: usize,
    pub arg_start: usize,
    pub arg_end: usize,
    pub env_start: usize,
    pub env_end: usize,
    pub exit_code: i32,
}

Process status information.

See man 5 proc and Linux/fs/proc/array.c.

Fields

Process ID (i.e., Thread Group ID).

Filename of the executable.

Current state of the process.

Process ID of parent process.

Process group ID of the process.

Session ID of the process.

The controlling terminal of the process. (The minor device number is contained in the combination of bits 31 to 20 and 7 to 0; the major device number is in bits 15 to 8.)

Process group ID of the controlling terminal of the process.

The kernel flags word of the process. For bit meanings, see the PF_* defines in the Linux kernel source file include/linux/sched.h. Details depend on the kernel version.

The number of minor faults the process has made which have not required loading a memory page from disk.

The number of minor faults that the process's waited-for children have made.

The number of major faults the process has made which have required loading a memory page from disk.

The number of major faults that the process's waited-for children have made.

Amount of time that this process has been scheduled in user mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)). This includes guest time, guest_time (time spent running a virtual CPU, see below), so that applications that are not aware of the guest time field do not lose that time from their calculations.

Amount of time that this process has been scheduled in kernel mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)).

Amount of time that this process's waited-for children have been scheduled in user mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)). (See also times(2).) This includes guest time, cguest_time (time spent running a virtual CPU, see below).

Amount of time that this process's waited-for children have been scheduled in kernel mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)).

For processes running a real-time scheduling policy (policy below; see sched_setscheduler(2)), this is the negated scheduling priority, minus one; that is, a number in the range -2 to -100, corresponding to real-time priorities 1 to 99. For processes running under a non-real-time scheduling policy, this is the raw nice value (setpriority(2)) as represented in the kernel. The kernel stores nice values as numbers in the range 0 (high) to 39 (low), corresponding to the user-visible nice range of -20 to 19.

The nice value (see setpriority(2)), a value in the range 19 (low priority) to -20 (high priority).

Number of threads in this process (since Linux 2.6).

The time the process started after system boot, expressed in clock ticks (divide by sysconf(_SC_CLK_TCK)).

Virtual memory size in bytes.

Resident Set Size: number of pages the process has in real memory. This is just the pages which count toward text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out.

Current soft limit in bytes on the rss of the process; see the description of RLIMIT_RSS in getrlimit(2).

The address above which program text can run.

The address below which program text can run.

The address of the start (i.e., bottom) of the stack.

The current value of ESP (stack pointer), as found in the kernel stack page for the process.

The current EIP (instruction pointer).

The bitmap of pending signals. Obsolete, because it does not provide information on real-time signals; use /proc/[pid]/status instead.

The bitmap of blocked signals. Obsolete, because it does not provide information on real-time signals; use /proc/[pid]/status instead.

The bitmap of ignored signals. Obsolete, because it does not provide information on real-time signals; use /proc/[pid]/status instead.

The bitmap of caught signals. Obsolete, because it does not provide information on real-time signals; use /proc/[pid]/status instead.

This is the "channel" in which the process is waiting. It is the address of a location in the kernel where the process is sleeping. The corresponding symbolic name can be found in /proc/[pid]/wchan.

Signal to be sent to parent when we die.

CPU number last executed on.

Real-time scheduling priority, a number in the range 1 to 99 for processes scheduled under a real-time policy, or 0, for non-real-time processes (see sched_setscheduler(2)).

Scheduling policy (see sched_setscheduler(2)). Decode using the SCHED_* constants in linux/sched.h.

Aggregated block I/O delays, measured in clock ticks (centiseconds). Since Linux 2.6.18.

Guest time of the process (time spent running a virtual CPU for a guest operating system), measured in clock ticks (divide by sysconf(_SC_CLK_TCK)). Since Linux 2.6.24.

Guest time of the process's children, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)). Since linux 2.6.24.

Address above which program initialized and uninitialized (BSS) data are placed. Since Linux 3.3.

Address below which program initialized and uninitialized (BSS) data are placed. Since Linux 3.3.

Address above which program heap can be expanded with brk(2). Since Linux 3.3.

Address above which program command-line arguments (argv) are placed. Since Linux 3.5.

Address below program command-line arguments (argv) are placed. Since Linux 3.5.

Address above which program environment is placed. Since Linux 3.5.

Address below which program environment is placed. Since Linux 3.5.

The thread's exit status in the form reported by waitpid(2). Since Linux 3.5.

Trait Implementations

impl Debug for Stat
[src]

Formats the value using the given formatter.

impl Default for Stat
[src]

Returns the "default value" for a type. Read more

impl PartialEq for Stat
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Stat
[src]

impl Hash for Stat
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more