0
Under review

Linux Disk Usage Showing 0 when it is over 80%

DamianMurphy 5 years ago updated by Ilya (Here to help) 5 years ago 4

Using a linux agent on Ubuntu (3.13.0-61-generic) x86_64. The disk usage on / is currently 84% but disk usage is showing 0%. The volume has 1.2 GB available and is fairly static. But free space only shows 1 GB and wants alerts in GB (not MB). I can not set a useful alert on this volume

Under review

Hi,


Disk usage monitor is the percentage of time that storage device was read from or written to over a sample period of time. Please indicate how you measure disk usage.

About wrong disk space. Please execute df -h command in console and copy output.

To set tresholds less than 1gb use fractional number, like 0.8GB

root@XXXXX:/boot# df -h

Filesystem Size Used Avail Use% Mounted on

udev 3.9G 12K 3.9G 1% /dev

tmpfs 799M 556K 798M 1% /run

/dev/mapper/XXXXX--vg-root 7.5G 6.0G 1.2G 84% /

none 4.0K 0 4.0K 0% /sys/fs/cgroup

none 5.0M 0 5.0M 0% /run/lock

none 3.9G 53M 3.9G 2% /run/shm

none 100M 0 100M 0% /run/user

/dev/sda3 788G 1.6G 746G 1% /var/www

/dev/sda1 236M 98M 126M 44% /boot



For this it identifies / but it says disk usage is 0.00 and free space is 1.00 Since it is "1.2" I wonder if it is actually across the decimal points.


On the other system we see the following:


root@XXXXX:/var/www# df -h

Filesystem Size Used Avail Use% Mounted on

udev 3.9G 12K 3.9G 1% /dev

tmpfs 799M 544K 798M 1% /run

/dev/mapper/XXXXXX--vg-root 15G 7.7G 6.0G 57% /

none 4.0K 0 4.0K 0% /sys/fs/cgroup

none 5.0M 0 5.0M 0% /run/lock

none 3.9G 38M 3.9G 1% /run/shm

none 100M 0 100M 0% /run/user

/dev/sda1 236M 89M 136M 40% /boot

/dev/sda3 788G 1.9G 746G 1% /var/www


But disk usage seems to fluctuate for / between 0.00 and 0.06. Is this actually trying to show %busy or similar? But sysstat package is not installed. But this number appears to fluctuate with activity on the box more than the amount of space used.



Hi,


To represent value for chart we round value. Thant's why you see 1GB on the chart but it is only for representation. Thresholds works without round up/down. So, if you set thresholds that the value must be more then 1.1GB our system will not show error because you real disk space more than 1.1GB.


About disk usage we read /proc/diskstats to calculate disk usage. And we calculate average value for monitor period. So, if you have monitor with period 1 minute disk usage will be average value for 1 minute. You can read about our disk usage here https://anturis.com/monitors/disk-usage-monitor/