I should to develop a web-application in php for a firm, and I need to know the disk free space of the server.
At the moment, I'm able to obtain the free disk space of this kind :
$quota="104857600"; //100Mb : (100*1024*1024)
after, I do the difference between $quota and my size variable.
So, in this case, I must to write the disk size directly in the php file...
It's possible to do the disk capacity ?
Disk space, also known as storage or web space, is the amount of room on a server available to store the content (text, images, code, databases, etc.)
Servers operate in terms of terabytes (TB), each of which is equal to roughly 1000 GB. For a smaller company with a couple dozen staff, a single 2TB server will be sufficient for the documentation you'll be handling. Larger companies will want to upgrade to higher capacity servers, often employing several over time.
That command is df -H. The -H switch is for human-readable format. The output of df -H will report how much space is used, available, percentage used, and the mount point of every disk attached to your system (Figure 1).
disk_free_space - Will return you the number of bytes available on the filesystem or disk partition.
disk_total_space - Will return you the number of total bytes (i.e. capacity) on the filesystem or disk partition.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With