/
cpuinfo.sandesh
76 lines (66 loc) · 1.65 KB
/
cpuinfo.sandesh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
/**
* Definitions of structures used to send CPU and Memory information of the
* processes and the system
*/
request sandesh CpuLoadInfoReq {
}
struct CpuLoadAvg {
1: double one_min_avg;
2: double five_min_avg;
3: double fifteen_min_avg;
}
struct MemInfo {
1: u32 virt;
2: u32 peakvirt;
3: u32 res;
}
struct SysMemInfo {
1: u32 total;
2: u32 used;
3: u32 free;
4: u32 buffers;
5: u32 cached;
}
/**
* This structure carries
* - process's information - in meminfo and cpu_share
* - system's information in sys_mem_info and cpuload
*/
struct CpuLoadInfo {
1: u32 num_cpu;
5: optional SysMemInfo sys_mem_info;
2: MemInfo meminfo;
3: optional CpuLoadAvg cpuload;
4: double cpu_share;
}
response sandesh CpuLoadInfoResp {
1: CpuLoadInfo cpu_info;
}
/**
* This structure carries process's memory and cpu information,
* this is used to store cpu and memory statistics on a per process basis
*/
struct ProcessCpuInfo {
1: string module_id // deprecated
2: string inst_id // deprecated
3: u32 mem_virt
4: double cpu_share
5: u32 mem_res
}
struct SystemCpuInfo {
1: u32 num_socket;
2: u32 num_cpu;
3: u32 num_core_per_socket;
4: u32 num_thread_per_core;
}
/**
* This structure carries system memory and cpu information
*/
struct SystemMemCpuUsage {
1: SysMemInfo mem_info;
2: CpuLoadAvg cpu_load;
3: double cpu_share;
}