Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Functions | Variables
JSystemToolkit.hh File Reference

System calls via shell interactions. More...

#include <iostream>
#include <string>
#include <vector>
#include <unistd.h>
#include "JLang/JException.hh"
#include "JSystem/JShell.hh"
#include "JSystem/JSysinfo.hh"

Go to the source code of this file.

Classes

struct  JSYSTEM::ls
 Auxiliary class to list files. More...
 

Namespaces

 JSYSTEM
 Auxiliary classes and methods for operating system calls.
 
 JPP
 

Functions

float JSYSTEM::getMemoryUsage (JShell &shell, const pid_t pid)
 Get memory usage in percent of given process identifier. More...
 
float JSYSTEM::getMemoryUsage (JShell &shell)
 Get memory usage in percent of this process. More...
 
float JSYSTEM::getMemoryUsage ()
 Get memory usage in percent of this process. More...
 
float JSYSTEM::getCpuUsage (JShell &shell, const pid_t pid)
 Get cpu usage in percent of given process identifier. More...
 
float JSYSTEM::getCpuUsage (JShell &shell)
 Get cpu usage in percent of this process. More...
 
float JSYSTEM::getCpuUsage ()
 Get cpu usage in percent of this process. More...
 
pid_t JSYSTEM::getPID (JShell &shell, const char *process)
 Get process identifier. More...
 
pid_t JSYSTEM::getPID (const char *process)
 Get process identifier. More...
 
pid_t JSYSTEM::getParentID (JShell &shell, pid_t pid)
 Get parent process identifier. More...
 
pid_t JSYSTEM::getParentID (const pid_t pid)
 Get parent process identifier. More...
 
std::string JSYSTEM::getShell (JShell &shell)
 Get shell name. More...
 
std::string JSYSTEM::getShell ()
 Get shell name of this process. More...
 
unsigned long long int JSYSTEM::getRAM ()
 Get RAM of this CPU. More...
 
const std::string JSYSTEM::which (JShell &shell, const char *process)
 Get process path. More...
 
const std::string JSYSTEM::which (const char *process)
 Get process path. More...
 
void JSYSTEM::gprint (const std::string &message)
 Print method. More...
 
int JSYSTEM::gexit (int status, const std::string &message="")
 Exit method. More...
 
void JSYSTEM::set_variable (const std::string &name, const std::string &value)
 Set environment variable. More...
 

Variables

static const char *const JSYSTEM::ZSH = "zsh"
 Shell names. More...
 
static const char *const JSYSTEM::KSH = "ksh"
 
static const char *const JSYSTEM::BASH = "bash"
 
static const char *const JSYSTEM::CSH = "csh"
 
static const char *const JSYSTEM::TCSH = "tcsh"
 

Detailed Description

System calls via shell interactions.

Author
mdejong

Definition in file JSystemToolkit.hh.