On the Dashboard I see Storage with Photos and Cache. But I really would like to see the free space left on the data location. I think it should not be that difficult, right?
Just my request for 'nice to have' ....
Thanks,
Matthijs
PS .. I did a search on "free space" but was not really helpful :-(
Offline
Determining free and available storage space isn't as easy, if possible at all; think of shared hosting, 12TB free disk space but limited to 50GB in your hosting plan, for example. And no, that's not in ulimit nor in PHP limits.
Of course, if you're interested in the raw free disk capacity then you could add the return value of PHP
disk_free_space($conf['data_location'])
somewhere near the end of admin/intro.php and pass it to the admin/themes/default/template/intro.tpl template similar to what is done for STORAGE_TOTAL and add output code for that to the template.
Offline
Yes, and therefore editing the admin template via LocalFiles Editor would be 'nice to have' as well :-)
Thought I do not see the problem with shared hosting, as the space limit is there in the first place (as volume assigned).
Offline
With your shared hosting maybe, I looked at two different providers and there's no hard volume limit nor a dedicated volume assigned.
You can use this
<?php echo php_uname() . "\n"; echo "Disk: " . disk_free_space('./') . "\n"; echo system('ulimit -a') . "\n"; print_r(posix_getrlimit()); echo "\n"; ?>
PHP code to display your limits from either command line or HTML (then looks better (with linefeeds) when the result is viewed as source..).
Offline
I have cloud shared hosting and it's just a virtual machine with 1 volume, your code gives:
Linux xxxxxxx 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 Disk: 19084845056 time(seconds) unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes) 8192 coredump(blocks) 0 memory(kbytes) unlimited locked memory(kbytes) 245216 process 7480 nofiles 1024 vmemory(kbytes) unlimited locks unlimited rtprio 0 rtprio 0 Array ( [soft core] => 0 [hard core] => 0 [soft data] => unlimited [hard data] => unlimited [soft stack] => 8388608 [hard stack] => unlimited [soft totalmem] => unlimited [hard totalmem] => unlimited [soft rss] => unlimited [hard rss] => unlimited [soft maxproc] => 7480 [hard maxproc] => 7480 [soft memlock] => 251101184 [hard memlock] => 251101184 [soft cpu] => unlimited [hard cpu] => unlimited [soft filesize] => unlimited [hard filesize] => unlimited [soft openfiles] => 1024 [hard openfiles] => 1048576 )
And indeed I have 19 GB free disk space at the moment...
(removed hostname from the output above)
Last edited by matthys (2023-11-13 15:42:47)
Offline
Look for an option free space or disk usage. If this option isn't readily visible, consider exploring settings and you can see from there.
Offline