Apache Mesos
os.hpp
Go to the documentation of this file.
1 // Licensed under the Apache License, Version 2.0 (the "License");
2 // you may not use this file except in compliance with the License.
3 // You may obtain a copy of the License at
4 //
5 // http://www.apache.org/licenses/LICENSE-2.0
6 //
7 // Unless required by applicable law or agreed to in writing, software
8 // distributed under the License is distributed on an "AS IS" BASIS,
9 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 // See the License for the specific language governing permissions and
11 // limitations under the License.
12 
13 #ifndef __STOUT_OS_OS_HPP__
14 #define __STOUT_OS_OS_HPP__
15 
16 #include <string>
17 
18 #include <stout/bytes.hpp>
19 
20 
21 namespace os {
22 
23 // Structure returned by loadavg(). Encodes system load average
24 // for the last 1, 5 and 15 minutes.
25 struct Load {
26  double one;
27  double five;
28  double fifteen;
29 };
30 
31 
32 // Structure returned by memory() containing the total size of main
33 // and free memory.
34 struct Memory
35 {
40 };
41 
42 
43 // The structure returned by uname describing the currently running system.
44 struct UTSInfo
45 {
46  std::string sysname; // Operating system name (e.g. Linux).
47  std::string nodename; // Network name of this machine.
48  std::string release; // Release level of the operating system.
49  std::string version; // Version level of the operating system.
50  std::string machine; // Machine hardware platform.
51 };
52 
53 
54 } // namespace os {
55 
56 #endif // __STOUT_OS_OS_HPP__
Bytes freeSwap
Definition: os.hpp:39
std::string release
Definition: os.hpp:48
Definition: os.hpp:25
std::string version
Definition: os.hpp:49
Bytes totalSwap
Definition: os.hpp:38
std::string sysname
Definition: os.hpp:46
Definition: os.hpp:34
Bytes total
Definition: os.hpp:36
std::string nodename
Definition: os.hpp:47
double fifteen
Definition: os.hpp:28
Definition: bytes.hpp:30
Bytes free
Definition: os.hpp:37
double five
Definition: os.hpp:27
std::string machine
Definition: os.hpp:50
Definition: os.hpp:44
double one
Definition: os.hpp:26