Ref T13653. This entirely exists to support converging into the right swap state in deployment workflows.
- Maniphest Tasks
- T13653: After an AWS event, Phacility hosts may come up with swap only partially configured
- rARC59b273fd15d3: (stable) Promote 2021 Week 49
rARCc23222438b30: (stable) Provide an API for parsing swap information from "/proc/meminfo"
rARCc53bb21bbd3e: Provide an API for parsing swap information from "/proc/meminfo"
Ran unit tests.
Satisfy lint by catching and re-throwing Throwable.
It would be slightly more appropriate for this class to throw a more tailored exception, but I don't think there's a suitable existing exception and this already feels very heavy for its actual use case.
This overlaps somewhat with PhutilSystem::getSystemMemoryInformation(), but that mechanism is narrower and also doesn't really work in practice, so it would probably be reasonable to remove it entirely.