Miscellaneous information about this host and process.
Intended use:
Public interface
Review Status
- Reviewed By:
- UNKNOWN
- Date Reviewed:
- before2004/08/25
Prerequisite
Synopsis
This class is meant to encapsulate miscellaneous information about the environment that the current process is running in.
At present, the class can be used to obtain the name of the host on which this process is running, the process id of this process, the amount of physical memory (total, used, & free) on this host, the amount of swap space (total, used, and free), the number of CPUs on this host, and a count of the number of seconds from January 1, 1970. Generally you should use the classes Time and MVTime if your primary interest is related to time and dates. If your interest is in timing, you would generally use class Timer , which can also report CPU times as well as "clock" times.
Determination of the number of CPUs, swap space, and physical memory is particularly OS dependent. In cases where this functionality has not yet been implemented, the memory and swap functions will return -1 and the CPU function will return 0.
Example
doSomething();
cout << "Function doSomething() took " <<
Motivation
The ObjectID class uses a combination of hostname, process id, time, and a sequence number to ensure that ObjectID's are distinct. This class encapsulates the way the first three of those items are obtained.
To Do
Definition at line 103 of file HostInfo.h.