Jump to content
xisto Community
Sign in to follow this  
Mjay06

Disk Usage Query

Recommended Posts

The xoops script I installed was taking up nearly all my available disk usage (18.44mb) so I decided to uninstall xoops & start again using a smaller script.I deleted everything relating to xoops, including the mysql database, checked the disk usage screen which showed hardly anything, went to install another script but I am still using 18.44 mb.Am I missing something blatantly obvious which I need to do to lower this?Thanks

Share this post


Link to post
Share on other sites

It takes a while for the statistics script to adjust your stats. The script is only run occasionally, but don't know exactly how often or I would mention it here. Regardless, the stats for your site will be updated the next time the script is run and then you will be able to install additional scripts.

Share this post


Link to post
Share on other sites

or you could create a script to tell you how much disk space has been used on your account (not including database) i learnt how to do it on php.net you can use this code:

function dskspace ($dir){$s = stat ($dir);$space = $s ["blocks"]* 512;if (is_dir ($dir)){$dh = opendir ($dir);while (($file = readdir ($dh)) !==false)if ($file != "." and $file != "..")$space += dskspace ($dir . "/" . $file);closedir ($dh);}return $space;}
the above code is a function and you can use it on many pages if you put it in a file (for example filefunction.php) and include it on which ever page you wish. Then add this code to the page:
include ('filefunction.php');$all = dskspace ('./'); //change this to the directory you want to tell the size of it will give size of that directory and all sub directorys :-)$all = round ($all/1024000,1);$mb = "mb";echo "-Used: $all$mb<br/>";
enjoy :-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.