Gather a bit more information from sysinfo()
Summary:
What I've been seeing is that hh_server memory.current + memory.swap.current was only a modest 30gb (and its memory.swap.current was only 2gb), but the machine as a whole -- which was supposed to be running solely hack -- nevertheless had 16gb of swap used and it OOMed.
It's an ongoing quest to find out what's up. But as a starting point, I'd like hack telemetry to be able to show machinewide memory+swap. That'll at least let us point fingers and say "not us". It'll also give us an idea of how heavily occupied the machine is other than hh_server's own contribution.
This diff is just a small first step. It changes sysinfo.c to return most of the fields from sysinfo(), rather than just two. I believe that sysinfo() is the right way to gather information about machine ran and swap use.
I also moved nproc.c into sysinfo.c since it felt pretty similar.
Differential Revision:
D36715952
fbshipit-source-id:
186d2b46855955c161c67f6bd804e94e305df306