blob: 6422541dd7c4f09f6bbebe0aa4a4c04368d1a1f5 [file] [log] [blame]
Thomas Vachuska8ca75a22017-08-24 16:12:59 -07001module openconfig-procmon {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/system/procmon";
7
8 prefix "oc-proc";
9
10
11 // import some basic types
12 import openconfig-extensions { prefix oc-ext; }
13 import openconfig-types { prefix oc-types; }
14
15
16 // meta
17 organization "OpenConfig working group";
18
19 contact
20 "OpenConfig working group
21 www.openconfig.net";
22
23 description
24 "This module provides data definitions for process health
25 monitoring of one or more processes running on the system.";
26
27 oc-ext:openconfig-version "0.2.0";
28
29 revision "2017-07-06" {
30 description
31 "Move to oc-inet types, add IETF attribution, add RADIUS
32 counters, changed password leaf names to indicate hashed";
33 reference "0.2.0";
34 }
35
36 revision "2017-01-29" {
37 description
38 "Initial public release";
39 reference "0.1.0";
40 }
41
42
43 // grouping statements
44
45 grouping procmon-processes-top {
46 description
47 "Top level grouping for attributes for processes.";
48
49 container processes {
50 description
51 "Parameters related to all monitored processes";
52
53 list process {
54 key "pid";
55 config false;
56 description
57 "List of monitored processes";
58
59 leaf pid {
60 type leafref {
61 path "../state/pid";
62 }
63 description
64 "Reference to the process pid key";
65 }
66
67 container state {
68 config false;
69 description
70 "State parameters related to monitored processes";
71
72 uses procmon-process-attributes-state;
73 }
74 }
75 }
76 }
77
78 grouping procmon-process-attributes-state {
79 description
80 "Attributes state definitions for a process";
81
82 leaf pid {
83 type uint64;
84 description
85 "The process pid";
86 }
87
88 leaf name {
89 type string;
90 description
91 "The process name";
92 }
93
94 leaf-list args {
95 type string;
96 description
97 "Current process command line arguments. Arguments with
98 a parameter (e.g., --option 10 or -option=10) should be
99 represented as a single element of the list with the
100 argument name and parameter together. Flag arguments, i.e.,
101 those without a parameter should also be in their own list
102 element.";
103 }
104
105 leaf start-time {
106 type uint64;
107 units "ns";
108 description
109 "The time at which this process started,
110 reported as nanoseconds since the UNIX epoch. The
111 system must be synchronized such that the start-time
112 can be reported accurately, otherwise it should not be
113 reported.";
114 }
115
116 leaf uptime {
117 type oc-types:timeticks64;
118 description
119 "Amount of time elapsed since this process started.";
120 }
121
122 leaf cpu-usage-user {
123 type oc-types:timeticks64;
124 description
125 "CPU time consumed by this process in user mode.";
126 }
127
128 leaf cpu-usage-system {
129 type oc-types:timeticks64;
130 description
131 "CPU time consumed by this process in kernel mode.";
132 }
133
134 leaf cpu-utilization {
135 type oc-types:percentage;
136 description
137 "The percentage of CPU that is being used by the process.";
138 }
139
140 leaf memory-usage {
141 type uint64;
142 units "bytes";
143 description
144 "Bytes allocated and still in use by the process";
145 }
146
147 leaf memory-utilization {
148 type oc-types:percentage;
149 description
150 "The percentage of RAM that is being used by the process.";
151 }
152 }
153
154 // augment statements
155
156 // rpc statements
157
158 // notification statements
159}