Cat
|
Typedefs | |
typedef void * | ImageHandle |
Definition of an image handle. More... | |
typedef void * | ProcessHandle |
Definition of the process handle. More... | |
typedef void * | ThreadHandle |
A Thread handle. More... | |
Enumerations | |
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 | |
const std::string & | moduleName () |
Get the name of the (executable/DLL) file without file-type. More... | |
const std::string & | moduleNameFull () |
Get the full name of the (executable/DLL) file. More... | |
const ModuleType | moduleType () |
Get type of the module. More... | |
ProcessHandle | processHandle () |
Handle to running process. More... | |
ImageHandle | moduleHandle () |
Handle to currently executed module. More... | |
ImageHandle | exeHandle () |
Handle to the executable file running. More... | |
const std::string & | exeName () |
Name of the executable file running. More... | |
const std::vector< std::string > | linkedModules () |
Vector of names of linked modules. More... | |
void | setModuleHandle (ImageHandle handle) |
Attach module handle. More... | |
const std::string & | hostName () |
Host name. More... | |
const std::string & | osName () |
OS name. More... | |
const std::string & | osVersion () |
OS version. More... | |
const std::string & | machineType () |
Machine type. More... | |
const std::string & | accountName () |
User login name. More... | |
long | numCmdLineArgs () |
Number of arguments passed to the commandline. More... | |
long | argc () |
Number of arguments passed to the commandline (==numCmdLineArgs()); just to match argv call... More... | |
const std::vector< std::string > | cmdLineArgs () |
Command line arguments including executable name as arg[0] as vector of strings. More... | |
char ** | argv () |
char** command line arguments including executable name as arg[0]; You may not modify them! More... | |
const std::string | getEnv (const char *var) |
get a particular environment variable More... | |
const std::vector< std::string > | getEnv () |
get all environment variables More... | |
int | setEnv (const std::string &name, const std::string &value, int overwrite=1) |
set an environment variables. More... | |
ThreadHandle | threadSelf () |
thread handle "accessor" More... | |
longlong | adjustTime (TimeType typ, longlong timevalue) |
Convert time from OS native time to requested representation (Experts only) More... | |
longlong | ellapsedTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1) |
longlong | kernelTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1) |
longlong | userTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1) |
longlong | cpuTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1) |
longlong | remainingTime (TimeType typ=milliSec, InfoType fetch=Quota, long pid=-1) |
longlong | creationTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1) |
longlong | systemStart (TimeType typ=Sec) |
longlong | upTime (TimeType typ=Hour) |
longlong | currentTime (TimeType typ=milliSec) |
longlong | tickCount () |
ModuleInfo: OS specific details to access at run-time the module configuration of the process.
M.Frank
Note: OS specific details as well as Gaudi details may not occur in this definition file, because this header is the used by both, the OS specific implementations and the gaudi specific implementation. Since e.g. IID is defined in both, this would lead automatically to complete comilation failures.....
Note: OS specific details for process timing
Entrypoints:
On Windows NT Time is expressed as the amount of time that has elapsed since midnight on January 1, 1601 at Greenwich, England.
On Unix time is expressed as the amount of time that has elapsed since midnight on January 1, 1970 at Greenwich, England.
History :
+---------+----------------------------------------------+--------+ | Date | Comment | Who | +---------+----------------------------------------------+--------+ | 11/11/00| Initial version. | MF | +---------+----------------------------------------------+--------+
typedef void* System::ImageHandle |
Definition of an image handle.
Definition at line 30 of file ModuleInfo.h.
typedef void* System::ProcessHandle |
Definition of the process handle.
Definition at line 32 of file ModuleInfo.h.
typedef void* System::ThreadHandle |
enum System::InfoType |
Enumeration for fetching information.
Enumerator | |
---|---|
NoFetch | |
RemainTime | |
Times | |
ProcessBasics | |
PriorityBoost | |
Memory | |
Quota | |
System | |
Modules | |
IO |
Definition at line 18 of file SystemBase.h.
enum System::ModuleType |
Enumerator | |
---|---|
UNKNOWN | |
SHAREDLIB | |
EXECUTABLE |
Definition at line 28 of file ModuleInfo.h.
enum System::TimeType |
Time type for conversion.
Enumerator | |
---|---|
Year | |
Month | |
Day | |
Hour | |
Min | |
Sec | |
milliSec | |
microSec | |
nanoSec |
Definition at line 53 of file Timing.h.
const std::string & System::accountName | ( | ) |
User login name.
Definition at line 88 of file System.cpp.
Referenced by Application::Application(), and Server_NI6008::Server_NI6008().
Convert time from OS native time to requested representation (Experts only)
long System::argc | ( | ) |
Number of arguments passed to the commandline (==numCmdLineArgs()); just to match argv call...
Number of arguments passed to the commandline.
Definition at line 105 of file System.cpp.
References cmdLineArgs().
char ** System::argv | ( | ) |
char** command line arguments including executable name as arg[0]; You may not modify them!
Const char** command line arguments including executable name as arg[0].
added by I.B.
Definition at line 134 of file System.cpp.
References cmdLineArgs(), and s_argvChars.
const std::vector< std::string > System::cmdLineArgs | ( | ) |
Command line arguments including executable name as arg[0] as vector of strings.
Const char** command line arguments including executable name as arg[0].
Definition at line 110 of file System.cpp.
References exeName(), s_argvChars, and s_argvStrings.
Referenced by argc(), argv(), and numCmdLineArgs().
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 |
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 |
Retrieve absolute system time
typ | Indicator or the unit the time will be returned. |
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. |
System::ImageHandle System::exeHandle | ( | ) |
Handle to the executable file running.
Definition at line 152 of file ModuleInfo.cpp.
References ModuleHandle, and processHandle().
Referenced by exeName().
const std::string & System::exeName | ( | ) |
Name of the executable file running.
Definition at line 187 of file ModuleInfo.cpp.
References exeHandle(), and processHandle().
Referenced by cmdLineArgs().
const std::string System::getEnv | ( | const char * | var | ) |
get a particular environment variable
get a particular env var, return "UNKNOWN" if not defined
Definition at line 143 of file System.cpp.
Referenced by Application::bookkeeping(), and Application::loadHistoryFile().
const std::vector< std::string > System::getEnv | ( | ) |
get all environment variables
get all defined environment vars
Definition at line 153 of file System.cpp.
References environ.
const std::string & System::hostName | ( | ) |
Host name.
Definition at line 39 of file System.cpp.
Referenced by Application::Application(), Computer::Computer(), and Server_NI6008::Server_NI6008().
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 |
const std::vector< std::string > System::linkedModules | ( | ) |
Vector of names of linked modules.
Definition at line 209 of file ModuleInfo.cpp.
References processHandle(), and s_linkedModules.
const std::string & System::machineType | ( | ) |
Machine type.
Definition at line 76 of file System.cpp.
System::ImageHandle System::moduleHandle | ( | ) |
Handle to currently executed module.
Definition at line 128 of file ModuleInfo.cpp.
References ModuleHandle, and processHandle().
Referenced by moduleName(), and moduleNameFull().
const std::string & System::moduleName | ( | ) |
Get the name of the (executable/DLL) file without file-type.
Retrieve base name of module.
Definition at line 47 of file ModuleInfo.cpp.
References moduleHandle(), and processHandle().
const std::string & System::moduleNameFull | ( | ) |
Get the full name of the (executable/DLL) file.
Retrieve full name of module.
Definition at line 70 of file ModuleInfo.cpp.
References moduleHandle(), and processHandle().
Referenced by moduleType().
const System::ModuleType System::moduleType | ( | ) |
Get type of the module.
Definition at line 92 of file ModuleInfo.cpp.
References EXECUTABLE, moduleNameFull(), SHAREDLIB, and UNKNOWN.
long System::numCmdLineArgs | ( | ) |
Number of arguments passed to the commandline.
Definition at line 100 of file System.cpp.
References cmdLineArgs().
const std::string & System::osName | ( | ) |
OS name.
Definition at line 51 of file System.cpp.
Referenced by Application::Application(), and Server_NI6008::Server_NI6008().
const std::string & System::osVersion | ( | ) |
OS version.
Definition at line 64 of file System.cpp.
Referenced by Application::Application(), and Server_NI6008::Server_NI6008().
void * System::processHandle | ( | ) |
Handle to running process.
Retrieve processhandle.
Definition at line 114 of file ModuleInfo.cpp.
References FALSE.
Referenced by exeHandle(), exeName(), linkedModules(), moduleHandle(), moduleName(), and moduleNameFull().
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 |
int System::setEnv | ( | const std::string & | name, |
const std::string & | value, | ||
int | overwrite = 1 |
||
) |
set an environment variables.
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.
Definition at line 162 of file System.cpp.
void System::setModuleHandle | ( | System::ImageHandle | handle | ) |
Maximum processing time left for this process.
typ | Indicator or the unit the time will be returned. |
|
inline |
longlong System::tickCount | ( | ) |
Retrieve the number of ticks since system startup
Maximum processing time left for this process.
typ | Indicator or the unit the time 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 |