summaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-procmon.yang
blob: fa3bbde03960d692c9bd423040472eac5e17c394 (plain)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
module openconfig-procmon {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/system/procmon";

  prefix "oc-proc";


  // import some basic types
  import openconfig-extensions { prefix oc-ext; }
  import openconfig-types { prefix oc-types; }


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net";

  description
    "This module provides data definitions for process health
    monitoring of one or more processes running on the system.";

  oc-ext:openconfig-version "0.3.0";

  revision "2017-09-18" {
    description
      "Updated to use OpenConfig types modules";
    reference "0.3.0";
  }

  revision "2017-07-06" {
    description
      "Move to oc-inet types, add IETF attribution, add RADIUS
      counters, changed password leaf names to indicate hashed";
    reference "0.2.0";
  }

  revision "2017-01-29" {
    description
      "Initial public release";
    reference "0.1.0";
  }


  // grouping statements

  grouping procmon-processes-top {
    description
      "Top level grouping for attributes for processes.";

    container processes {
      description
        "Parameters related to all monitored processes";

      list process {
        key "pid";
        config false;
        description
          "List of monitored processes";

        leaf pid {
          type leafref {
            path "../state/pid";
          }
          description
            "Reference to the process pid key";
        }

        container state {
          config false;
          description
            "State parameters related to monitored processes";

          uses procmon-process-attributes-state;
        }
      }
    }
  }

  grouping procmon-process-attributes-state {
    description
      "Attributes state definitions for a process";

    leaf pid {
      type uint64;
      description
        "The process pid";
    }

    leaf name {
      type string;
      description
        "The process name";
    }

    leaf-list args {
      type string;
      description
        "Current process command line arguments.  Arguments with
        a parameter (e.g., --option 10  or -option=10) should be
        represented as a single element of the list with the
        argument name and parameter together.  Flag arguments, i.e.,
        those without a parameter should also be in their own list
        element.";
    }

    leaf start-time {
      type uint64;
      units "ns";
      description
        "The time at which this process started,
        reported as nanoseconds since the UNIX epoch.  The
        system must be synchronized such that the start-time
        can be reported accurately, otherwise it should not be
        reported.";
     }

    leaf uptime {
      type oc-types:timeticks64;
      description
        "Amount of time elapsed since this process started.";
    }

    leaf cpu-usage-user {
      type oc-types:timeticks64;
      description
        "CPU time consumed by this process in user mode.";
    }

    leaf cpu-usage-system {
      type oc-types:timeticks64;
      description
        "CPU time consumed by this process in kernel mode.";
    }

    leaf cpu-utilization {
      type oc-types:percentage;
      description
        "The percentage of CPU that is being used by the process.";
    }

    leaf memory-usage {
      type uint64;
      units "bytes";
      description
        "Bytes allocated and still in use by the process";
    }

    leaf memory-utilization {
      type oc-types:percentage;
      description
        "The percentage of RAM that is being used by the process.";
    }
  }

  // augment statements

  // rpc statements

  // notification statements
}