File: loadmeter.h

package info (click to toggle)
xosview 1.24-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,184 kB
  • sloc: cpp: 11,975; makefile: 154; ansic: 32; awk: 13; sh: 8
file content (43 lines) | stat: -rw-r--r-- 1,187 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
//  Copyright (c) 1994, 1995 by Mike Romberg ( romberg@fsl.noaa.gov )
//  Copyright (c) 1995, 1996, 1997-2002 by Brian Grayson (bgrayson@netbsd.org)
//
//  Most of this code was written by Werner Fink <werner@suse.de>
//  Only small changes were made on my part (M.R.)
//  And the near-trivial port to NetBSD was by bgrayson.
//
//  This file may be distributed under terms of the GPL or of the BSD
//    license, whichever you choose.  The full license notices are
//    contained in the files COPYING.GPL and COPYING.BSD, which you
//    should have received.  If not, contact one of the xosview
//    authors for a copy.
//

#ifndef _LOADMETER_H_
#define _LOADMETER_H_

#include "fieldmetergraph.h"
#include "xosview.h"


class LoadMeter : public FieldMeterGraph {
public:
	LoadMeter( XOSView *parent );
	~LoadMeter( void );

	const char *name( void ) const { return "LoadMeter"; }
	void checkevent( void );
	void checkResources( void );

protected:
	void getloadinfo( void );

private:
	unsigned long procloadcol_, warnloadcol_, critloadcol_;
	int warnThreshold_, critThreshold_, alarmstate_, lastalarmstate_;
	int old_cpu_speed_, cur_cpu_speed_;
	bool do_cpu_speed_;
};


#endif