39 char c;
in >>
c; state =
static_cast<State>(
c);
52 >>
stat.controlling_process_group
54 >>
stat.minor_faults_count
55 >>
stat.minor_faults_count_by_children
56 >>
stat.major_faults_count
57 >>
stat.major_faults_count_by_children
60 >>
stat.time.user_for_children
61 >>
stat.time.system_for_children
65 >>
stat.time_before_next_sig_alarm
68 >>
stat.size.resident_set
69 >>
stat.size.resident_set_limit
70 >>
stat.addresses.start_code
71 >>
stat.addresses.end_code
72 >>
stat.addresses.start_stack
73 >>
stat.addresses.stack_pointer
74 >>
stat.addresses.instruction_pointer
75 >>
stat.signals.pending
76 >>
stat.signals.blocked
77 >>
stat.signals.ignored
78 >>
stat.signals.caught
81 >>
stat.swap_count_children
84 >>
stat.realtime_priority
85 >>
stat.scheduling_policy
86 >>
stat.aggregated_block_io_delays
88 >>
stat.guest_time_children;
95 std::stringstream
ss;
ss <<
"/proc/" << process.
pid() <<
"/stat";
96 std::ifstream
in(
ss.str());
The Process class models a process and possible operations on it.
virtual pid_t pid() const
Query the pid of the process.
CORE_POSIX_DLL_PUBLIC const posix::Process & operator>>(const posix::Process &process, OomAdj &adj)
Read the OomAdj value for a process instance.
Signal
The Signal enum collects the most common POSIX signals.
The Stat struct encapsulates status information about a process.