|
Jpp
master_rocky-37-gf0c5bc59d
the software that should make you happy
|
Auxiliary classes and methods for operating system calls. More...
Classes | |
| struct | JDateAndTime |
| Auxiliary class for date and time. More... | |
| struct | ls |
| Auxiliary data structure to list files in directory. More... | |
| struct | JGlob |
| Auxiliary class to list files. More... | |
| class | JKeypress |
| Enable unbuffered terminal input. More... | |
| class | JProcess |
| Streaming of input and output from Linux command. More... | |
| class | JShell |
| The JShell clas can be used to interact with the shell via I/O streams. More... | |
| struct | JStat |
| Auxiliary class for file status. More... | |
| struct | JSysinfo |
| Auxiliary class for system information. More... | |
| struct | JLocalTime |
| Auxililary class to local get time in micro seconds. More... | |
| struct | JUTSName |
| Auxiliary class for operating system information. More... | |
Typedefs | |
| typedef long long int | localtime_t |
| Type definition of local time. More... | |
Functions | |
| const char * | getDate () |
| Get current local date conform ISO-8601 standard. More... | |
| const char * | getTime () |
| Get current local time conform ISO-8601 standard. More... | |
| int | rename (const std::string &inputFile, const std::string &outputFile) |
| Rename file across file systems. More... | |
| std::string | getHostname () |
| Get host name. More... | |
| std::string | getHostname (const int ip) |
| Get host name. More... | |
| int | getIPnumber (const std::string &host_name) |
| Get IP number. More... | |
| int | getIPnumber () |
| Get IP number. More... | |
| std::string | getIPaddress (const int ip) |
| Get IP address (decimal-dot notation). More... | |
| std::string | getIPaddress () |
| Get IP address (decimal-dot notation). More... | |
| unsigned short | getSubaddress (const int ip) |
| Get host identifier within network. More... | |
| unsigned short | getSubaddress () |
| Get host identifier within network. More... | |
| std::vector< std::string > | getListOfIPaddresses () |
| Get list of IP address (decimal-dot notation). More... | |
| float | getMemoryUsage (JShell &shell, const pid_t pid) |
| Get memory usage in percent of given process identifier. More... | |
| float | getMemoryUsage (JShell &shell) |
| Get memory usage in percent of this process. More... | |
| float | getMemoryUsage () |
| Get memory usage in percent of this process. More... | |
| float | getCpuUsage (JShell &shell, const pid_t pid) |
| Get cpu usage in percent of given process identifier. More... | |
| float | getCpuUsage (JShell &shell) |
| Get cpu usage in percent of this process. More... | |
| float | getCpuUsage () |
| Get cpu usage in percent of this process. More... | |
| pid_t | getPID (JShell &shell, const char *process) |
| Get process identifier. More... | |
| pid_t | getPID (const char *process) |
| Get process identifier. More... | |
| pid_t | getParentID (JShell &shell, pid_t pid) |
| Get parent process identifier. More... | |
| pid_t | getParentID (const pid_t pid) |
| Get parent process identifier. More... | |
| std::string | getShell (JShell &shell) |
| Get shell name. More... | |
| std::string | getShell () |
| Get shell name of this process. More... | |
| unsigned long long int | getRAM () |
| Get RAM of this CPU. More... | |
| const std::string | which (JShell &shell, const char *process) |
| Get process path. More... | |
| const std::string | which (const char *process) |
| Get process path. More... | |
| void | gprint (const std::string &message) |
| Print method. More... | |
| int | gexit (int status, const std::string &message="") |
| Exit method. More... | |
| void | set_variable (const std::string &name, const std::string &value) |
| Set environment variable. More... | |
Variables | |
| static JDateAndTime | getDateAndTime |
| Function object to get current date and time. More... | |
| static JGlob | getFilenames |
| Function object to get list of files for given pattern. More... | |
| static const JCompareEndian | compareEndian |
| Function object operator. More... | |
| static JStat | getFileStatus |
| Function object for file status. More... | |
| static const char *const | SH = "sh" |
| Shell names. More... | |
| static const char *const | ZSH = "zsh" |
| static const char *const | KSH = "ksh" |
| static const char *const | BASH = "bash" |
| static const char *const | CSH = "csh" |
| static const char *const | TCSH = "tcsh" |
| static const std::string | SPECIAL_CHARACTERS = "\"' <>[](){};$#" |
| static const JLocalTime | getLocalTime |
| Function object to get local time in micro seconds. More... | |
Auxiliary classes and methods for operating system calls.
| typedef long long int JSYSTEM::localtime_t |
Type definition of local time.
Definition at line 21 of file JSystem/JTime.hh.
|
inline |
Get current local date conform ISO-8601 standard.
Definition at line 36 of file JDateAndTime.hh.
|
inline |
Get current local time conform ISO-8601 standard.
Definition at line 55 of file JDateAndTime.hh.
|
inline |
Rename file across file systems.
| inputFile | input file |
| outputFile | input file |
Definition at line 49 of file JFilesystem.hh.
|
inline |
Get host name.
Note that to obtain a host name including the domain name, JSYSTEM::getHostname(JSYSTEM::getIPnumber()) should be used.
Definition at line 77 of file JNetwork.hh.
|
inline |
|
inline |
Get IP number.
| host_name | host name |
Definition at line 117 of file JNetwork.hh.
|
inline |
|
inline |
Get IP address (decimal-dot notation).
| ip | IP number |
Definition at line 154 of file JNetwork.hh.
|
inline |
Get IP address (decimal-dot notation).
Definition at line 178 of file JNetwork.hh.
|
inline |
Get host identifier within network.
| ip | IP number |
Definition at line 190 of file JNetwork.hh.
|
inline |
Get host identifier within network.
Definition at line 205 of file JNetwork.hh.
|
inline |
Get list of IP address (decimal-dot notation).
Definition at line 216 of file JNetwork.hh.
|
inline |
Get memory usage in percent of given process identifier.
| shell | shell interface |
| pid | process identifier |
Definition at line 51 of file JSystemToolkit.hh.
|
inline |
Get memory usage in percent of this process.
| shell | shell interface |
Definition at line 72 of file JSystemToolkit.hh.
|
inline |
Get memory usage in percent of this process.
Definition at line 83 of file JSystemToolkit.hh.
|
inline |
Get cpu usage in percent of given process identifier.
| shell | shell interface |
| pid | process identifier |
Definition at line 96 of file JSystemToolkit.hh.
|
inline |
Get cpu usage in percent of this process.
| shell | shell interface |
Definition at line 117 of file JSystemToolkit.hh.
|
inline |
Get cpu usage in percent of this process.
Definition at line 128 of file JSystemToolkit.hh.
|
inline |
Get process identifier.
| shell | shell interface |
| process | process name |
Definition at line 141 of file JSystemToolkit.hh.
|
inline |
Get process identifier.
| process | process name |
Definition at line 162 of file JSystemToolkit.hh.
|
inline |
Get parent process identifier.
| shell | shell interface |
| pid | process identifier |
Definition at line 175 of file JSystemToolkit.hh.
|
inline |
Get parent process identifier.
| pid | process identifier |
Definition at line 194 of file JSystemToolkit.hh.
|
inline |
Get shell name.
| shell | shell interface |
Definition at line 206 of file JSystemToolkit.hh.
|
inline |
Get shell name of this process.
Definition at line 244 of file JSystemToolkit.hh.
|
inline |
Get RAM of this CPU.
Definition at line 255 of file JSystemToolkit.hh.
|
inline |
Get process path.
| shell | shell interface |
| process | process name |
Definition at line 270 of file JSystemToolkit.hh.
|
inline |
Get process path.
| process | process name |
Definition at line 292 of file JSystemToolkit.hh.
|
inline |
Print method.
| message | message |
Definition at line 303 of file JSystemToolkit.hh.
|
inline |
Exit method.
| status | exit status |
| message | optional message |
Definition at line 331 of file JSystemToolkit.hh.
|
inline |
Set environment variable.
This method prints the shell command to set the variable with the given name to the specified value.
| name | variable name |
| value | variable value |
Definition at line 351 of file JSystemToolkit.hh.
|
static |
Function object to get current date and time.
Definition at line 468 of file JDateAndTime.hh.
|
static |
|
static |
Function object operator.
Definition at line 66 of file JNetwork.hh.
|
static |
|
static |
Shell names.
Definition at line 33 of file JSystemToolkit.hh.
|
static |
Definition at line 34 of file JSystemToolkit.hh.
|
static |
Definition at line 35 of file JSystemToolkit.hh.
|
static |
Definition at line 36 of file JSystemToolkit.hh.
|
static |
Definition at line 37 of file JSystemToolkit.hh.
|
static |
Definition at line 38 of file JSystemToolkit.hh.
|
static |
Definition at line 40 of file JSystemToolkit.hh.
|
static |
Function object to get local time in micro seconds.
Definition at line 61 of file JSystem/JTime.hh.