Answer the question
In order to leave comments, you need to log in
How is disk space calculated in the ISPmanager panel?
I understand that in addition to the sites themselves, databases, logs, mail, backups are considered. But why different numbers when counting the same www folder?
If you look through the control panel - Disk Usage - www = 290 MB. If you log in via SSH and watch from the command line = 387 MB. If you just download a backup and compare the size, you get the same 290 MB. What am I doing wrong?
PS The support service has not been able to answer for a day.
Answer the question
In order to leave comments, you need to log in
Dmitry Denisov (technical support):
You are most likely looking at the real size of the files:
du -sh --apparent-size /var/www/vh58712/data
313M /var/www/vh58712/data
The panel calculates the space occupied on the disk:
382M / var/www/vh58712/data
The main reason is the cluster size. Only one file can be written to a cluster. If the cluster size is 4096 bytes, then a file placed in it, say, 100 bytes in size, will occupy 4096 bytes.
#!/bin/bash
CURRENT=$(df / | grep / | awk '{ print $5}' | sed 's/%//g')
THRESHOLD=95
if [ "$CURRENT" -gt "$THRESHOLD" ] ; then
mail -s 'Disk Space Alert' [email protected] << EOF
Your root partition remaining free space is critically low. Used: $CURRENT%
EOF
fi
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question