View Full Version : FREE Ad-on - Shows Disk Usage and Bandwidth for each client and domains. PLESK ONLY
CWDSolutions 01-30-2002, 03:58 PM Hello,
NOTE: This is for Plesk Servers ONLY! NO GD Support Required
Because I was tired of looking in the PSA control panel to see what
the disk usage and bandwidth usage was for clients I decided to
create a small script to tell me!
What this script does:
Shows The following totals for the server:
Total Disk Space Used
Total Bandwidth
Shows Client Contact Name
Shows Domains for client
Each domain shows
- Allocated Disk Space
- Used Disk Space
- Percentage Used
- Allocated Bandwidth
- Used Bandwidth
- Percentage Used
Also For each client it shows:
Total Disk Space Used
Total Bandwidth Used
Other Features:
Allows you to choose how many accounts to show per page
Shows a small Bar graph for the percentages used
Screenshot: http://cwdhost.com/screenshot.gif
If you have any questions email me at: ray@cwdhost.com.
Regards,
Ray
NOTE: Updated, bug fixes and sort feature added!
Host Visions 01-30-2002, 05:40 PM YOU DA MAN!!!!!! :D :D :D
Thanks!!!
Chicken 01-30-2002, 06:29 PM That's might fine of you to post, much thankx...
CWDSolutions 01-30-2002, 06:37 PM Welcome! Might add some other stuff to it at a later
time just don't know when.
Suggestions are welcome if there is anything else you would
like to see it do.
Regards,
Ray
davidb 01-30-2002, 07:09 PM One suggestion would be setit up so you could give it for a specific domain name. Like a quick stats for a users to check what they are using without logging in and viewing the different sections. I would do something like this to it, but I am a perl guy and not much at all php.
Also, is this just me or is this off
Allocated Bandwidth: 3000 MB
Used Bandwidth: 618.88 MB
Percentage Used: 206 %
One final thing:
Warning: Division by zero in /usr/local/psa/home/vhosts/dkbhosting.com/httpdocs/stats/showusage.php on line 199
btw, great script.
CWDSolutions 01-30-2002, 08:17 PM Hello,
Thanks for pointing out the error I missed it. Also for the
suggestion about having it where users can lookup a single
domain.
Made alot of since so I created another file called: showstats.php
which is included in the file attached to the original post.
Now you can use this form to allow anyone to look up the stats
for a domain name by entering there domain name into the
domain field.
Regards,
Ray
thesmallguyshost 01-31-2002, 01:21 AM Originally posted by CWDSolutions
Hello,
Thanks for pointing out the error I missed it. Also for the
suggestion about having it where users can lookup a single
domain.
Made alot of since so I created another file called: showstats.php
which is included in the file attached to the original post.
Now you can use this form to allow anyone to look up the stats
for a domain name by entering there domain name into the
domain field.
Regards,
Ray
thank you very much for your generosity!
AussieHosts 01-31-2002, 12:36 PM Originally posted by CWDSolutions
Suggestions are welcome if there is anything else you would
like to see it do.
We seem to be having some problems with this one Ray. For example, one domain reports:
Allocated Disk Space: 100 MB
Used Disk Space: 114.37 MB
Percentage Used: 14 %
Allocated Bandwidth: 2000 MB
Used Bandwidth: 4582.84 MB
Percentage Used: 29 %
Something out of whack there with the percentages (and the resulting graphs).
Also, what basis is it sorting on? Looks to me like it's the date a domain was added to psa. It'd be nice to sort by domain.
But otherwise, thanks for the contribution. We have anothe one we picked up at the Plesk forums, but it doesn't provide the lookup tool for individuals.
Regards
Gary
CWDSolutions 01-31-2002, 09:50 PM Gary,
Thanks for poiting this out. I will have a look into it and see what
is wrong.
Also the one from the PSA forums should be the same script, it
is just the original one we posted there the one here is updated
with the individual lookups.
Regards,
Ray
AussieHosts 01-31-2002, 10:12 PM Originally posted by CWDSolutions
Also the one from the PSA forums should be the same script
Not unless you work at http://www.tedoc.nl :-)
That's who sent us the script we currently use.
Gary
iamdave 02-02-2002, 04:15 AM thanx
its a very useful script
CWDSolutions 02-02-2002, 07:20 PM Hello everyone,
I have fixed the percentages. As pointed out by Gary they were
a tad bit off if the domain was using more stuff.
Attahced os the new files. The only files that have changed are
the showusage.php and the showstats.php all else is the same.
If you downloaded before please redownload. The division by zero
error has been fixed.
Regards,
Ray
The Realist 02-08-2002, 07:30 PM works well, excellent script M8.
Were is the best place to put it so all hosts have assess?
:confused:
serve-you 02-08-2002, 07:52 PM I'd assume a public directory on your domain.
-Dan
CWDSolutions 02-08-2002, 07:56 PM serve-you is right you can install it in any directory which is accesable to the web.
Regards,
Ray
I installed the script on a test machine in my office. The script is great, I never could understand why Plesk doesn't provide such stats.
But there is one thing... :rolleyes:
This current setup requires Plesk admin username and password to be displayed in a plain text. Definitely NOT secure. Any half competent hacker who has a hosting account on the same server could read that. And there goes the server.
I would strongly advise some other way of authentication, perhaps with sessions/cookies?
Ales
CWDSolutions 02-13-2002, 03:24 AM Sessions or cookies wouldn't be to hard to implement. Having
the information in a text file php file that is, if you try and pull
the config file up in your browser you will only see a blank page
granted you have php setup properly, which Plesk does for you.
You do not have to keep the file in the same directory or in your
document root for that matter you could move it to a different
directory off your document root and call it from there.
Uless your giving users on your server SSH or Telnet access how
do you expect them to read the file?
And if you are giving them SSH or Telnet access them finding that
file is the least you need to worry about.
But for those that wish to use sessions let me know I will change
it to use a login screen instead of it being automatic.
However, if you plan on using the showstats.php file you would
need to either 1. Use the config.php file for your admin information
or 2. give all your clients your admin information so they can check
there status.
We know everyone would choose number 1. Now there is another
method you could use which would be the following:
Create a database user for the psa database and make that user
only have the ability to read from the database as well as only
have access to mysql from a particular IP address. Doing so would
make it where if someone somehow got a hold of the username and
password they would only be able to access the database from
the IP address you have specified for that user.
If you have any other questions let me know.
Regards,
Ray
I agree that PHP safety on a default Plesk server suffices, but there is always Perl...
Plesk already has different levels of login authentication - admin, client and domain user. Could you use this information from psa database to grant restricted access to your script...? Perhaps also restricting the information the script provides at the same time...
Like I said, your script is something Plesk should have provided since long ago and I can only wish Plesk will become more quota/stats friendly in the 2.5 version.
Ales
|