Classes | |
class | PathResolver |
Typedefs | |
typedef void * | ImageHandle |
Definition of an image handle. | |
typedef void * | ProcessHandle |
Definition of the process handle. | |
typedef void * | ImageHandle |
Definition of an image handle. | |
typedef void * | ProcessHandle |
Definition of the process handle. | |
typedef unsigned long(*) | EntryPoint (const unsigned long iid, void **ppvObject) |
Definition of the "generic" DLL entry point function. | |
typedef void *(*) | Creator () |
Definition of the "generic" DLL entry point function. | |
typedef void * | ThreadHandle |
A Thread handle. | |
Enumerations | |
enum | MemoryUnit { Byte, kByte, MByte, GByte, TByte, PByte, EByte } |
Unit of memory. More... | |
enum | ModuleType { UNKNOWN, SHAREDLIB, EXECUTABLE } |
enum | InfoType { NoFetch, RemainTime, Times, ProcessBasics, PriorityBoost, Memory, Quota, System, Modules, IO } |
Enumeration for fetching information. More... | |
enum | TimeType { Year, Month, Day, Hour, Min, Sec, milliSec, microSec, nanoSec } |
Time type for conversion. More... | |
Functions | |
long | breakExecution () |
Break the execution of the application and invoke the debugger. | |
long | breakExecution (long pid) |
Break the execution of the application and invoke the debugger in a remote process. | |
std::string | homeDirectory () |
std::string | tempDirectory () |
StatusCode | resolveEnv (const std::string &var, std::string &res, int recusions=124) |
long | adjustMemory (MemoryUnit typ, long value) |
Convert time from kByte to requested representation (Experts only). | |
long | procID () |
Basic Process Information: Process ID. | |
long | parentID (InfoType fetch=ProcessBasics, long pid=-1) |
Basic Process Information: Parent's process ID. | |
long | affinityMask (InfoType fetch=ProcessBasics, long pid=-1) |
Basic Process Information: Affinity mask. | |
long | exitStatus (InfoType fetch=ProcessBasics, long pid=-1) |
Basic Process Information: Exit status (does not really make sense for the running process, but for others!). | |
long | basePriority (InfoType fetch=ProcessBasics, long pid=-1) |
Basic Process Information: Base priority. | |
long | priorityBoost (InfoType fetch=PriorityBoost, long pid=-1) |
Basic Process Information: priority boost. | |
long | numPageFault (InfoType fetch=Memory, long pid=-1) |
Basic Process Information: Number of page faults. | |
long | pagefileUsage (MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1) |
Basic Process Information: Current page file usage. | |
long | pagefileUsagePeak (MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1) |
Basic Process Information: Peak usage of page file. | |
long | pagefileUsageLimit (MemoryUnit unit=kByte, InfoType fetch=Quota, long pid=-1) |
Basic Process Information: Peak usage of page file. | |
long | nonPagedMemory (MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1) |
Basic Process Information: Current usage of non paged memory. | |
long | nonPagedMemoryPeak (MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1) |
Basic Process Information: Peak usage of non paged memory. | |
long | nonPagedMemoryLimit (MemoryUnit unit=kByte, InfoType fetch=Quota, long pid=-1) |
System Process Limits: Maximum amount of non-paged memory this process is allowed to use. | |
long | pagedMemory (MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1) |
Basic Process Information: Amount of paged memory currently occupied by the process 'pid'. | |
long | pagedMemoryPeak (MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1) |
Basic Process Information: Maximum of paged memory occupied by the process 'pid'. | |
long | pagedMemoryLimit (MemoryUnit unit=kByte, InfoType fetch=Quota, long pid=-1) |
Basic Process Information: Amount of paged memory that can be occupied by the process 'pid'. | |
long | minMemoryLimit (MemoryUnit unit=kByte, InfoType fetch=Quota, long pid=-1) |
System Process Limits: Minimum amount of virtual memory this process may use. | |
long | maxMemoryLimit (MemoryUnit unit=kByte, InfoType fetch=Quota, long pid=-1) |
System Process Limits: Maximum amount of virtual memory this process is allowed to use. | |
long | mappedMemory (MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1) |
Basic Process Information: priority boost. | |
long | mappedMemoryPeak (MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1) |
Basic Process Information: priority boost. | |
long | virtualMemory (MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1) |
Basic Process Information: priority boost. | |
long | virtualMemoryPeak (MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1) |
Basic Process Information: priority boost. | |
long | virtualMemoryLimit (MemoryUnit unit=kByte, InfoType fetch=Quota, long pid=-1) |
System Process Limits: Maximum amount of the page file this process is allowed to use. | |
const std::string & | moduleName () |
Get the name of the (executable/DLL) file without file-type. | |
const std::string & | moduleNameFull () |
Get the full name of the (executable/DLL) file. | |
ModuleType | moduleType () |
Get type of the module. | |
ProcessHandle | processHandle () |
Handle to running process. | |
ImageHandle | moduleHandle () |
Handle to currently executed module. | |
ImageHandle | exeHandle () |
Handle to the executable file running. | |
const std::string & | exeName () |
Name of the executable file running. | |
const std::vector< std::string > | linkedModules () |
Vector of names of linked modules. | |
void | setModuleHandle (ImageHandle handle) |
Attach module handle. | |
PathResolver::SearchPathStatus | PathResolverCheckSearchPath (const std::string &search_path) |
std::string | PathResolverFindDirectory (const std::string &logical_file_name, const std::string &search_path) |
std::string | PathResolverFindDirectoryFromList (const std::string &logical_file_name, const std::string &search_list) |
std::string | PathResolverFindFile (const std::string &logical_file_name, const std::string &search_path) |
std::string | PathResolverFindFileFromList (const std::string &logical_file_name, const std::string &search_list) |
std::string | PathResolverFindXMLFile (const std::string &logical_file_name) |
std::string | PathResolverFindDataFile (const std::string &logical_file_name) |
unsigned long | loadDynamicLib (const std::string &name, ImageHandle *handle) |
Load dynamic link library. | |
unsigned long | unloadDynamicLib (ImageHandle handle) |
unload dynamic link library | |
unsigned long | getProcedureByName (ImageHandle handle, const std::string &name, EntryPoint *pFunction) |
Get a specific function defined in the DLL. | |
unsigned long | getProcedureByName (ImageHandle handle, const std::string &name, Creator *pFunction) |
Get a specific function defined in the DLL. | |
unsigned long | getLastError () |
Get last system known error. | |
const std::string | getLastErrorString () |
Get last system error as string. | |
const std::string | getErrorString (unsigned long error) |
Retrieve error code as string for a given error. | |
const std::string | typeinfoName (const std::type_info &) |
Get platform independent information about the class type. | |
const std::string | typeinfoName (const char *) |
const std::string & | hostName () |
Host name. | |
const std::string & | osName () |
OS name. | |
const std::string & | osVersion () |
OS version. | |
const std::string & | machineType () |
Machine type. | |
const std::string & | accountName () |
User login name. | |
long | numCmdLineArgs () |
Number of arguments passed to the commandline. | |
long | argc () |
Number of arguments passed to the commandline (==numCmdLineArgs()); just to match argv call... | |
const std::vector< std::string > | cmdLineArgs () |
Command line arguments including executable name as arg[0] as vector of strings. | |
char ** | argv () |
char** command line arguments including executable name as arg[0]; You may not modify them! | |
const std::string | getEnv (const char *var) |
get a particular environment variable | |
const std::vector< std::string > | getEnv () |
get all environment variables | |
int | setEnv (const std::string &name, const std::string &value, int overwrite=1) |
Set an environment variables. | |
ThreadHandle | threadSelf () |
thread handle "accessor" | |
int | backTrace (void **addresses, const int depth) |
bool | backTrace (std::string &btrace, const int depth, const int offset=0) |
bool | getStackLevel (void *addresses, void *&addr, std::string &fnc, std::string &lib) |
longlong | adjustTime (TimeType typ, longlong timevalue) |
Convert time from OS native time to requested representation (Experts only). | |
longlong | ellapsedTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1) |
Ellapsed time since start of process in milli seconds. | |
longlong | kernelTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1) |
CPU kernel mode time of process in milli seconds. | |
longlong | userTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1) |
CPU user mode time of process in milli seconds. | |
longlong | cpuTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1) |
Consumed CPU time of process in milli seconds. | |
longlong | remainingTime (TimeType typ=milliSec, InfoType fetch=Quota, long pid=-1) |
Maximum processing time left for this process. | |
longlong | creationTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1) |
Process Creation time. | |
longlong | systemStart (TimeType typ=Sec) |
Maximum processing time left for this process. | |
longlong | upTime (TimeType typ=Hour) |
Maximum processing time left for this process. | |
longlong | currentTime (TimeType typ=milliSec) |
Retrieve absolute system time. | |
longlong | tickCount () |
Retrieve the number of ticks since system startup. |
Entrypoints:
typedef void* System::ImageHandle |
typedef void* System::ProcessHandle |
typedef void* System::ImageHandle |
typedef void* System::ProcessHandle |
typedef unsigned long(*) System::EntryPoint(const unsigned long iid, void **ppvObject) |
typedef void*(*) System::Creator() |
typedef void* System::ThreadHandle |
enum System::MemoryUnit |
enum System::ModuleType |
enum System::InfoType |
Enumeration for fetching information.
Definition at line 18 of file SystemBase.h.
00018 { NoFetch, 00019 RemainTime, 00020 Times, 00021 ProcessBasics, 00022 PriorityBoost, 00023 Memory, 00024 Quota, 00025 System, 00026 Modules, 00027 IO };
enum System::TimeType |
long System::breakExecution | ( | ) |
Break the execution of the application and invoke the debugger.
long System::breakExecution | ( | long | pid | ) |
Break the execution of the application and invoke the debugger in a remote process.
std::string System::homeDirectory | ( | ) |
std::string System::tempDirectory | ( | ) |
StatusCode System::resolveEnv | ( | const std::string & | var, | |
std::string & | res, | |||
int | recusions = 124 | |||
) |
long System::adjustMemory | ( | MemoryUnit | typ, | |
long | value | |||
) |
Convert time from kByte to requested representation (Experts only).
long System::procID | ( | ) |
Basic Process Information: Process ID.
long System::parentID | ( | InfoType | fetch = ProcessBasics , |
|
long | pid = -1 | |||
) |
Basic Process Information: Parent's process ID.
long System::affinityMask | ( | InfoType | fetch = ProcessBasics , |
|
long | pid = -1 | |||
) |
Basic Process Information: Affinity mask.
long System::exitStatus | ( | InfoType | fetch = ProcessBasics , |
|
long | pid = -1 | |||
) |
Basic Process Information: Exit status (does not really make sense for the running process, but for others!).
long System::basePriority | ( | InfoType | fetch = ProcessBasics , |
|
long | pid = -1 | |||
) |
Basic Process Information: Base priority.
long System::priorityBoost | ( | InfoType | fetch = PriorityBoost , |
|
long | pid = -1 | |||
) |
Basic Process Information: priority boost.
long System::numPageFault | ( | InfoType | fetch = Memory , |
|
long | pid = -1 | |||
) |
Basic Process Information: Number of page faults.
long System::pagefileUsage | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Memory , |
|||
long | pid = -1 | |||
) |
Basic Process Information: Current page file usage.
long System::pagefileUsagePeak | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Memory , |
|||
long | pid = -1 | |||
) |
Basic Process Information: Peak usage of page file.
long System::pagefileUsageLimit | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Quota , |
|||
long | pid = -1 | |||
) |
Basic Process Information: Peak usage of page file.
long System::nonPagedMemory | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Memory , |
|||
long | pid = -1 | |||
) |
Basic Process Information: Current usage of non paged memory.
long System::nonPagedMemoryPeak | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Memory , |
|||
long | pid = -1 | |||
) |
Basic Process Information: Peak usage of non paged memory.
long System::nonPagedMemoryLimit | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Quota , |
|||
long | pid = -1 | |||
) |
System Process Limits: Maximum amount of non-paged memory this process is allowed to use.
long System::pagedMemory | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Memory , |
|||
long | pid = -1 | |||
) |
Basic Process Information: Amount of paged memory currently occupied by the process 'pid'.
long System::pagedMemoryPeak | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Memory , |
|||
long | pid = -1 | |||
) |
Basic Process Information: Maximum of paged memory occupied by the process 'pid'.
long System::pagedMemoryLimit | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Quota , |
|||
long | pid = -1 | |||
) |
Basic Process Information: Amount of paged memory that can be occupied by the process 'pid'.
long System::minMemoryLimit | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Quota , |
|||
long | pid = -1 | |||
) |
System Process Limits: Minimum amount of virtual memory this process may use.
long System::maxMemoryLimit | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Quota , |
|||
long | pid = -1 | |||
) |
System Process Limits: Maximum amount of virtual memory this process is allowed to use.
long System::mappedMemory | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Memory , |
|||
long | pid = -1 | |||
) |
Basic Process Information: priority boost.
long System::mappedMemoryPeak | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Memory , |
|||
long | pid = -1 | |||
) |
Basic Process Information: priority boost.
long System::virtualMemory | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Memory , |
|||
long | pid = -1 | |||
) |
Basic Process Information: priority boost.
long System::virtualMemoryPeak | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Memory , |
|||
long | pid = -1 | |||
) |
Basic Process Information: priority boost.
long System::virtualMemoryLimit | ( | MemoryUnit | unit = kByte , |
|
InfoType | fetch = Quota , |
|||
long | pid = -1 | |||
) |
System Process Limits: Maximum amount of the page file this process is allowed to use.
const std::string& System::moduleName | ( | ) |
Get the name of the (executable/DLL) file without file-type.
const std::string& System::moduleNameFull | ( | ) |
Get the full name of the (executable/DLL) file.
ModuleType System::moduleType | ( | ) |
Get type of the module.
ProcessHandle System::processHandle | ( | ) |
Handle to running process.
ImageHandle System::moduleHandle | ( | ) |
Handle to currently executed module.
ImageHandle System::exeHandle | ( | ) |
Handle to the executable file running.
const std::string& System::exeName | ( | ) |
Name of the executable file running.
const std::vector<std::string> System::linkedModules | ( | ) |
Vector of names of linked modules.
void System::setModuleHandle | ( | ImageHandle | handle | ) |
Attach module handle.
PathResolver::SearchPathStatus System::PathResolverCheckSearchPath | ( | const std::string & | search_path | ) |
std::string System::PathResolverFindDirectory | ( | const std::string & | logical_file_name, | |
const std::string & | search_path | |||
) |
std::string System::PathResolverFindDirectoryFromList | ( | const std::string & | logical_file_name, | |
const std::string & | search_list | |||
) |
std::string System::PathResolverFindFile | ( | const std::string & | logical_file_name, | |
const std::string & | search_path | |||
) |
std::string System::PathResolverFindFileFromList | ( | const std::string & | logical_file_name, | |
const std::string & | search_list | |||
) |
std::string System::PathResolverFindXMLFile | ( | const std::string & | logical_file_name | ) |
std::string System::PathResolverFindDataFile | ( | const std::string & | logical_file_name | ) |
unsigned long System::loadDynamicLib | ( | const std::string & | name, | |
ImageHandle * | handle | |||
) |
Load dynamic link library.
unsigned long System::unloadDynamicLib | ( | ImageHandle | handle | ) |
unload dynamic link library
unsigned long System::getProcedureByName | ( | ImageHandle | handle, | |
const std::string & | name, | |||
EntryPoint * | pFunction | |||
) |
Get a specific function defined in the DLL.
unsigned long System::getProcedureByName | ( | ImageHandle | handle, | |
const std::string & | name, | |||
Creator * | pFunction | |||
) |
Get a specific function defined in the DLL.
unsigned long System::getLastError | ( | ) |
Get last system known error.
const std::string System::getLastErrorString | ( | ) |
Get last system error as string.
const std::string System::getErrorString | ( | unsigned long | error | ) |
Retrieve error code as string for a given error.
const std::string System::typeinfoName | ( | const std::type_info & | ) |
Get platform independent information about the class type.
const std::string System::typeinfoName | ( | const char * | ) |
const std::string& System::hostName | ( | ) |
Host name.
const std::string& System::osName | ( | ) |
OS name.
const std::string& System::osVersion | ( | ) |
OS version.
const std::string& System::machineType | ( | ) |
Machine type.
const std::string& System::accountName | ( | ) |
User login name.
long System::numCmdLineArgs | ( | ) |
Number of arguments passed to the commandline.
long System::argc | ( | ) |
Number of arguments passed to the commandline (==numCmdLineArgs()); just to match argv call...
const std::vector<std::string> System::cmdLineArgs | ( | ) |
Command line arguments including executable name as arg[0] as vector of strings.
char** System::argv | ( | ) |
char** command line arguments including executable name as arg[0]; You may not modify them!
const std::string System::getEnv | ( | const char * | var | ) |
get a particular environment variable
const std::vector<std::string> System::getEnv | ( | ) |
get all environment variables
int System::setEnv | ( | const std::string & | name, | |
const std::string & | value, | |||
int | overwrite = 1 | |||
) |
Set an environment variables.
If value is empty, the variable is removed from the environment. When overwrite is 0, the variable is not set if already present. Returns 0 on success, -1 on failure. See man 3 setenv.
ThreadHandle System::threadSelf | ( | ) | [inline] |
int System::backTrace | ( | void ** | addresses, | |
const int | depth | |||
) |
bool System::backTrace | ( | std::string & | btrace, | |
const int | depth, | |||
const int | offset = 0 | |||
) |
bool System::getStackLevel | ( | void * | addresses, | |
void *& | addr, | |||
std::string & | fnc, | |||
std::string & | lib | |||
) |
Convert time from OS native time to requested representation (Experts only).
Ellapsed time since start of process in milli seconds.
typ | Indicator or the unit the time will be returned. | |
timevalue | Time value to be converted. |
CPU kernel mode time of process in milli seconds.
typ | Indicator or the unit the time will be returned. | |
fetch | Indicator of the information to be fetched. If Fetch_None, the information will not be updated. | |
pid | Process ID of which the information will be returned |
CPU user mode time of process in milli seconds.
typ | Indicator or the unit the time will be returned. | |
fetch | Indicator of the information to be fetched. If Fetch_None, the information will not be updated. | |
pid | Process ID of which the information will be returned |
Consumed CPU time of process in milli seconds.
typ | Indicator or the unit the time will be returned. | |
fetch | Indicator of the information to be fetched. If Fetch_None, the information will not be updated. | |
pid | Process ID of which the information will be returned |
Maximum processing time left for this process.
typ | Indicator or the unit the time will be returned. | |
fetch | Indicator of the information to be fetched. If Fetch_None, the information will not be updated. | |
pid | Process ID of which the information will be returned |
Process Creation time.
typ | Indicator or the unit the time will be returned. | |
fetch | Indicator of the information to be fetched. If Fetch_None, the information will not be updated. | |
pid | Process ID of which the information will be returned |
Maximum processing time left for this process.
typ | Indicator or the unit the time will be returned. |
Maximum processing time left for this process.
typ | Indicator or the unit the time will be returned. |
Retrieve absolute system time.
typ | Indicator or the unit the time will be returned. |
longlong System::tickCount | ( | ) |
Retrieve the number of ticks since system startup.