"Fossies" - the Fresh Open Source Software Archive

Member "xosview-1.23/sunos5/loadmeter.h" (11 Jul 2020, 788 Bytes) of package /linux/misc/xosview-1.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "loadmeter.h" see the Fossies "Dox" file reference documentation.

    1 //  
    2 //  Initial port performed by Greg Onufer (exodus@cheers.bungi.com)
    3 //
    4 #ifndef _LOADMETER_H_
    5 #define _LOADMETER_H_
    6 
    7 #include "fieldmetergraph.h"
    8 #include "xosview.h"
    9 #include "kstats.h"
   10 #include <kstat.h>
   11 
   12 
   13 class LoadMeter : public FieldMeterGraph {
   14  public:
   15     LoadMeter(XOSView *parent, kstat_ctl_t *kcp);
   16     ~LoadMeter(void);
   17 
   18     const char *name(void) const { return "LoadMeter"; }
   19     void checkevent(void);
   20     void checkResources(void);
   21 
   22  protected:
   23     void getloadinfo(void);
   24     void getspeedinfo(void);
   25 
   26  private:
   27     unsigned long procloadcol, warnloadcol, critloadcol;
   28     unsigned int warnThreshold, critThreshold;
   29     unsigned int old_cpu_speed, cur_cpu_speed;
   30     int lastalarmstate;
   31     bool do_cpu_speed;
   32     KStatList *cpulist;
   33     kstat_ctl_t *kc;
   34 #ifdef NO_GETLOADAVG
   35     kstat_t *ksp;
   36 #endif
   37 };
   38 
   39 #endif