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)  

SwapMeter Class Reference

#include <swapmeter.h>

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

Public Member Functions

 SwapMeter (XOSView *parent)
 
 ~SwapMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 SwapMeter (XOSView *parent)
 
 ~SwapMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 SwapMeter (XOSView *parent)
 
 ~SwapMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 SwapMeter (XOSView *parent)
 
 ~SwapMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 SwapMeter (XOSView *parent, kstat_ctl_t *kcp)
 
 ~SwapMeter (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 getswapinfo (void)
 
void getswapinfo (void)
 
void getswapinfo (void)
 
void getswapinfo (void)
 
void getswapinfo (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

struct default_pager_info def_pager_info
 
mach_port_t def_pager
 
size_t pagesize
 

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 20 of file swapmeter.h.

Constructor & Destructor Documentation

◆ SwapMeter() [1/5]

SwapMeter::SwapMeter ( XOSView parent)

Definition at line 21 of file swapmeter.cc.

References BSDSwapInit().

◆ ~SwapMeter() [1/5]

SwapMeter::~SwapMeter ( void  )

Definition at line 26 of file swapmeter.cc.

◆ SwapMeter() [2/5]

SwapMeter::SwapMeter ( XOSView parent)

◆ ~SwapMeter() [2/5]

SwapMeter::~SwapMeter ( void  )

◆ SwapMeter() [3/5]

SwapMeter::SwapMeter ( XOSView parent)

◆ ~SwapMeter() [3/5]

SwapMeter::~SwapMeter ( void  )

◆ SwapMeter() [4/5]

SwapMeter::SwapMeter ( XOSView parent)

◆ ~SwapMeter() [4/5]

SwapMeter::~SwapMeter ( void  )

◆ SwapMeter() [5/5]

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

Definition at line 13 of file swapmeter.cc.

References pagesize.

◆ ~SwapMeter() [5/5]

SwapMeter::~SwapMeter ( void  )

Member Function Documentation

◆ checkevent() [1/5]

void SwapMeter::checkevent ( void  )
virtual

Implements Meter.

Definition at line 40 of file swapmeter.cc.

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

◆ checkevent() [2/5]

void SwapMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkevent() [3/5]

void SwapMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkevent() [4/5]

void SwapMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkevent() [5/5]

void SwapMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

◆ checkResources() [1/5]

◆ checkResources() [2/5]

void SwapMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ checkResources() [3/5]

void SwapMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ checkResources() [4/5]

void SwapMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ checkResources() [5/5]

void SwapMeter::checkResources ( void  )
virtual

Reimplemented from FieldMeterGraph.

◆ getswapinfo() [1/5]

void SwapMeter::getswapinfo ( void  )
protected

Definition at line 45 of file swapmeter.cc.

References BSDGetSwapInfo(), FieldMeter::fields_, FieldMeter::setUsed(), and FieldMeter::total_.

Referenced by checkevent().

◆ getswapinfo() [2/5]

void SwapMeter::getswapinfo ( void  )
protected

◆ getswapinfo() [3/5]

void SwapMeter::getswapinfo ( void  )
protected

◆ getswapinfo() [4/5]

void SwapMeter::getswapinfo ( void  )
protected

◆ getswapinfo() [5/5]

void SwapMeter::getswapinfo ( void  )
protected

◆ name() [1/5]

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

Reimplemented from Meter.

Definition at line 25 of file swapmeter.h.

◆ name() [2/5]

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

Reimplemented from Meter.

Definition at line 24 of file swapmeter.h.

◆ name() [3/5]

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

Reimplemented from Meter.

Definition at line 17 of file swapmeter.h.

◆ name() [4/5]

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

Reimplemented from Meter.

Definition at line 19 of file swapmeter.h.

◆ name() [5/5]

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

Reimplemented from Meter.

Definition at line 17 of file swapmeter.h.

Member Data Documentation

◆ def_pager

mach_port_t SwapMeter::def_pager
private

Definition at line 34 of file swapmeter.h.

◆ def_pager_info

struct default_pager_info SwapMeter::def_pager_info
private

Definition at line 30 of file swapmeter.h.

◆ pagesize

size_t SwapMeter::pagesize
private

Definition at line 25 of file swapmeter.h.

Referenced by SwapMeter().


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