10#include "../../stdafx.h"
11#include "../../survey.h"
13#include <sys/utsname.h>
17#include "../../safeguards.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();
std::string SurveyMemoryToText(uint64_t memory)
Change the bytes of memory into a textual version rounded up to the biggest unit.