• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

superkaramba

  • sources
  • kde-4.12
  • kdeutils
  • superkaramba
  • src
  • sensors
mem.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2003 by Hans Karlsson *
3  * karlsson.h@home.se *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  ***************************************************************************/
10 #ifndef MEMSENSOR_H
11 #define MEMSENSOR_H
12 
13 #include <K3Process>
14 
15 #if defined(__FreeBSD__) || defined(__DragonFly__)
16 #include <k3procio.h>
17 #include <kvm.h>
18 #include <osreldate.h>
19 #endif
20 
21 #include "sensor.h"
22 
23 class MemSensor : public Sensor
24 {
25  Q_OBJECT
26 public:
27 
28  MemSensor(int interval);
29  ~MemSensor();
30 
31  int getMemTotal();
32  int getMemFree();
33  int getBuffers();
34  int getCached();
35 
36  int getSwapTotal();
37  int getSwapFree();
38 
39  void update();
40  void setMaxValue(SensorParams *sp);
41  QString getMemLine();
42 
43 private:
44  QString meminfo;
45  void readValues();
46 #if defined __FreeBSD__ || defined(Q_OS_NETBSD) || defined(__DragonFly__)
47  int pageshift; /* log base 2 of the pagesize */
48  QString sensorResult;
49  int swapTotal;
50  int swapUsed;
51 # if (defined(__FreeBSD__) && __FreeBSD_version < 500018)
52  K3ShellProcess ksp;
53  bool MaxSet;
54 
55 # elif defined __FreeBSD__ || defined(__DragonFly__)
56  kvm_t *kd;
57  kvm_swap swapinfo;
58 # endif
59 #endif
60 
61 private slots:
62  void receivedStdout(K3Process *, char *buffer, int);
63  void processExited(K3Process *);
64 
65 };
66 
67 #endif // MEMSENSOR_H
MemSensor::getMemLine
QString getMemLine()
MemSensor::~MemSensor
~MemSensor()
Definition: mem.cpp:71
MemSensor::getMemFree
int getMemFree()
Definition: mem.cpp:112
MemSensor
Definition: mem.h:23
MemSensor::getCached
int getCached()
Definition: mem.cpp:157
Sensor
Definition: sensor.h:17
MemSensor::getMemTotal
int getMemTotal()
Definition: mem.cpp:97
MemSensor::getSwapFree
int getSwapFree()
Definition: mem.cpp:219
sensor.h
SensorParams
Hans Karlsson.
Definition: sensorparams.h:30
MemSensor::getBuffers
int getBuffers()
Definition: mem.cpp:136
MemSensor::setMaxValue
void setMaxValue(SensorParams *sp)
Definition: mem.cpp:341
MemSensor::update
void update()
Definition: mem.cpp:283
MemSensor::getSwapTotal
int getSwapTotal()
Definition: mem.cpp:177
MemSensor::MemSensor
MemSensor(int interval)
Definition: mem.cpp:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:07:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

superkaramba

Skip menu "superkaramba"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal