13#include <sys/utsname.h>
19void SurveyOS(nlohmann::json &json)
22 if (uname(&name) < 0) {
27 json[
"os"] = name.sysname;
28 json[
"release"] = name.release;
29 json[
"machine"] = name.machine;
30 json[
"version"] = name.version;
32 long pages = sysconf(_SC_PHYS_PAGES);
33 long page_size = sysconf(_SC_PAGE_SIZE);
35 json[
"hardware_concurrency"] = std::thread::hardware_concurrency();
A number of safeguards to prevent using unsafe methods.
Definition of base types and functions in a cross-platform compatible way.
std::string SurveyMemoryToText(uint64_t memory)
Change the bytes of memory into a textual version rounded up to the biggest unit.
Functions to survey the current game / system, for crashlog and network-survey.