Jpp  18.5.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JSysinfo.cc File Reference

Example program to print system information. More...

#include <iostream>
#include <iomanip>
#include "JSystem/JSysinfo.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Example program to print system information.

Author
mdejong

Definition in file JSysinfo.cc.

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 14 of file JSysinfo.cc.

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 }
Utility class to parse command line options.
Definition: JParser.hh:1514
#define FATAL(A)
Definition: JMessage.hh:67