6 #ifndef DYNAMIC_GRAPH_PROCESS_LIST_H_
7 #define DYNAMIC_GRAPH_PROCESS_LIST_H_
9 #include <dynamic-graph/dynamic-graph-api.h>
11 #include <boost/archive/text_iarchive.hpp>
12 #include <boost/archive/text_oarchive.hpp>
13 #include <boost/serialization/vector.hpp>
14 #include <dynamic-graph/fwd.hh>
32 inline unsigned long long int computePeriod(
unsigned long long int &a,
33 unsigned long long int &b) {
34 return (a > b) ? a - b : 0;
102 void ProcessLine(std::istringstream &aCPULine);
104 friend class boost::serialization::access;
106 template <
class Archive>
107 void serialize(Archive &ar,
const unsigned int version) {
110 ar & user_mode_time_;
113 ar & system_all_time_;
121 ar & guest_nice_time_;
142 friend class boost::serialization::access;
147 void ProcessCPULine(
unsigned int cpunb, std::istringstream &aCPULine);
155 template <
class Archive>
156 void serialize(Archive &ar,
const unsigned int version) {
unsigned long long int idle_all_time_
Time spend in doing nothing.
unsigned long long int idle_time_
Time spend in doing nothing.
unsigned long long int irq_time_
Time spend in servicing hardware interrupts.
unsigned long long int system_period_
Time spend in system mode.
unsigned long long int irq_period_
Time spend in servicing hardware interrupts.
unsigned long long int user_mode_period_
Time spend in user mode.
unsigned long long int softirq_time_
Time spend in servicing software interrupts.
unsigned long long int softirq_period_
Time spend in servicing software interrupts.
unsigned long long int guest_period_
unsigned long long int system_time_
Time spend in system mode.
unsigned long long int total_period_
Various classes of time spend by the CPU by periodTotal time.
unsigned long long int guest_nice_time_
unsigned long long int guest_time_
unsigned long long int idle_all_period_
Time spend in doing nothing.
unsigned long long int system_all_time_
Time spend in system mode.
unsigned long long int system_all_period_
Time spend in all system mode.
unsigned long long int steal_time_
unsigned long long int nice_time_
Time spend in user mode with low priority (nice mode)
unsigned long long int total_time_
Various classes of time spend by the CPUTotal time.
unsigned long long int iowait_time_
Time spend in waiting an input/output to complete.
unsigned long long int steal_period_
unsigned long long int iowait_period_
Time spend in waiting an input/output to complete.
unsigned long long int user_mode_time_
Time spend in user mode.
unsigned long long int idle_period_
Time spend in doing nothing.
unsigned long long int nice_period_
Time spend in user mode with low priority (nice mode)
void init()
Read /proc/state file to extract CPU count.
CPUData gCPUData_
Global CPU information.
unsigned int cpuNb_
Number of CPU.
void readProcStat()
Update CPU data information from /proc/stat.
std::vector< CPUData > vCPUData_
Vector of CPU informations.