xosview  1.23
About: xosview is an X Windows based system monitor (cpu, memory, swap and network usage; interrupt and serial activities; load average).
  Fossies Dox: xosview-1.23.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

LoadMeter Class Reference

#include <loadmeter.h>

Inheritance diagram for LoadMeter:
[legend]
Collaboration diagram for LoadMeter:
[legend]

Public Member Functions

 LoadMeter (XOSView *parent)
 
 ~LoadMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 LoadMeter (XOSView *parent)
 
 ~LoadMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 LoadMeter (XOSView *parent)
 
 ~LoadMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 LoadMeter (XOSView *parent)
 
 ~LoadMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 LoadMeter (XOSView *parent)
 
 ~LoadMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 LoadMeter (XOSView *parent, kstat_ctl_t *kcp)
 
 ~LoadMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
- Public Member Functions inherited from FieldMeterGraph
 FieldMeterGraph (XOSView *parent, int numfields, const char *title="", const char *legend="", int docaptions=0, int dolegends=0, int dousedlegends=0)
 
virtual ~FieldMeterGraph (void)
 
virtual void drawfields (int mandatory=0)
 
- Public Member Functions inherited from FieldMeterDecay
 FieldMeterDecay (XOSView *parent, int numfields, const char *title="", const char *legend="", int docaptions=0, int dolegends=0, int dousedlegends=0)
 
virtual ~FieldMeterDecay (void)
 
- Public Member Functions inherited from FieldMeter
 FieldMeter (XOSView *parent, int numfields, const char *title="", const char *legend="", int docaptions=0, int dolegends=0, int dousedlegends=0)
 
virtual ~FieldMeter (void)
 
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)
 
- Public Member Functions inherited from Meter
 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
 

Protected Member Functions

void getloadinfo (void)
 
void getloadinfo (void)
 
void getloadinfo (void)
 
void getloadinfo (void)
 
void getloadinfo (void)
 
void getspeedinfo (void)
 
void getloadinfo (void)
 
void getspeedinfo (void)
 
- Protected Member Functions inherited from FieldMeterGraph
void setNumCols (int n)
 
- Protected Member Functions inherited from FieldMeter
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 ()
 
- Protected Member Functions inherited from Meter
double samplesPerSecond ()
 
double secondsPerSample ()
 

Private Attributes

unsigned long procloadcol_
 
unsigned long warnloadcol_
 
unsigned long critloadcol_
 
int warnThreshold_
 
int critThreshold_
 
int alarmstate_
 
int lastalarmstate_
 
int old_cpu_speed_
 
int cur_cpu_speed_
 
bool do_cpu_speed_
 
int warnThreshold
 
int critThreshold
 
int alarmstate
 
int lastalarmstate
 
int alarmThreshold
 
char hostname [256]
 
struct statstime res
 
int do_cpu_speed
 
unsigned long procloadcol
 
unsigned long warnloadcol
 
unsigned long critloadcol
 
unsigned int warnThreshold
 
unsigned int critThreshold
 
unsigned int old_cpu_speed
 
unsigned int cur_cpu_speed
 
bool do_cpu_speed
 
KStatListcpulist
 
kstat_ctl_t * kc
 

Additional Inherited Members

- Static Public Member Functions inherited from Meter
static double scaleValue (double value, char *scale, bool metric)
 
- Protected Types inherited from FieldMeter
enum  UsedType {
  INVALID_0 , FLOAT , PERCENT , AUTOSCALE ,
  INVALID_TAIL
}
 
- Protected Attributes inherited from FieldMeterGraph
int useGraph_
 
int graphNumCols_
 
int graphpos_
 
double * heightfield_
 
- Protected Attributes inherited from FieldMeterDecay
int dodecay_
 
int firsttime_
 
double * decay_
 
double * lastDecayval_
 
- Protected Attributes inherited from FieldMeter
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_
 
- Protected Attributes inherited from Meter
XOSViewparent_
 
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_
 

Detailed Description

Definition at line 23 of file loadmeter.h.

Constructor & Destructor Documentation

◆ LoadMeter() [1/6]

LoadMeter::LoadMeter ( XOSView parent)

Definition at line 24 of file loadmeter.cc.

References FieldMeter::total_.

◆ ~LoadMeter() [1/6]

LoadMeter::~LoadMeter ( void  )

Definition at line 29 of file loadmeter.cc.

◆ LoadMeter() [2/6]

LoadMeter::LoadMeter ( XOSView parent)

◆ ~LoadMeter() [2/6]

LoadMeter::~LoadMeter ( void  )

◆ LoadMeter() [3/6]

LoadMeter::LoadMeter ( XOSView parent)

◆ ~LoadMeter() [3/6]

LoadMeter::~LoadMeter ( void  )

◆ LoadMeter() [4/6]

LoadMeter::LoadMeter ( XOSView parent)

◆ ~LoadMeter() [4/6]

LoadMeter::~LoadMeter ( void  )

◆ LoadMeter() [5/6]

LoadMeter::LoadMeter ( XOSView parent)

◆ ~LoadMeter() [5/6]

LoadMeter::~LoadMeter ( void  )

◆ LoadMeter() [6/6]

LoadMeter::LoadMeter ( XOSView parent,
kstat_ctl_t *  kcp 
)

◆ ~LoadMeter() [6/6]

LoadMeter::~LoadMeter ( void  )

Member Function Documentation

◆ checkevent() [1/6]

void LoadMeter::checkevent ( void  )
virtual

◆ checkevent() [2/6]

void LoadMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkevent() [3/6]

void LoadMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkevent() [4/6]

void LoadMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkevent() [5/6]

void LoadMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkevent() [6/6]

void LoadMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkResources() [1/6]

◆ checkResources() [2/6]

void LoadMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ checkResources() [3/6]

void LoadMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ checkResources() [4/6]

void LoadMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ checkResources() [5/6]

void LoadMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ checkResources() [6/6]

void LoadMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ getloadinfo() [1/6]

◆ getloadinfo() [2/6]

void LoadMeter::getloadinfo ( void  )
protected

◆ getloadinfo() [3/6]

void LoadMeter::getloadinfo ( void  )
protected

◆ getloadinfo() [4/6]

void LoadMeter::getloadinfo ( void  )
protected

◆ getloadinfo() [5/6]

void LoadMeter::getloadinfo ( void  )
protected

◆ getloadinfo() [6/6]

void LoadMeter::getloadinfo ( void  )
protected

◆ getspeedinfo() [1/2]

void LoadMeter::getspeedinfo ( void  )
protected

Definition at line 138 of file loadmeter.cc.

References cur_cpu_speed_, old_cpu_speed_, SPEEDFILENAME, and XOSDEBUG.

◆ getspeedinfo() [2/2]

void LoadMeter::getspeedinfo ( void  )
protected

◆ name() [1/6]

const char* LoadMeter::name ( void  ) const
inlinevirtual

Reimplemented from Meter.

Definition at line 28 of file loadmeter.h.

◆ name() [2/6]

const char* LoadMeter::name ( void  ) const
inlinevirtual

Reimplemented from Meter.

Definition at line 23 of file loadmeter.h.

◆ name() [3/6]

const char* LoadMeter::name ( void  ) const
inlinevirtual

Reimplemented from Meter.

Definition at line 18 of file loadmeter.h.

◆ name() [4/6]

const char* LoadMeter::name ( void  ) const
inlinevirtual

Reimplemented from Meter.

Definition at line 15 of file loadmeter.h.

◆ name() [5/6]

const char* LoadMeter::name ( void  ) const
inlinevirtual

Reimplemented from Meter.

Definition at line 22 of file loadmeter.h.

◆ name() [6/6]

const char* LoadMeter::name ( void  ) const
inlinevirtual

Reimplemented from Meter.

Definition at line 18 of file loadmeter.h.

Member Data Documentation

◆ alarmstate

int LoadMeter::alarmstate
private

Definition at line 32 of file loadmeter.h.

◆ alarmstate_

int LoadMeter::alarmstate_
private

Definition at line 37 of file loadmeter.h.

Referenced by checkResources(), and getloadinfo().

◆ alarmThreshold

int LoadMeter::alarmThreshold
private

Definition at line 27 of file loadmeter.h.

◆ cpulist

KStatList* LoadMeter::cpulist
private

Definition at line 32 of file loadmeter.h.

Referenced by LoadMeter().

◆ critloadcol

unsigned long LoadMeter::critloadcol
private

Definition at line 27 of file loadmeter.h.

◆ critloadcol_

unsigned long LoadMeter::critloadcol_
private

Definition at line 36 of file loadmeter.h.

Referenced by checkResources(), and getloadinfo().

◆ critThreshold [1/2]

int LoadMeter::critThreshold
private

Definition at line 32 of file loadmeter.h.

◆ critThreshold [2/2]

unsigned int LoadMeter::critThreshold
private

Definition at line 28 of file loadmeter.h.

◆ critThreshold_

int LoadMeter::critThreshold_
private

Definition at line 37 of file loadmeter.h.

Referenced by checkResources(), and getloadinfo().

◆ cur_cpu_speed

unsigned int LoadMeter::cur_cpu_speed
private

Definition at line 29 of file loadmeter.h.

Referenced by LoadMeter().

◆ cur_cpu_speed_

int LoadMeter::cur_cpu_speed_
private

Definition at line 38 of file loadmeter.h.

Referenced by checkevent(), and getspeedinfo().

◆ do_cpu_speed [1/2]

int LoadMeter::do_cpu_speed
private

Definition at line 35 of file loadmeter.h.

◆ do_cpu_speed [2/2]

bool LoadMeter::do_cpu_speed
private

Definition at line 31 of file loadmeter.h.

◆ do_cpu_speed_

bool LoadMeter::do_cpu_speed_
private

Definition at line 39 of file loadmeter.h.

Referenced by checkevent(), and checkResources().

◆ hostname

char LoadMeter::hostname[256]
private

Definition at line 26 of file loadmeter.h.

◆ kc

kstat_ctl_t* LoadMeter::kc
private

Definition at line 33 of file loadmeter.h.

Referenced by LoadMeter().

◆ lastalarmstate

int LoadMeter::lastalarmstate
private

Definition at line 32 of file loadmeter.h.

Referenced by LoadMeter().

◆ lastalarmstate_

int LoadMeter::lastalarmstate_
private

Definition at line 37 of file loadmeter.h.

Referenced by checkResources(), and getloadinfo().

◆ old_cpu_speed

unsigned int LoadMeter::old_cpu_speed
private

Definition at line 29 of file loadmeter.h.

Referenced by LoadMeter().

◆ old_cpu_speed_

int LoadMeter::old_cpu_speed_
private

Definition at line 38 of file loadmeter.h.

Referenced by checkevent(), and getspeedinfo().

◆ procloadcol

unsigned long LoadMeter::procloadcol
private

Definition at line 27 of file loadmeter.h.

◆ procloadcol_

unsigned long LoadMeter::procloadcol_
private

Definition at line 36 of file loadmeter.h.

Referenced by checkResources(), and getloadinfo().

◆ res

struct statstime LoadMeter::res
private

Definition at line 26 of file loadmeter.h.

◆ warnloadcol

unsigned long LoadMeter::warnloadcol
private

Definition at line 27 of file loadmeter.h.

◆ warnloadcol_

unsigned long LoadMeter::warnloadcol_
private

Definition at line 36 of file loadmeter.h.

Referenced by checkResources(), and getloadinfo().

◆ warnThreshold [1/2]

int LoadMeter::warnThreshold
private

Definition at line 32 of file loadmeter.h.

◆ warnThreshold [2/2]

unsigned int LoadMeter::warnThreshold
private

Definition at line 28 of file loadmeter.h.

◆ warnThreshold_

int LoadMeter::warnThreshold_
private

Definition at line 37 of file loadmeter.h.

Referenced by checkResources(), and getloadinfo().


The documentation for this class was generated from the following files: