sinfo
a compact graphical system performance monitor
Loading...
Searching...
No Matches
K3System.h
1#ifndef K3SYSTEM_H
2#define K3SYSTEM_H
3#define CODE_BY "Kaloyan Krastev"
4#include <fstream>
5#include <sstream>
6#include <vector>
7//#include <cstdarg>
8#include <cstring>
9#include <sys/sysinfo.h>
10#include <sys/statvfs.h>
11
17struct K3Free
18{
19 const char* name;
20 const char* text;
21 std::vector<float>* valeur;
22 struct K3Free* next;
23};
24
31{
32private:
33 struct K3Free* head;
34 int size;
35
36 struct sysinfo struct_sysinfo;
37 struct statvfs struct_statvfs;
38 // struct cpufreq_stats* struct_cpufreq_stats;
39
40 struct K3Free* emerge(const char*);
41 std::vector<float>* content(const char*);
43 std::vector<std::string> split(const std::string&, char);
44 double getCPUUsage();
45
46 void reset(const char*);
47 void reset(struct K3Free*);
48 void file2char(const char*, const char*);
49 const char* setext(const char*, const char*);
50 void char2fector(const char*);
51 void info(float, const char*);
52
53public:
54 ~K3System();
55 K3System() : head(nullptr), size(0) {}
57 struct K3Free* node(const char*);
58 float back(const char*);
59 float back(const char*, int);
60 unsigned int connect();
62 void reset();
63 void fill(const char*, float);
64 void connect(const char*, const char*);
65 void connect(const char*, const char*, const char*);
66 void processor(const char*);
67 void get_sysinfo(const char*, const char*, const char*, const char *);
68 void get_statvfs(const char*, const char*);
69 const char* author(void);
70};
71
72#endif
73
74
this class is a collection of methods to access hardware performance information
Definition K3System.h:31
unsigned int connect()
Definition K3System.cpp:131
float back(const char *)
Definition K3System.cpp:65
struct K3Free * node(const char *)
Definition K3System.cpp:47
K3System()
Definition K3System.h:55
~K3System()
Definition K3System.cpp:3
a linked list of feature containers
Definition K3System.h:18
const char * name
Definition K3System.h:19
struct K3Free * next
Definition K3System.h:22
std::vector< float > * valeur
Definition K3System.h:21
const char * text
Definition K3System.h:20