1 |
#include <iostream> |
2 |
#include <string> |
3 |
#include <stdlib.h> // used for system("XXSX") calls |
4 |
#include "socket++-1.10/pipestream.h" // used to get calls to statgrab |
5 |
#include "Config.h" |
6 |
#ifndef XMLFORMATTER_H /* Has the file been INCLUDE'd already? */ |
7 |
#define XMLFORMATTER_H yes |
8 |
#include "XMLFormatter.h" |
9 |
#endif |
10 |
|
11 |
|
12 |
#define MAX_UNIQUE_VALUES = 40; |
13 |
|
14 |
using std::string; |
15 |
|
16 |
class SysMon { |
17 |
|
18 |
public: |
19 |
SysMon(Config config, int printDebug); // constructor |
20 |
int collect(); // collect data for an averager |
21 |
string getData(); // return the data from averages, or a snapshot if no data is avaible |
22 |
int getSequence(){ return sequence; }; // inline |
23 |
|
24 |
private: |
25 |
int sequence; // sequence number for the packets |
26 |
int debug; // print debug info? |
27 |
string titles[60]; // names for the packet info |
28 |
string values[60]; // values for those packet infos |
29 |
int titlepointer; // where have we got up to? |
30 |
int checks; // number of checks since the last packet |
31 |
}; // class |