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

NAME

6       disksup - A Disk Supervisor Process
7

DESCRIPTION

9       disksup  is  a process which supervises the available disk space in the
10       system. It is part of the OS_Mon application, see os_mon(6).  Available
11       for Unix and Windows.
12
13       Periodically  checks  the  disks. For each disk or partition which uses
14       more than a certain amount of the available space, the alarm {{disk_al‐
15       most_full, MountedOn}, []} is set.
16
17         On Unix:
18           All (locally) mounted disks are checked, including the swap disk if
19           it is present.
20
21         On WIN32:
22           All logical drives of type "FIXED_DISK" are checked.
23
24       Alarms are reported to the SASL alarm handler, see alarm_handler(3). To
25       set  an  alarm, alarm_handler:set_alarm(Alarm) is called where Alarm is
26       the alarm specified above.
27
28       The alarms are cleared automatically when the alarm cause is no  longer
29       valid.
30

DATA TYPES

32       time()
33
34              Supported units:
35
36                integer() >= 1:
37                  The time interval in minutes.
38
39                {TimeUnit, Time}:
40                  The  time interval Time in a time unit specified by TimeUnit
41                  where TimeUnit is of the type erlang:time_unit() and Time is
42                  a  positive  integer. The time interval needs to be at least
43                  one millisecond long.
44

CONFIGURATION

46       The following configuration parameters can be used to  change  the  de‐
47       fault values for time interval and threshold:
48
49         disk_space_check_interval = time():
50           The time interval for the periodic disk space check. The default is
51           30 minutes.
52
53         disk_almost_full_threshold = float():
54           The threshold, as percentage of total disk space, for how much disk
55           can  be  utilized before the disk_almost_full alarm is set. The de‐
56           fault is 0.80 (80%).
57
58         disksup_posix_only = bool():
59           Specifies whether the disksup helper process should only use  POSIX
60           conformant  commands  (true)  or not. The default is false. Setting
61           this parameter to true can be necessary on  embedded  systems  with
62           stripped-down  versions  of  Unix  tools like df. The returned disk
63           data and alarms can be different when using this option.
64
65           The parameter is ignored on platforms that  are  known  to  not  be
66           POSIX compatible (Windows and SunOS).
67
68       See config(4) for information about how to change the value of configu‐
69       ration parameters.
70

EXPORTS

72       get_disk_data() -> [DiskData]
73
74              Types:
75
76                 DiskData = {Id, KByte, Capacity}
77                  Id = string()
78                  KByte = int()
79                  Capacity = int()
80
81              Returns the result of the latest disk check. Id is a string that
82              identifies the disk or partition. KByte is the total size of the
83              disk or partition in kbytes. Capacity is the percentage of  disk
84              space used.
85
86              The  function  is asynchronous in the sense that it does not in‐
87              voke a disk check, but returns the latest available value.
88
89              Returns [{"none",0,0}] if disksup is not available.
90
91       get_check_interval() -> MS
92
93              Types:
94
95                 MS = int()
96
97              Returns the time interval, in  milliseconds,  for  the  periodic
98              disk space check.
99
100       set_check_interval(Time) -> ok
101
102              Types:
103
104                 Time = time()
105
106              Changes the time interval for the periodic disk space check.
107
108              The  change will take effect after the next disk space check and
109              is non-persist. That is, in case  of  a  process  restart,  this
110              value  is forgotten and the default value will be used. See Con‐
111              figuration above.
112
113       get_almost_full_threshold() -> Percent
114
115              Types:
116
117                 Percent = int()
118
119              Returns the threshold, in percent, for disk space utilization.
120
121       set_almost_full_threshold(Float) -> ok
122
123              Types:
124
125                 Float = float(), 0=<Float=<1
126
127              Changes the threshold, given as a float, for disk space utiliza‐
128              tion.
129
130              The change will take effect during the next disk space check and
131              is non-persist. That is, in case  of  a  process  restart,  this
132              value  is forgotten and the default value will be used. See Con‐
133              figuration above.
134

SEE ALSO

136       alarm_handler(3), os_mon(3)
137
138
139
140Ericsson AB                      os_mon 2.8.2                       disksup(3)
Impressum