# disksup

### MODULE

disksup

### MODULE SUMMARY

A Disk Supervisor Process.

### DESCRIPTION

`disksup` is part of the `os_mon` application and all configuration parameters are defined in the reference documentation for the `os_mon` application.

`disksup` is a process which supervises the available disk space in the system. Once every `disk_space_check_interval` minutes, the disks are checked and an alarm is generated for each disk which uses more than the `disk_almost_full_threshold` of available space.

On UNIX
  All (locally) mounted disks are checked, including the swap disk if it is present.
On WIN32
  All logical drives of type "FIXED_DISK" are checked.

The `disksup` process defines one alarm which it sends using `alarm_handler:set_alarm(Alarm)`. `Alarm` is defined as follows:

`{{disk_almost_full, MountedOn}, []}`
  This alarm is sent when a disk uses more than `disk_almost_full_threshold` of its available disk space, and it is cleared automatically when `disksup` observes that the disk space is back to normal.

### EXPORTS

`get_check_interval() -> Time`

Types:

`Time = integer()`

Time interval, in milliseconds, which defined how often the disks are checked.

`get_disk_data() -> [DiskData]`

Types:

`DiskData = {Id, KByte, Capacity}`
`Id = string()`
`KByte = integer()`
`Capacity = integer()`

Gets data for the system disks or partitions. `Id` is a string that identifies the disk or partition. `KByte` is the total size of the disk or partition in kbytes. `Capacity` is the percentage of disk space used.

`get_almost_full_threshold() -> integer()`

Threshold as a percentage of the available disk space. It specifies how much disk space can be used by each disk or partition before an alarm is sent.

### See Also

alarm_handler(3), os_mon(3)

### AUTHORS

Martin Björklund - support@erlang.ericsson.se
Peter Högfeldt - support@erlang.ericsson.se

os_mon 1.7.2
Copyright © 1991-2005 Ericsson AB