|
|
Read server size
Server Size is a free perl script for reading the size of a web site from any given starting point. You need to enter the absolute path to start the read from. Simply set a starting point, then upload it to a cgi-bin (or any executable folder), CHMOD to 755 in on a unix/linux server then load it in a browser. It will return the total size (in kilobytes) of the directories it reads to two decimal places.
The script reads all sub-directories from the starting point. So if you wanted to read the entire size of your web site, you'd set the starting point to the folder your homepage resides in. To read the size of the entire server (may take a while and require correct permissions be set or that it's run as "root"), set the starting point to "/".
Click here to download Server Size
It's written in a manner that allows you to easily plug in the code (subroutine) to your existing Perl scripts. Then you simply fetch a size using one line :
my $size = &getServerSize("/home/htdocs/web");
|
|
|