| 2450 | |
| 2451 | |
| 2452 | Try<Bytes> max_usage_in_bytes(const string& hierarchy, const string& cgroup) |
| 2453 | { |
| 2454 | Try<string> read = cgroups::read( |
| 2455 | hierarchy, cgroup, "memory.max_usage_in_bytes"); |
| 2456 | |
| 2457 | if (read.isError()) { |
| 2458 | return Error(read.error()); |
| 2459 | } |
| 2460 | |
| 2461 | return Bytes::parse(strings::trim(read.get()) + "B"); |
| 2462 | } |
| 2463 | |
| 2464 | |
| 2465 | namespace oom { |