Bitcoin Core 30.99.0
P2P Digital Currency
Functions
system.cpp File Reference
#include <bitcoin-build-config.h>
#include <common/system.h>
#include <logging.h>
#include <util/string.h>
#include <util/time.h>
#include <sys/stat.h>
#include <unistd.h>
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <locale>
#include <optional>
#include <stdexcept>
#include <string>
#include <thread>
Include dependency graph for system.cpp:

Go to the source code of this file.

Functions

std::string ShellEscape (const std::string &arg)
 
void SetupEnvironment ()
 
bool SetupNetworking ()
 
int GetNumCores ()
 Return the number of cores available on the current system. More...
 
std::optional< size_t > GetTotalRAM ()
 Return the total RAM available on the current system, if detectable. More...
 
SteadyClock::duration GetUptime ()
 Monotonic uptime (not affected by system time changes). More...
 

Function Documentation

◆ GetNumCores()

int GetNumCores ( )

Return the number of cores available on the current system.

Note
This does count virtual cores, such as those provided by HyperThreading.

Definition at line 109 of file system.cpp.

Here is the caller graph for this function:

◆ GetTotalRAM()

std::optional< size_t > GetTotalRAM ( )

Return the total RAM available on the current system, if detectable.

Definition at line 114 of file system.cpp.

Here is the caller graph for this function:

◆ GetUptime()

SteadyClock::duration GetUptime ( )

Monotonic uptime (not affected by system time changes).

Definition at line 130 of file system.cpp.

Here is the caller graph for this function:

◆ SetupEnvironment()

void SetupEnvironment ( )

Definition at line 64 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupNetworking()

bool SetupNetworking ( )

Definition at line 97 of file system.cpp.

Here is the caller graph for this function:

◆ ShellEscape()

std::string ShellEscape ( const std::string &  arg)

Definition at line 41 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: