Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
Retrieve information about the system we are running on. More...
Functions | |
long | concurrency () |
Estimate available concurrency, e.g. More... | |
bool | getLocalHostname (Address &address) |
Get the local host name and set it in the specified. More... | |
void | getLocalIpAddresses (uint16_t port, std::vector< Address > &addrList) |
Get the (possibly multiple) local IP addresses of this host using the specified port. More... | |
void | getInterfaceNames (std::vector< std::string > &names) |
Get the names of all the network interfaces connected to this host. More... | |
bool | getInterfaceAddresses (const std::string &interface, std::vector< std::string > &addresses) |
Get strings for each of the IP addresses associated with a named network interface. More... | |
void | getSystemId (std::string &osName, std::string &nodeName, std::string &release, std::string &version, std::string &machine) |
Retrieve system identifiers and versions. More... | |
uint32_t | getProcessId () |
Get the process ID of the current process. More... | |
uint32_t | getParentProcessId () |
Get the process ID of the parent of the current process. More... | |
std::string | getProcessName () |
Get the name of the current process (i.e. More... | |
bool | threadSafeShutdown () |
Can thread related primitives be trusted during runtime house-cleaning? (i.e. More... | |
Retrieve information about the system we are running on.
Results may be dependent on OS/hardware.
long qpid::sys::SystemInfo::concurrency | ( | ) |
Estimate available concurrency, e.g.
number of CPU cores. -1 means estimate not available on this platform.
bool qpid::sys::SystemInfo::getInterfaceAddresses | ( | const std::string & | interface, |
std::vector< std::string > & | addresses | ||
) |
Get strings for each of the IP addresses associated with a named network interface.
If there is no interface of that name an empty list will be returned.
interface | The name of the network interface |
addresses | The list of the strings for the IP addresses are pushed on the back of this parameter to get just the list you need to clear the vector before using it. |
void qpid::sys::SystemInfo::getInterfaceNames | ( | std::vector< std::string > & | names | ) |
Get the names of all the network interfaces connected to this host.
names | Receives the list of interface names |
bool qpid::sys::SystemInfo::getLocalHostname | ( | Address & | address | ) |
Get the local host name and set it in the specified.
Returns false if it can't be obtained and sets errno to any error value.
void qpid::sys::SystemInfo::getLocalIpAddresses | ( | uint16_t | port, |
std::vector< Address > & | addrList | ||
) |
Get the (possibly multiple) local IP addresses of this host using the specified port.
uint32_t qpid::sys::SystemInfo::getParentProcessId | ( | ) |
Get the process ID of the parent of the current process.
uint32_t qpid::sys::SystemInfo::getProcessId | ( | ) |
Get the process ID of the current process.
std::string qpid::sys::SystemInfo::getProcessName | ( | ) |
Get the name of the current process (i.e.
the name of the executable)
void qpid::sys::SystemInfo::getSystemId | ( | std::string & | osName, |
std::string & | nodeName, | ||
std::string & | release, | ||
std::string & | version, | ||
std::string & | machine | ||
) |
Retrieve system identifiers and versions.
This is information that can generally be retrieved via POSIX uname().
osName | Receives the OS name; e.g., GNU/Linux or Windows |
nodeName | Receives the nodename. This may or may not match the set hostname from getLocalHostname(). |
release | Receives the OS release identifier. |
version | Receives the OS release version (kernel, build, sp, etc.) |
machine | Receives the hardware type. |
bool qpid::sys::SystemInfo::threadSafeShutdown | ( | ) |
Can thread related primitives be trusted during runtime house-cleaning? (i.e.
static destructors, atexit()).