| 2424 | |
| 2425 | |
| 2426 | Try<Bytes> usage_in_bytes(const string& hierarchy, const string& cgroup) |
| 2427 | { |
| 2428 | Try<string> read = cgroups::read( |
| 2429 | hierarchy, cgroup, "memory.usage_in_bytes"); |
| 2430 | |
| 2431 | if (read.isError()) { |
| 2432 | return Error(read.error()); |
| 2433 | } |
| 2434 | |
| 2435 | return Bytes::parse(strings::trim(read.get()) + "B"); |
| 2436 | } |
| 2437 | |
| 2438 | |
| 2439 | Try<Bytes> memsw_usage_in_bytes(const string& hierarchy, const string& cgroup) |