interfaces with linux API to read process information and update ProcDb with it
More...
#include <proc_info.h>
interfaces with linux API to read process information and update ProcDb with it
Definition at line 24 of file proc_info.h.
◆ ProcInfo()
rtop::ProcInfo::ProcInfo |
( |
int |
id | ) |
|
|
inline |
◆ kill()
void rtop::ProcInfo::kill |
( |
| ) |
|
|
inline |
◆ read()
void rtop::ProcInfo::read |
( |
| ) |
|
|
private |
reads property values specified in ProcInfo::prop_set for each process and stores result in ProcDb::database
- Todo:
- : modify loop to read all properties from /proc/pid/stat file, then compute different property values by combining entries
- Bug:
- : throwing exception occasionaly. investigate
- Todo:
- : hardcoded property name for Command. receive this value during initialization
Definition at line 68 of file proc_info.h.
◆ sort()
void rtop::ProcInfo::sort |
( |
| ) |
|
|
private |
sorts property value vector corresponding to sortkey, and stores resulting permutation vector in ProcDb::sorted_indices
- Todo:
- : long and int sorting handled separately. investigate and refactor?
Definition at line 229 of file proc_info.h.
◆ update()
void rtop::ProcInfo::update |
( |
std::vector< std::string > & |
prop_vec, |
|
|
std::string |
sort_key |
|
) |
| |
◆ XMLTree
◆ pid_set
std::unordered_set<int> rtop::ProcInfo::pid_set |
|
private |
hashset for storing processs PIDs
Definition at line 31 of file proc_info.h.
◆ proc_database
ProcDb* rtop::ProcInfo::proc_database |
|
private |
◆ prop_set
std::unordered_set<std::string> rtop::ProcInfo::prop_set |
|
private |
hashset for storing property names, whose corresponding vectors in ProcDb need to be updated
Definition at line 33 of file proc_info.h.
◆ sortkey
std::string rtop::ProcInfo::sortkey |
|
private |
variable to hold property name to be sorted. used by ProcInfo::sort to sort process values corresponding to sortkey
Definition at line 29 of file proc_info.h.
◆ uuid
The documentation for this class was generated from the following file:
- /home/rk/Documents/Repos/in_progress/rtop/include/proc_info.h