Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

:disksup.get_disk_info/1 (from :os_mon) just calls into the underlying OS once, grabs the info, and returns it. It’s not a blocking “long-running monitor” the way a NIF doing I/O in a scheduler thread would be. https://www.erlang.org/docs/26/man/disksup#get_disk_info-1

^ just use this.

:disksup.get_disk_data/0, which caches results in the :disksup server that updates every N seconds (configurable) which is what you are referring to.. https://www.erlang.org/docs/26/man/disksup#get_disk_data-0



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: