|
MikePL
|
 |
« on: March 27, 2003, 07:27:00 AM » |
|
Is there a possibility to check sub domain disk space usage or to set up a quota? I have installed a sub domain for some friends of mine. They are already starting to learn how to make websites, but they are very eager to do it. This is what worries me, because I wouldn't want them to fill up my disk one day. I would be more comforable if I could say 'you've got a 20MB quota for your pages, now leave me alone'
Can I or can't I?
|
|
|
|
|
Logged
|
|
|
|
|
TWebMan
|
 |
« Reply #1 on: March 27, 2003, 08:27:00 AM » |
|
I don't think that function is available. You could possibly create a script to check the size of a directory and chron job it once a day or so, having the script email you if the directory size exceeds a set amount. That's the only thing I can think of. [ March 27, 2003, 04:27 PM: Message edited by: TWebMan ]
|
|
|
|
|
Logged
|
"Computers cause people to make more mistakes than any other invention in history, with the possible exception of handguns and tequila." - Unknown "Liberty of any kind is seldom lost all at once." - D. Hume Every day is an Ode to JoyThe planet will be fine... and so will your site
|
|
|
|
MikePL
|
 |
« Reply #2 on: March 27, 2003, 09:01:00 AM » |
|
Is it hard to do? You know, my web design knowledge doesn't exceed WYSIWYG programs. I've never done any scripts and know nothing about it.
|
|
|
|
|
Logged
|
|
|
|
|
TWebMan
|
 |
« Reply #3 on: March 27, 2003, 09:45:00 AM » |
|
Go to your control panel, click on Chron Jobs.
Click on Standard.
Enter the email address where the output will be sent.
An the "Command to run" field, enter (this is case sensitive!): ls /home/youraccountname/public_html/foldername -s Where foldername is the name of the folder containting the subdomain you want to check. Set it to run like every other day, or once a day, however you think is best. Then click on the "Save Chrontab" button.
What that will do is email you a directory listing showing directory size and file sizes.
If you want to check more than one subdomain (folder inside your public_html) set up another chron job for each one, using the same command. Just indicate the different folder. [ March 27, 2003, 05:45 PM: Message edited by: TWebMan ]
|
|
|
|
|
Logged
|
"Computers cause people to make more mistakes than any other invention in history, with the possible exception of handguns and tequila." - Unknown "Liberty of any kind is seldom lost all at once." - D. Hume Every day is an Ode to JoyThe planet will be fine... and so will your site
|
|
|
|
Joe Blow
|
 |
« Reply #4 on: March 27, 2003, 08:12:00 PM » |
|
Instead of doing a 'ls' command you could do a 'du' command which stands for disk usage.
du -kchs public_html/*/
|
|
|
|
|
Logged
|
|
|
|
|
MikePL
|
 |
« Reply #5 on: March 29, 2003, 04:37:00 PM » |
|
Now could you help me with the frequency settings? I just don't know how to set it to receive messages once a month or once a week. Either I get nothing or I get 300 messages (like today morning). Of course tell me what to input in the advanced mode, that is *0*** etc.
Once a month Once a week
Thanks
|
|
|
|
|
Logged
|
|
|
|
|
TWebMan
|
 |
« Reply #6 on: March 30, 2003, 11:50:00 AM » |
|
You can stick with the standard. Under Minute(s) choose 0 Under hours, pick a time. Under months, chose every month Under days, every day. Under weekdays, pick a day. That would run it once a week.
|
|
|
|
|
Logged
|
"Computers cause people to make more mistakes than any other invention in history, with the possible exception of handguns and tequila." - Unknown "Liberty of any kind is seldom lost all at once." - D. Hume Every day is an Ode to JoyThe planet will be fine... and so will your site
|
|
|
|