LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Disk quota that including database size (http://www.linuxquestions.org/questions/linux-server-73/disk-quota-that-including-database-size-559530/)

cooljai 06-06-2007 02:38 AM

Disk quota that including database size
 
Hi,

I've two centos 4.4 servers. On first, I've implemented disk quotas for users and its running fine. On other server, mysql is running.

I want to monitor the size of database also related to the user and if the size usage (disk quota+db size) reached certain limit, I can do some action (like mail).

for example, I've assigned 10MB disk quota to a user. So when the user has files totaling 8 MB and the database (having size 2 MB) then limit should be enforced or any action will be taken.

Currently, I've idea to create a script that will fetch disk usage by using "repquota" command, get size of database from other server using "show table status" command and then calculate total size and implement the action.

Is it correct way to do this thing. Plz advice and give hint if theres more better way to implement the same.

thanks & regards,

cooljai
-------
ek chota mota hindustani
-------


All times are GMT -5. The time now is 09:07 PM.