MongoDB  2.7.0
Classes | Public Member Functions | Static Public Member Functions | List of all members
mongo::ProcessInfo Class Reference

Public Member Functions

 ProcessInfo (ProcessId pid=ProcessId::getCurrent())
 
int getVirtualMemorySize ()
 
int getResidentSize ()
 
const string & getOsType () const
 Get the type of os (e.g. More...
 
const string & getOsName () const
 Get the os Name (e.g. More...
 
const string & getOsVersion () const
 Get the os version (e.g. More...
 
unsigned getAddrSize () const
 Get the cpu address size (e.g. More...
 
unsigned long long getMemSizeMB () const
 Get the total amount of system memory in MB.
 
unsigned getNumCores () const
 Get the number of CPUs.
 
const string & getArch () const
 Get the CPU architecture (e.g. More...
 
bool hasNumaEnabled () const
 Determine if NUMA is enabled (interleaved) for this process.
 
void appendSystemDetails (BSONObjBuilder &details) const
 Get extra system stats.
 
void getExtraInfo (BSONObjBuilder &info)
 Append platform-specific data to obj.
 
bool supported ()
 

Static Public Member Functions

static unsigned long long getPageSize ()
 Get the system page size in bytes.
 
static bool isDataFileZeroingNeeded ()
 Determine if file zeroing is necessary for newly allocated data files.
 
static bool blockCheckSupported ()
 
static bool blockInMemory (const void *start)
 
static const void * alignToStartOfPage (const void *ptr)
 
static bool pagesInMemory (const void *start, size_t numPages, vector< char > *out)
 Sets i-th element of 'out' to non-zero if the i-th page starting from the one containing 'start' is in memory. More...
 
static void initializeSystemInfo ()
 

Member Function Documentation

static const void* mongo::ProcessInfo::alignToStartOfPage ( const void *  ptr)
inlinestatic
Returns
a pointer aligned to the start of the page the provided pointer belongs to.

NOTE requires blockCheckSupported() == true

unsigned mongo::ProcessInfo::getAddrSize ( ) const
inline

Get the cpu address size (e.g.

32, 36, 64)

const string& mongo::ProcessInfo::getArch ( ) const
inline

Get the CPU architecture (e.g.

x86, x86_64)

const string& mongo::ProcessInfo::getOsName ( ) const
inline

Get the os Name (e.g.

Ubuntu, Gentoo, Windows Server 2008)

const string& mongo::ProcessInfo::getOsType ( ) const
inline

Get the type of os (e.g.

Windows, Linux, Mac OS)

const string& mongo::ProcessInfo::getOsVersion ( ) const
inline

Get the os version (e.g.

10.04, 11.3.0, 6.1 (build 7600))

int mongo::ProcessInfo::getResidentSize ( )
Returns
mbytes
int mongo::ProcessInfo::getVirtualMemorySize ( )
Returns
mbytes
bool mongo::ProcessInfo::pagesInMemory ( const void *  start,
size_t  numPages,
vector< char > *  out 
)
static

Sets i-th element of 'out' to non-zero if the i-th page starting from the one containing 'start' is in memory.

The 'out' vector will be resized to fit the requested number of pages.

Returns
true on success, false otherwise

NOTE: requires blockCheckSupported() == true


The documentation for this class was generated from the following files: