diff --git a/sysinfo_posix.cpp b/sysinfo_posix.cpp index a784c05d..f302fe0f 100644 --- a/sysinfo_posix.cpp +++ b/sysinfo_posix.cpp @@ -40,5 +40,13 @@ cruft::util::operator<< (std::ostream &os, sysinfo const &) os << ", username: " << user->pw_name; } + { + auto const size = posix::error::try_call (sysconf, _SC_PAGESIZE); + auto const total = posix::error::try_call (sysconf, _SC_PHYS_PAGES); + auto const now = posix::error::try_call (sysconf, _SC_AVPHYS_PAGES); + + os << ", ram: { total: " << size * total << ", available: " << size * now << " },"; + } + return os << " }"; }