1scheduler(3)               Erlang Module Definition               scheduler(3)
2
3
4

NAME

6       scheduler - Measure scheduler utilization
7

DESCRIPTION

9       This  module contains utility functions for easier measurement and cal‐
10       culation of scheduler utilization, otherwise obtained from calling  the
11       more primitive statistics(scheduler_wall_time).
12
13       The simplest usage is to call scheduler:utilization(Seconds).
14

DATA TYPES

16       sched_sample()
17
18       sched_type() = normal | cpu | io
19
20       sched_id() = integer()
21
22       sched_util_result() =
23           [{sched_type(), sched_id(), float(), string()} |
24            {total, float(), string()} |
25            {weighted, float(), string()}]
26
27              A list of tuples containing results for individual schedulers as
28              well as aggregated averages. Util is the  scheduler  utilization
29              as  a  floating  point value between 0.0 and 1.0. Percent is the
30              same utilization as a more human readable  string  expressed  in
31              percent.
32
33                {normal, SchedulerId, Util, Percent}:
34                  Scheduler  utilization  of  a  normal  scheduler with number
35                  SchedulerId.
36
37                {cpu, SchedulerId, Util, Percent}:
38                  Scheduler utilization of a dirty-cpu scheduler  with  number
39                  SchedulerId.
40
41                {io, SchedulerId, Util, Percent}:
42                  Scheduler  utilization  of  a dirty-io scheduler with number
43                  SchedulerId. This tuple will only exist if both samples were
44                  taken with sample_all/0.
45
46                {total, Util, Percent}:
47                  Total utilization of all normal and dirty-cpu schedulers.
48
49                {weighted, Util, Percent}:
50                  Total  utilization  of  all normal and dirty-cpu schedulers,
51                  weighted against maximum amount of available CPU time.
52

EXPORTS

54       sample() -> sched_sample()
55
56              Return a scheduler utilization sample for normal  and  dirty-cpu
57              schedulers.
58
59       sample_all() -> sched_sample()
60
61              Return  a  scheduler  utilization  sample  for  all  schedulers,
62              including dirty-io schedulers.
63
64       utilization(Seconds) -> sched_util_result()
65
66              Types:
67
68                 Seconds = integer() >= 1
69
70              Measure utilization for normal and dirty-cpu  schedulers  during
71              Seconds seconds, and then return the result.
72
73       utilization(Sample) -> sched_util_result()
74
75              Types:
76
77                 Sample = sched_sample()
78
79              Calculate scheduler utilizations for the time interval from when
80              Sample was taken and "now". The same as  calling  scheduler:uti‐
81              lization(Sample, scheduler:sample_all()).
82
83       utilization(Sample1, Sample2) -> sched_util_result()
84
85              Types:
86
87                 Sample1 = Sample2 = sched_sample()
88
89              Calculates  scheduler utilizations for the time interval between
90              the two samples obtained from calling sample/0 or sample_all/0.
91
92
93
94Ericsson AB                   runtime_tools 1.14                  scheduler(3)
Impressum