Jpp
Functions
JSysinfo.cc File Reference
#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

◆ main()

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 << info.uptime << endl;
33  cout << info.totalram << endl;
34  cout << info.freeram << endl;
35  cout << info.mem_unit << endl;
36 
37  cout << info.getTotalRAM() << endl;
38 }
JPARSER::JParser
Utility class to parse command line options.
Definition: JParser.hh:1493
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
std
Definition: jaanetDictionary.h:36
FATAL
#define FATAL(A)
Definition: JMessage.hh:67