diff options
Diffstat (limited to 'src/mongo/util/procparser.h')
-rw-r--r-- | src/mongo/util/procparser.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mongo/util/procparser.h b/src/mongo/util/procparser.h index 3bbb0ece16e..ed18b8bd197 100644 --- a/src/mongo/util/procparser.h +++ b/src/mongo/util/procparser.h @@ -69,5 +69,23 @@ Status parseProcStatFile(StringData filename, const std::vector<StringData>& keys, BSONObjBuilder* builder); +/** + * Read a string matching /proc/meminfo format, and write the specified list of keys in builder. + * + * keys - list of keys to output in BSON. If keys is empty, all keys are outputed. + * data - string to parsee + * builder - BSON output + */ +Status parseProcMemInfo(const std::vector<StringData>& keys, + StringData data, + BSONObjBuilder* builder); + +/** + * Read from file, and write the specified list of keys in builder. + */ +Status parseProcMemInfoFile(StringData filename, + const std::vector<StringData>& keys, + BSONObjBuilder* builder); + } // namespace procparser } // namespace mongo |