Jpp
17.1.1
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JSystem
JSysinfo.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
4
#include "
JSystem/JSysinfo.hh
"
5
#include "
Jeep/JParser.hh
"
6
#include "
Jeep/JMessage.hh
"
7
8
/**
9
* \file
10
*
11
* Example program to print system information.
12
* \author mdejong
13
*/
14
int
main
(
int
argc,
char
* argv[])
15
{
16
using namespace
std;
17
18
try
{
19
20
JParser<>
zap(
"Example program to print system information."
);
21
22
zap(argc, argv);
23
}
24
catch
(
const
exception &error) {
25
FATAL
(error.what() << endl);
26
}
27
28
using namespace
JPP;
29
30
const
JSysinfo info;
31
32
cout <<
"up-time "
<< info.uptime << endl;
33
cout <<
"RAM total "
<< info.totalram << endl;
34
cout <<
"RAM free "
<< info.freeram << endl;
35
cout <<
"memory "
<< info.mem_unit << endl;
36
cout <<
"RAM "
<< info.getTotalRAM() << endl;
37
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1517
JSysinfo.hh
System information.
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
Generated by
1.8.5