26 #ifndef Common_StatsSystem_h
27 #define Common_StatsSystem_h
77 StatsSystem(int32_t categories, std::vector<String> &dirs);
83 void add_categories(int32_t categories, std::vector<String> &dirs);
93 return !(*
this == other);
140 virtual void encode_group(
int group, uint8_t **bufp)
const;
143 virtual void decode_group(
int group, uint16_t len,
const uint8_t **bufp,
156 #endif // Common_StatsSystem_h
Abstract base class for managing serialized statistics.
bool operator==(const StatsSystem &other) const
Equal operator.
virtual void encode_group(int group, uint8_t **bufp) const
Serializes a statistics group to memory.
Base class managing serialized statistics.
A structure to retrieve Swapping statistics (pages swapped in/out, aggregate total numbers etc) ...
struct NetInfo net_info
Network information (host name, primary interface, gateway etc)
virtual size_t encoded_length_group(int group) const
Returns the encoded length of a statistics group.
A structure to retrieve CPU statistics (system wide cpu times, idle time etc).
struct NetStat net_stat
Network statistics (transfer rates, receiving rate etc)
virtual void decode_group(int group, uint16_t len, const uint8_t **bufp, size_t *remainp)
Deserializes a statistics group from memory.
struct CpuInfo cpu_info
CPU information (vendor, model, cores, cache sizes etc)
struct TermInfo term_info
Terminal information (number of lines, number of columns etc)
A structure to retrieve terminal information (lines, columns etc)
StatsSystem()
Default constructor; creates an empty object.
void refresh()
Refreshes the statistics.
A structure to retrieve CPU information (vendor, model, speed, number of cores etc.)
Category
All statistics categories that are provided by this class.
A structure to receive process statistics (CPU user time, system time, virtmal machine sizes etc) ...
struct ProcStat proc_stat
Process statistics (CPU user time, system time, vm size etc)
struct ProcInfo proc_info
Process information (pid, user, working directory etc)
Collects, serializes and deserializes system-wide statistics.
A structure to retrieve memory statistics (RAM size, used size, free size etc)
struct MemStat mem_stat
Memory statistics (total size, free space, used etc)
A structure to retrieve network information (host name, primary interface, primary address...
A structure to retrieve load average-statistics.
bool operator!=(const StatsSystem &other) const
Not Equal operator.
struct OsInfo os_info
OS information (name, architecture, version etc)
struct LoadAvgStat loadavg_stat
Load average normalized over number of cores.
std::vector< struct FsStat > fs_stat
Filesystem statistics (free space, used space, aggregate files etc)
struct SwapStat swap_stat
Swapping statistics (page in, page out etc)
void add_categories(int32_t categories)
Adds more categories to the already existing categories.
std::vector< struct DiskStat > disk_stat
Per-Disk statistics (read-rate, write-rate, etc)
System information and statistics based on libsigar.
A structure to receive process information (pid, user name, exe name, working directory, program arguments etc)
std::shared_ptr< StatsSystem > StatsSystemPtr
A structure to retrieve operating system information (name, version, vendor, architecture) ...
struct CpuStat cpu_stat
CPU statistics (user load, system load, idle etc)
A structure to retrieve network statistics (receiving rate, transmitting rate etc) ...