Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
Hello,


I wish to know what includes/calculates the cpanel tag &cpanel Quota=&showquotaused()&&

I think ...

web space on /home/user plus subdirectories
Email usage on all email accounts
MySQL

Is it correct ?
Thank you
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
The showquota used handles everything under /home/user including subs and mail BUT does not do sql space that is calculated with cpanel Mysql=&diskusage()&

Basically the showquota used is doing a du -h in the /home/user area only.

Another to watch is that if you supply PostgreSQL it is also not included in the quota used.
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
[quote:e056e0051a][i:e056e0051a]Originally posted by dgbaker[/i:e056e0051a]

The showquota used handles everything under /home/user including subs and mail BUT does not do sql space that is calculated with cpanel Mysql=&diskusage()&

Basically the showquota used is doing a du -h in the /home/user area only.

Another to watch is that if you supply PostgreSQL it is also not included in the quota used.

[/quote:e056e0051a]

hmm , I don't agree , it should include mysql usage , while I have some doubt on email usage .


Bye
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
An easy way to test is to do the du -h in a /home/user area and compare this with the usage listed in cpanel.

Remember that cpanel uses a seperate tag for mysql usage. And the db's are not stored in the users home area but are all together in the /var/lib/mysql area.

Also if you go into /var/lib/mysql and total up the amount of space used by each user, that should equal the mysql disk usage listed in cpanel.
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
Now one begs to ask the question, what stops someone from creating a massive DB and using tons of disk space? Since mysql db's are not accounted for in allocated disk space for a user, they could actually be using a ton more space then given.

We periodically go to the mysql area and look at the sizes of Databases, if we find any that are way out there in terms of disk space we question the owner.
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
on my box cpanel is able to report mysql usage correctly , I can assure it .

I checked a lot of user and data on
/var/lib/mysql/ and data on cpanel are the same .

For example

du -sk /var/lib/mysql/illdesi
5048

or 5.048 MB

while cpanel says
5.45 MB (MySQL)

I don't know why there is a difference of ~0.40MB however
the error is acceptable .

(all my mysql files are chOwn mysql mysql)

Bye
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
[quote:13def36ce3][i:13def36ce3]Originally posted by Juanra[/i:13def36ce3]

[quote:13def36ce3][i:13def36ce3]Originally posted by Radio_Head[/i:13def36ce3]on my box cpanel is able to report mysql usage correctly , I can assure it .[/quote:13def36ce3]
Yes, it can report it to the byte, but cannot enforce any limits, that's the problem.

# man quota[/quote:13def36ce3]

Yes , it cannot enforce limits , but since on the tag
&cpanel Quota=&showquotaused()&& is included the mysql usage (MB) , if a client goes over I should receive an email advice , I think ...
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
[quote:19e86256bf][i:19e86256bf]Originally posted by dgbaker[/i:19e86256bf]

On our system I just checked several accounts. In all cases &&cpanel Quota=&showquotaused()&& did NOT include any mysql usage info.[/quote:19e86256bf]

I am on red hat 7.2 , and I can assure you that on my box works fine ,&&cpanel Quota=&showquotaused()&& include mysql usage
reported from mysql cpanel tag .

My doubt is only with email , I have some doubt that they are included .
 

jsteel

Well-Known Member
Jul 4, 2002
646
0
166
Atlanta, GA
If in fact it does calculate the total including MySQL, how does it enforce the quota on the MySQL databases for that customer? Since all MySQL data is in a single file in the WHM/CP implementation, I see no possible way of controlling the quota on the DB.

As far as I can tell, if a customer has 125M disk quota, then only those files owned by that customer's UID would be enforced. If the customer has 5 DBs at their disposal, they could easily have all 5 DBs growing in size to multiple gigabytes.

Jaz
 

iain-pczap.net

Active Member
Dec 27, 2002
32
0
156
slightly off topic....but also kinda on topic.

Does anyone have a list/know of a list of all these cpanel commands?

Also a quick once over of what they are called etc coz someone told me they are &api's&.

I know they display info in themes, thats about all :)