| 2437 | |
| 2438 | |
| 2439 | Try<Bytes> memsw_usage_in_bytes(const string& hierarchy, const string& cgroup) |
| 2440 | { |
| 2441 | Try<string> read = cgroups::read( |
| 2442 | hierarchy, cgroup, "memory.memsw.usage_in_bytes"); |
| 2443 | |
| 2444 | if (read.isError()) { |
| 2445 | return Error(read.error()); |
| 2446 | } |
| 2447 | |
| 2448 | return Bytes::parse(strings::trim(read.get()) + "B"); |
| 2449 | } |
| 2450 | |
| 2451 | |
| 2452 | Try<Bytes> max_usage_in_bytes(const string& hierarchy, const string& cgroup) |