blob: 848a54e48129a9342e37729f3d40239e7adb73c6 [file] [log] [blame]
Brandon Kimdab96f12021-02-18 11:21:37 -08001// Copyright 2021 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Sui Chen03eba282021-02-11 11:35:56 -080015syntax = "proto3";
16
17package bmcmetrics.metricproto;
18
19message BmcMemoryMetric {
20 int32 mem_available = 1;
21 int32 slab = 2;
22 int32 kernel_stack = 3;
23}
24
25message BmcUptimeMetric {
26 float uptime = 1; // Uptime (wall clock time)
27 float idle_process_time = 2; // Idle process time across all cores
28}
29
30message BmcDiskSpaceMetric {
31 int32 rwfs_kib_available = 1; // Free space in RWFS in KiB
32}
33
34// The following messages use string tables to save space
35message BmcProcStatMetric {
36 message BmcProcStat {
37 int32 sidx_cmdline = 1; // complete command line
38 float utime = 2; // Time (seconds) in user mode
39 float stime = 3; // Time (seconds) in kernel mode
40 }
41 repeated BmcProcStat stats = 10;
42}
43
44message BmcFdStatMetric {
45 message BmcFdStat {
46 int32 sidx_cmdline = 1; // complete command line
47 int32 fd_count = 2; // count of open FD's
48 }
49 repeated BmcFdStat stats = 10;
50}
51
52message BmcStringTable {
53 message StringEntry {
54 string value = 1;
55 }
56 repeated StringEntry entries = 10;
57}
58
59message BmcMetricSnapshot {
60 BmcStringTable string_table = 1;
61 BmcMemoryMetric memory_metric = 2;
62 BmcUptimeMetric uptime_metric = 3;
63 BmcDiskSpaceMetric storage_space_metric = 4;
64 BmcProcStatMetric procstat_metric = 5;
65 BmcFdStatMetric fdstat_metric = 6;
66}