1description: >
2    This interface provides the Board Manager Metric values for resource
3    utilization.
4
5properties:
6    - name: Value
7      type: double
8      description: >
9          The current metric value.
10      flags:
11          - readonly
12    - name: MaxValue
13      type: double
14      default: infinity
15      flags:
16          - readonly
17      description: >
18          The maximum supported metric value.
19    - name: MinValue
20      type: double
21      default: -infinity
22      flags:
23          - readonly
24      description: >
25          The minimum supported metric value.
26    - name: Unit
27      type: enum[self.Unit]
28      description: >
29          The unit for metric value. For example, memory in bytes, CPU in
30          percent, reboots in count.
31      flags:
32          - const
33
34enumerations:
35    - name: Unit
36      description: >
37          Metric value unit.
38      values:
39          - name: Bytes
40            description: >
41                Unit to indicate bytes.
42          - name: Count
43            description: >
44                Unit to indicate counts.
45          - name: Percent
46            description: >
47                Unit to indicate percentage.
48
49associations:
50    - name: measuring
51      description: >
52          Metrics measure the inventory item's resource utilization, therefore
53          implement an association to the inventory item.
54      reverse_names:
55          - measured_by
56      required_endpoint_interfaces:
57          - xyz.openbmc_project.Inventory.Item
58
59paths:
60    - namespace: /xyz/openbmc_project/metric
61      description: >
62          The root path for all Metrics.
63      segments:
64          - name: TotalMemory
65            description: >
66                The total memory metric.
67            value: memory/total
68          - name: FreeMemory
69            description: >
70                The free memory metric.
71            value: memory/free
72          - name: AvailableMemory
73            description: >
74                The available memory metric.
75            value: memory/available
76          - name: SharedMemory
77            description: >
78                The shared memory utilization.
79            value: memory/shared
80          - name: BufferedAndCachedMemory
81            description: >
82                The buffered and cached memory memory utilization.
83            value: memory/buffered_and_cached
84          - name: KernelCPU
85            description: >
86                The kernel CPU utilization.
87            value: cpu/kernel
88          - name: UserCPU
89            description: >
90                The user CPU utilization.
91            value: cpu/user
92          - name: TotalCPU
93            description: >
94                The total CPU utilization.
95            value: cpu/total
96          - name: Storage
97            description: >
98                The different types of available storage, such as tmp, var etc.
99                Each storage type will have path relative to storage/, for
100                example storage/tmp for temporary storage.
101            value: storage
102          - name: ReadWriteStorage
103            description: >
104                The available read write storage. This storage path has been
105                explicitly added to the interface file as it gets used in BMCWeb
106                and free storage metric gets exposed via Redfish.
107            value: storage/rw
108          - name: RebootCount
109            description: >
110                Reboot statistic to track number of times device rebooted
111                without failure.
112            value: reboot/count
113          - name: RebootCountWithFailure
114            description: >
115                Reboot statistic to track number of times device rebooted
116                because of a failure.
117            value: reboot/count_with_failure
118    - name: BMC
119      description: >
120          The BMC metrics.
121      value: /xyz/openbmc_project/metric/bmc
122