File: disksup.3

package info (click to toggle)
erlang-manpages 1%3A12.b.3-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,188 kB
  • ctags: 2
  • sloc: makefile: 68; perl: 30; sh: 15
file content (126 lines) | stat: -rw-r--r-- 3,353 bytes parent folder | download
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
.TH disksup 3 "os_mon  2.1.6" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
disksup \- A Disk Supervisor Process
.SH DESCRIPTION
.LP
\fIdisksup\fR is a process which supervises the available disk space in the system\&. It is part of the OS_Mon application, see os_mon(6)\&. Available for Unix and Windows\&.
.LP
Periodically checks the disks\&. For each disk or partition which uses more than a certain amount of the available space, the alarm \fI{{disk_almost_full, MountedOn}, []}\fR is set\&.
.RS 2
.TP 4
.B
On Unix:
All (locally) mounted disks are checked, including the swap disk if it is present\&.
.TP 4
.B
On WIN32:
All logical drives of type "FIXED_DISK" are checked\&.
.RE
.LP
Alarms are reported to the SASL alarm handler, see alarm_handler(3)\&. To set an alarm, \fIalarm_handler:set_alarm(Alarm)\fR is called where \fIAlarm\fR is the alarm specified above\&.
.LP
The alarms are cleared automatically when the alarm cause is no longer valid\&.

.SH CONFIGURATION
.LP
The following configuration parameters can be used to change the default values for time interval and threshold:
.RS 2
.TP 4
.B
\fIdisk_space_check_interval = int()>0\fR:
The time interval, in minutes, for the periodic disk space check\&. The default is 30 minutes\&.
.TP 4
.B
\fIdisk_almost_full_threshold = float()\fR:
The threshold, as percentage of total disk space, for how much disk can be utilized before the \fIdisk_almost_full\fR alarm is set\&. The default is 0\&.80 (80%)\&.
.RE
.LP
See config(4) for information about how to change the value of configuration parameters\&.
.SH EXPORTS
.LP
.B
get_disk_data() -> [DiskData]
.br
.RS
.TP
Types
DiskData = {Id, KByte, Capacity}
.br
Id = string()
.br
KByte = int()
.br
Capacity = int()
.br
.RE
.RS
.LP
Returns the result of the latest disk check\&. \fIId\fR is a string that identifies the disk or partition\&. \fIKByte\fR is the total size of the disk or partition in kbytes\&. \fICapacity\fR is the percentage of disk space used\&.
.LP
The function is asynchronous in the sense that it does not invoke a disk check, but returns the latest available value\&.
.LP
Returns \fI[{"none", 0, 0}]\fR if \fIdisksup\fR is not available\&.
.RE
.LP
.B
get_check_interval() -> MS
.br
.RS
.TP
Types
MS = int()
.br
.RE
.RS
.LP
Returns the time interval, in milliseconds, for the periodic disk space check\&.
.RE
.LP
.B
set_check_interval(Minutes) -> ok
.br
.RS
.TP
Types
Minutes = int()>=1
.br
.RE
.RS
.LP
Changes the time interval, given in minutes, for the periodic disk space check\&.
.LP
The change will take effect after the next disk space check and is non-persistant\&. That is, in case of a process restart, this value is forgotten and the default value will be used\&. See Configuration above\&.
.RE
.LP
.B
get_almost_full_threshold() -> Percent
.br
.RS
.TP
Types
Percent = int()
.br
.RE
.RS
.LP
Returns the threshold, in percent, for disk space utilization\&.
.RE
.LP
.B
set_almost_full_threshold(Float) -> ok
.br
.RS
.TP
Types
Float = float(), 0=<Float=<1
.br
.RE
.RS
.LP
Changes the threshold, given as a float, for disk space utilization\&.
.LP
The change will take effect during the next disk space check and is non-persistant\&. That is, in case of a process restart, this value is forgotten and the default value will be used\&. See Configuration above\&.
.RE
.SH SEE ALSO
.LP
alarm_handler(3), os_mon(3)