xosview
1.23
About: xosview is an X Windows based system monitor (cpu, memory, swap and network usage; interrupt and serial activities; load average).
![]() ![]() |
#include <coretemp.h>
Public Member Functions | |
CoreTemp (XOSView *parent, const char *label, const char *caption, int cpu) | |
~CoreTemp (void) | |
const char * | name (void) const |
void | checkevent (void) |
void | checkResources (void) |
CoreTemp (XOSView *parent, const char *label, const char *caption, int pkg, int cpu) | |
~CoreTemp (void) | |
const char * | name (void) const |
void | checkevent (void) |
void | checkResources (void) |
![]() | |
FieldMeter (XOSView *parent, int numfields, const char *title="", const char *legend="", int docaptions=0, int dolegends=0, int dousedlegends=0) | |
virtual | ~FieldMeter (void) |
virtual void | drawfields (int mandatory=0) |
void | setfieldcolor (int field, const char *color) |
void | setfieldcolor (int field, unsigned long color) |
void | docaptions (int val) |
void | dolegends (int val) |
void | dousedlegends (int val) |
void | reset (void) |
void | setUsed (double val, double total) |
void | draw (void) |
void | disableMeter (void) |
![]() | |
Meter (XOSView *parent, const char *title="", const char *legend="", int docaptions=0, int dolegends=0, int dousedlegends=0) | |
virtual | ~Meter (void) |
void | resize (int x, int y, int width, int height) |
void | title (const char *title) |
const char * | title (void) |
void | legend (const char *legend) |
const char * | legend (void) |
void | docaptions (int val) |
void | dolegends (int val) |
void | dousedlegends (int val) |
int | requestevent (void) |
int | getX () const |
int | getY () const |
int | getWidth () const |
int | getHeight () const |
Static Public Member Functions | |
static unsigned int | countCpus (void) |
static unsigned int | countCores (unsigned int pkg) |
static unsigned int | countCpus (void) |
![]() | |
static double | scaleValue (double value, char *scale, bool metric) |
Protected Member Functions | |
void | getcoretemp (void) |
void | getcoretemp (void) |
![]() | |
void | SetUsedFormat (const char *const str) |
void | drawlegend (void) |
void | drawused (int mandatory) |
bool | checkX (int x, int width) const |
void | setNumFields (int n) |
void | IntervalTimerStart () |
void | IntervalTimerStop () |
double | IntervalTimeInMicrosecs () |
double | IntervalTimeInSecs () |
![]() | |
double | samplesPerSecond () |
double | secondsPerSample () |
Private Member Functions | |
void | findSysFiles (void) |
Private Attributes | |
int | cpu_ |
int | cpucount_ |
float | high_ |
float * | temps_ |
unsigned long | actcolor_ |
unsigned long | highcolor_ |
int | _pkg |
int | _cpu |
int | _high |
std::vector< std::string > | _cpus |
unsigned long | _actcolor |
unsigned long | _highcolor |
Additional Inherited Members | |
![]() | |
enum | UsedType { INVALID_0 , FLOAT , PERCENT , AUTOSCALE , INVALID_TAIL } |
![]() | |
int | numfields_ |
double * | fields_ |
double | total_ |
double | used_ |
double | lastused_ |
int * | lastvals_ |
int * | lastx_ |
unsigned long * | colors_ |
unsigned long | usedcolor_ |
UsedType | print_ |
int | printedZeroTotalMesg_ |
int | numWarnings_ |
bool | metric_ |
int | usedoffset_ |
![]() | |
XOSView * | parent_ |
int | x_ |
int | y_ |
int | width_ |
int | height_ |
int | docaptions_ |
int | dolegends_ |
int | dousedlegends_ |
int | priority_ |
int | counter_ |
char * | title_ |
char * | legend_ |
unsigned long | textcolor_ |
Definition at line 19 of file coretemp.h.
CoreTemp::CoreTemp | ( | XOSView * | parent, |
const char * | label, | ||
const char * | caption, | ||
int | cpu | ||
) |
Definition at line 22 of file coretemp.cc.
References countCpus(), cpu_, cpucount_, FieldMeter::metric_, and temps_.
CoreTemp::~CoreTemp | ( | void | ) |
Definition at line 30 of file coretemp.cc.
References temps_.
CoreTemp::CoreTemp | ( | XOSView * | parent, |
const char * | label, | ||
const char * | caption, | ||
int | pkg, | ||
int | cpu | ||
) |
Definition at line 33 of file coretemp.cc.
References _high, and FieldMeter::metric_.
CoreTemp::~CoreTemp | ( | void | ) |
|
virtual |
Implements Meter.
Definition at line 77 of file coretemp.cc.
References FieldMeter::drawfields(), and getcoretemp().
|
virtual |
Reimplemented from FieldMeter.
|
virtual |
Reimplemented from FieldMeter.
Definition at line 34 of file coretemp.cc.
References actcolor_, XWin::allocColor(), FieldMeter::checkResources(), cpucount_, XWin::getResource(), XWin::getResourceOrUseDefault(), high_, highcolor_, Meter::legend(), Meter::parent_, Meter::priority_, FieldMeter::setfieldcolor(), FieldMeter::SetUsedFormat(), temps_, and FieldMeter::total_.
|
virtual |
Reimplemented from FieldMeter.
|
static |
Definition at line 271 of file coretemp.cc.
References PATH_SIZE, SYS_CORETEMP, SYS_HWMON, and SYS_VIATEMP.
Referenced by findSysFiles().
|
static |
Definition at line 73 of file coretemp.cc.
Referenced by CoreTemp(), and MeterMaker::makeMeters().
|
static |
|
private |
Definition at line 104 of file coretemp.cc.
References _cpu, _cpus, _pkg, countCores(), XWin::done(), name(), Meter::parent_, PATH_SIZE, SYS_CORETEMP, SYS_HWMON, and SYS_VIATEMP.
|
protected |
Definition at line 82 of file coretemp.cc.
References actcolor_, FieldMeter::colors_, cpu_, cpucount_, XWin::done(), FieldMeter::drawlegend(), FieldMeter::fields_, high_, highcolor_, Meter::parent_, FieldMeter::setfieldcolor(), FieldMeter::setUsed(), temps_, and FieldMeter::total_.
Referenced by checkevent().
|
protected |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from Meter.
Definition at line 25 of file coretemp.h.
|
private |
Definition at line 39 of file coretemp.h.
|
private |
Definition at line 37 of file coretemp.h.
Referenced by findSysFiles().
|
private |
Definition at line 38 of file coretemp.h.
Referenced by findSysFiles().
|
private |
Definition at line 37 of file coretemp.h.
Referenced by CoreTemp().
|
private |
Definition at line 39 of file coretemp.h.
|
private |
Definition at line 37 of file coretemp.h.
Referenced by findSysFiles().
|
private |
Definition at line 36 of file coretemp.h.
Referenced by checkResources(), and getcoretemp().
|
private |
Definition at line 34 of file coretemp.h.
Referenced by CoreTemp(), and getcoretemp().
|
private |
Definition at line 34 of file coretemp.h.
Referenced by checkResources(), CoreTemp(), and getcoretemp().
|
private |
Definition at line 35 of file coretemp.h.
Referenced by checkResources(), and getcoretemp().
|
private |
Definition at line 36 of file coretemp.h.
Referenced by checkResources(), and getcoretemp().
|
private |
Definition at line 35 of file coretemp.h.
Referenced by checkResources(), CoreTemp(), getcoretemp(), and ~CoreTemp().