taskmon
/build/rock-master-18.09-drivers-orogen-taskmon-0.20160621/taskmonTypes.hpp
Go to the documentation of this file.
1 #ifndef TASKMON_TYPES_HPP
2 #define TASKMON_TYPES_HPP
3 
4 #include <base/Time.hpp>
5 #include <vector>
6 
7 namespace taskmon
8 {
9  struct TaskInfo
10  {
12  std::string name;
13 
14  int
15  tid, // (special) task id, the POSIX thread ID (see also: tgid)
16  ppid; // stat,status pid of parent process
17  char
18  state; // stat,status single-char code for process state (S=sleeping)
19  base::Time
20  utime, // stat user-mode CPU time accumulated by process
21  stime, // stat kernel-mode CPU time accumulated by process
22  cutime, // stat cumulative utime of process and reaped children
23  cstime, // stat cumulative stime of process and reaped children
24  start_time; // stat start time of process -- seconds since 1-1-70
25  long
26  priority, // stat kernel scheduling priority
27  nice, // stat standard unix nice level of process
28  rss, // stat resident set size from /proc/#/stat (pages)
29  size, // statm total # of pages of memory
30  resident, // statm number of resident set (non-swapped) pages (4k)
31  share, // statm number of pages of shared (mmap'd) memory
32  trs, // statm text resident set size
33  lrs, // statm shared-lib resident set size
34  drs, // statm data resident set size
35  dt; // statm dirty pages
36  unsigned long
37  vm_size, // status same as vsize in kb
38  vm_lock, // status locked pages in kb
39  vm_rss, // status same as rss in kb
40  vm_data, // status data size
41  vm_stack, // status stack size
42  vm_exe, // status executable size
43  vm_lib, // status library size (all pages, not just used ones)
44  rtprio, // stat real-time priority
45  sched, // stat scheduling class
46  vsize, // stat number of pages of virtual memory ...
47  min_flt, // stat number of minor page faults since process start
48  maj_flt, // stat number of major page faults since process start
49  cmin_flt, // stat cumulative min_flt of process and child processes
50  cmaj_flt; // stat cumulative maj_flt of process and child processes
51  int
52  pgrp, // stat process group id
53  session, // stat session id
54  nlwp, // stat,status number of threads, or 0 if no clue
55  tgid, // (special) task group ID, the POSIX PID (see also: tid)
56  tpgid, // stat terminal process group id
57  processor; // stat current (or most recent?) CPU
58 
59  std::vector<std::string> cmdline;
60  };
61 
68  struct TaskStats
69  {
71  base::Time time;
73  base::Time end_time;
74 
75  std::vector<TaskInfo> tasks;
76  };
77 
78 }
79 
80 #endif
81 
int tid
Definition: taskmonTypes.hpp:15
base::Time time
Definition: taskmonTypes.hpp:71
int pgrp
Definition: taskmonTypes.hpp:52
long priority
Definition: taskmonTypes.hpp:26
long drs
Definition: taskmonTypes.hpp:26
unsigned long vm_lock
Definition: taskmonTypes.hpp:37
std::vector< std::string > cmdline
Definition: taskmonTypes.hpp:59
unsigned long rtprio
Definition: taskmonTypes.hpp:37
unsigned long cmin_flt
Definition: taskmonTypes.hpp:37
Definition: taskmonTypes.hpp:7
base::Time end_time
Definition: taskmonTypes.hpp:73
int ppid
Definition: taskmonTypes.hpp:15
int processor
Definition: taskmonTypes.hpp:52
std::string name
Definition: taskmonTypes.hpp:12
unsigned long vm_size
Definition: taskmonTypes.hpp:37
unsigned long vm_lib
Definition: taskmonTypes.hpp:37
long size
Definition: taskmonTypes.hpp:26
unsigned long vm_exe
Definition: taskmonTypes.hpp:37
unsigned long maj_flt
Definition: taskmonTypes.hpp:37
base::Time cstime
Definition: taskmonTypes.hpp:20
long trs
Definition: taskmonTypes.hpp:26
long dt
Definition: taskmonTypes.hpp:26
std::vector< TaskInfo > tasks
Definition: taskmonTypes.hpp:75
unsigned long vm_data
Definition: taskmonTypes.hpp:37
long share
Definition: taskmonTypes.hpp:26
unsigned long vm_rss
Definition: taskmonTypes.hpp:37
unsigned long vsize
Definition: taskmonTypes.hpp:37
int tgid
Definition: taskmonTypes.hpp:52
base::Time start_time
Definition: taskmonTypes.hpp:20
long lrs
Definition: taskmonTypes.hpp:26
Definition: taskmonTypes.hpp:68
unsigned long cmaj_flt
Definition: taskmonTypes.hpp:37
base::Time stime
Definition: taskmonTypes.hpp:20
unsigned long min_flt
Definition: taskmonTypes.hpp:37
long rss
Definition: taskmonTypes.hpp:26
int session
Definition: taskmonTypes.hpp:52
char state
Definition: taskmonTypes.hpp:18
base::Time utime
Definition: taskmonTypes.hpp:20
int tpgid
Definition: taskmonTypes.hpp:52
long nice
Definition: taskmonTypes.hpp:26
long resident
Definition: taskmonTypes.hpp:26
base::Time cutime
Definition: taskmonTypes.hpp:20
Definition: taskmonTypes.hpp:9
unsigned long sched
Definition: taskmonTypes.hpp:37
unsigned long vm_stack
Definition: taskmonTypes.hpp:37
int nlwp
Definition: taskmonTypes.hpp:52