Commit 3b158b2
committed
rabbit_env: Enable disksup in os_mon but set threshold to 1.0
Previously we set `start_disksup` to `false` to avoid OTP's automatic
monitoring of disk space. `disksup`'s gen_server starts a port (which
runs `df` on Unix) which measures disk usage and sets an alarm through
OTP's `alarm_handler` when usage exceeds the configured
`disk_almost_full_threshold`. We can set this threshold to 1.0 to
effectively turn off disksup's monitoring (i.e. the alarm will never be
set).
By enabling disksup we have access to `get_disk_data/0` and
`get_disk_info/0,1` which can be used to replace the copied versions in
`rabbit_disk_monitor`.1 parent 7b850f2 commit 3b158b2
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
310 | 315 | | |
311 | 316 | | |
312 | 317 | | |
| |||
0 commit comments