5 #ifndef JODA_MEMORYUTILITY_H
6 #define JODA_MEMORYUTILITY_H
10 #include "sys/sysinfo.h"
11 #include "sys/types.h"
46 const int powerOfThousand = SIZE::B);
56 const int powerOfThousand = SIZE::B);
85 double getFBase(
const int base = SIZE::B)
const;
93 double getFBaseSI(
const int base = SIZE::B)
const;
158 static int parseLine(
char* line);
Definition: MemoryUtility.h:25
MemoryT getBase(const int base=SIZE::B) const
Definition: MemoryUtility.cpp:31
std::string getHumanReadable() const
Definition: MemoryUtility.cpp:49
MemoryT getBaseSI(const int base=SIZE::B) const
Definition: MemoryUtility.cpp:36
MemorySize(const MemoryT bytes)
Definition: MemoryUtility.cpp:15
SIZE
Definition: MemoryUtility.h:30
@ PB
Definition: MemoryUtility.h:30
@ EB
Definition: MemoryUtility.h:30
@ TB
Definition: MemoryUtility.h:30
@ KB
Definition: MemoryUtility.h:30
@ MB
Definition: MemoryUtility.h:30
@ GB
Definition: MemoryUtility.h:30
@ B
Definition: MemoryUtility.h:30
MemoryT getBytes() const
Definition: MemoryUtility.cpp:27
static MemoryT convertToBytesSI(const MemoryT xbytes, const int powerOfThousand=SIZE::B)
Definition: MemoryUtility.cpp:22
std::string getHumanReadableSI() const
Definition: MemoryUtility.cpp:67
double getFBaseSI(const int base=SIZE::B) const
Definition: MemoryUtility.cpp:45
double getFBase(const int base=SIZE::B) const
Definition: MemoryUtility.cpp:41
static MemoryT convertToBytes(const MemoryT xbytes, const int powerOfThousand=SIZE::B)
Definition: MemoryUtility.cpp:17
Definition: MemoryUtility.h:17
static double getFreeRam()
Definition: MemoryUtility.cpp:146
static MemorySize remainingRam()
Definition: MemoryUtility.cpp:101
static MemorySize procRamUsage()
Definition: MemoryUtility.cpp:123
static std::string humanReadablePercent(double num)
Definition: MemoryUtility.cpp:151
static std::string getRamUsage()
Definition: MemoryUtility.cpp:139
unsigned long long MemoryT
Definition: MemoryUtility.h:19
static MemorySize totalRam()
Definition: MemoryUtility.cpp:81
static MemorySize sysRamUsage()
Definition: MemoryUtility.cpp:91