Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Free bytes vs Avail bytes in Node Exporter

I am using Node Exporter on Ubuntu. I want to calculate the used / free disk space percentage. For the total disk space, I am taking the value of "node_filesystem_size_bytes". But, for the free space, which one of these should I take - "node_filesystem_avail_bytes" or "node_filesystem_free_bytes"?

like image 909
awesomemypro Avatar asked Dec 10 '22 01:12

awesomemypro


1 Answers

"node_filesystem_avail_bytes" shows the available space you have as a user and the "node_filesystem_free_bytes" is the "physical" free space which includes the reserved space for root.

So:

node_filesystem_avail_bytes = node_filesystem_free_bytes - root reserved space

node_filesystem_avail_bytes < node_filesystem_free_bytes

like image 192
Marcelo Ávila de Oliveira Avatar answered Feb 20 '23 20:02

Marcelo Ávila de Oliveira