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)  

PageMeter Class Reference

#include <pagemeter.h>

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

Public Member Functions

 PageMeter (XOSView *parent, double total)
 
 ~PageMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 PageMeter (XOSView *parent, float max)
 
 ~PageMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 PageMeter (XOSView *parent, float max)
 
 ~PageMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 PageMeter (XOSView *parent, float max)
 
 ~PageMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 PageMeter (XOSView *parent, kstat_ctl_t *kcp, float max)
 
 ~PageMeter (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 getpageinfo (void)
 
void getpageinfo (void)
 
void updateinfo (void)
 
void getpageinfo (void)
 
void getpageinfo (void)
 
void getvmpageinfo (void)
 
void updateinfo (void)
 
void getpageinfo (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 ()
 

Protected Attributes

float pageinfo_ [2][2]
 
int pageindex_
 
float maxspeed_
 
unsigned long pageinfo_ [2][2]
 
bool _vmstat
 
const char * _statFileName
 
- 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_
 

Private Attributes

uint64_t previnfo_ [2]
 
KStatListcpustats
 
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
}
 

Detailed Description

Definition at line 23 of file pagemeter.h.

Constructor & Destructor Documentation

◆ PageMeter() [1/5]

PageMeter::PageMeter ( XOSView parent,
double  total 
)

Definition at line 22 of file pagemeter.cc.

References BSDGetPageStats(), BSDPageInit(), previnfo_, and FieldMeter::total_.

◆ ~PageMeter() [1/5]

PageMeter::~PageMeter ( void  )

Definition at line 29 of file pagemeter.cc.

◆ PageMeter() [2/5]

PageMeter::PageMeter ( XOSView parent,
float  max 
)

Definition at line 22 of file pagemeter.cc.

References max, maxspeed_, pageindex_, and pageinfo_.

◆ ~PageMeter() [2/5]

PageMeter::~PageMeter ( void  )

◆ PageMeter() [3/5]

PageMeter::PageMeter ( XOSView parent,
float  max 
)

◆ ~PageMeter() [3/5]

PageMeter::~PageMeter ( void  )

◆ PageMeter() [4/5]

PageMeter::PageMeter ( XOSView parent,
float  max 
)

◆ ~PageMeter() [4/5]

PageMeter::~PageMeter ( void  )

◆ PageMeter() [5/5]

PageMeter::PageMeter ( XOSView parent,
kstat_ctl_t *  kcp,
float  max 
)

◆ ~PageMeter() [5/5]

PageMeter::~PageMeter ( void  )

Member Function Documentation

◆ checkevent() [1/5]

void PageMeter::checkevent ( void  )
virtual

Implements Meter.

Definition at line 44 of file pagemeter.cc.

References FieldMeterDecay::drawfields(), and getpageinfo().

◆ checkevent() [2/5]

void PageMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkevent() [3/5]

void PageMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkevent() [4/5]

void PageMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkevent() [5/5]

void PageMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkResources() [1/5]

◆ checkResources() [2/5]

void PageMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ checkResources() [3/5]

void PageMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ checkResources() [4/5]

void PageMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ checkResources() [5/5]

void PageMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ getpageinfo() [1/5]

void PageMeter::getpageinfo ( void  )
protected

◆ getpageinfo() [2/5]

void PageMeter::getpageinfo ( void  )
protected

◆ getpageinfo() [3/5]

void PageMeter::getpageinfo ( void  )
protected

◆ getpageinfo() [4/5]

void PageMeter::getpageinfo ( void  )
protected

◆ getpageinfo() [5/5]

void PageMeter::getpageinfo ( void  )
protected

◆ getvmpageinfo()

void PageMeter::getvmpageinfo ( void  )
protected

◆ name() [1/5]

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

Reimplemented from Meter.

Definition at line 28 of file pagemeter.h.

◆ name() [2/5]

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

Reimplemented from Meter.

Definition at line 18 of file pagemeter.h.

◆ name() [3/5]

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

Reimplemented from Meter.

Definition at line 17 of file pagemeter.h.

◆ name() [4/5]

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

Reimplemented from Meter.

Definition at line 19 of file pagemeter.h.

◆ name() [5/5]

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

Reimplemented from Meter.

Definition at line 18 of file pagemeter.h.

◆ updateinfo() [1/2]

void PageMeter::updateinfo ( void  )
protected

◆ updateinfo() [2/2]

void PageMeter::updateinfo ( void  )
protected

Member Data Documentation

◆ _statFileName

const char* PageMeter::_statFileName
protected

Definition at line 28 of file pagemeter.h.

Referenced by getvmpageinfo().

◆ _vmstat

bool PageMeter::_vmstat
protected

Definition at line 27 of file pagemeter.h.

◆ cpustats

KStatList* PageMeter::cpustats
private

Definition at line 30 of file pagemeter.h.

Referenced by PageMeter().

◆ kc

kstat_ctl_t* PageMeter::kc
private

Definition at line 31 of file pagemeter.h.

Referenced by PageMeter().

◆ maxspeed_

float PageMeter::maxspeed_
protected

Definition at line 25 of file pagemeter.h.

Referenced by PageMeter(), and updateinfo().

◆ pageindex_

int PageMeter::pageindex_
protected

Definition at line 24 of file pagemeter.h.

Referenced by getvmpageinfo(), PageMeter(), and updateinfo().

◆ pageinfo_ [1/2]

float PageMeter::pageinfo_
protected

Definition at line 23 of file pagemeter.h.

Referenced by getvmpageinfo(), PageMeter(), and updateinfo().

◆ pageinfo_ [2/2]

unsigned long PageMeter::pageinfo_[2][2]
protected

Definition at line 24 of file pagemeter.h.

◆ previnfo_

uint64_t PageMeter::previnfo_[2]
private

Definition at line 36 of file pagemeter.h.

Referenced by getpageinfo(), and PageMeter().


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