summaryrefslogtreecommitdiff
path: root/src/system.proto
blob: eee94a8278cb64bbc09ee33b3fa5623d108a93e6 (plain) (blame)
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
77
78
79
80
81
82
83
84
syntax = "proto3";
package Entry;

message System {
	uint64	  epoch = 1;
	CPUStats	cpu = 2;
	MEMStats	mem = 3;
	TEMPStats	tmp = 4;
	repeated Block blks = 5;
}

message CPUStats {
	message Core {
		double	usage = 1;
		fixed32 clock = 2;
	}

	message Subsystem {
		double diff = 1;
		double curr = 2;
	}

	Core base = 1;
	map<string, Subsystem> subsystem = 2;
	map<fixed32, Core> cores = 3;
}

message MEMStats {
	fixed64 total = 1;
	fixed64 avail = 2;
	fixed64 cache = 3;
	fixed64 share = 4;
	fixed64 tswap = 5;
	fixed64 uswap = 6;
}

message TEMPStats {
	fixed32 cur = 1;
	fixed32 min = 2;
	fixed32 max = 3;
	fixed32 avg = 4;
}

message Block {
	message Part {
		enum FSType {
			NONE = 0;
			EXT2 = 1;
			EXT3 = 2;
			EXT4 = 3;
			NTFS = 4;
			FAT32 = 5;
			XFS = 6;
			BTRFS = 7;
			APFS = 8;
			HFS_PLUS = 9;
			EXFAT = 10;
			ZFS = 11;
			SWAP = 12;
			LVM_PV = 13;
		}

		fixed64 size = 1;
		fixed64 free = 2;
		bool	open = 3;
		string	path = 4;
		FSType  fmt  = 5;
	}

	enum TableType {
		NONE = 0;
		MBR  = 1;
		GPT  = 2;
		APM  = 3;
		BSD  = 4;
	}

	string  name	= 1;
	TableType fmt	= 2;
	fixed64 bread	= 3;
	fixed64 bwrite	= 4;
	fixed32 parts	= 5;
	map<fixed32, Part> part = 6;
}