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)  

cpumeter.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 1994, 1995, 2004, 2006 by Mike Romberg ( mike.romberg@noaa.gov )
3 //
4 // This file may be distributed under terms of the GPL
5 //
6 
7 #ifndef _CPUMETER_H_
8 #define _CPUMETER_H_
9 
10 #include "fieldmetergraph.h"
11 #include "xosview.h"
12 
13 
14 class CPUMeter : public FieldMeterGraph {
15 public:
16  CPUMeter(XOSView *parent, const char *cpuID = "cpu");
17  ~CPUMeter(void);
18 
19  const char *name(void) const { return "CPUMeter"; }
20  void checkevent(void);
21 
22  void checkResources(void);
23 
24  static int countCPUs(void);
25  static const char *cpuStr(int num);
26  static int getkernelversion(void);
27 protected:
28  int _lineNum;
29  unsigned long long cputime_[2][10];
30  int cpuindex_;
31  int kernel_;
33 
34  void getcputime(void);
35  int findLine(const char *cpuID);
36  const char *toUpper(const char *str);
37 private:
38 };
39 
40 #endif
void checkevent(void)
static int getkernelversion(void)
Definition: cpumeter.cc:337
static const char * cpuStr(int num)
int statfields_
Definition: cpumeter.h:32
CPUMeter(XOSView *parent, unsigned int nbr)
Definition: cpumeter.cc:23
static int countCPUs(void)
Definition: cpumeter.cc:300
uint64_t cputime_[2][CPUSTATES]
Definition: cpumeter.h:44
int _lineNum
Definition: cpumeter.h:28
void checkResources(void)
~CPUMeter(void)
const char * name(void) const
Definition: cpumeter.h:19
const char * toUpper(const char *str)
void getcputime(void)
int findLine(const char *cpuID)
Definition: cpumeter.cc:277
int kernel_
Definition: cpumeter.h:31
unsigned int cpuindex_
Definition: cpumeter.h:45