HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=19)
-   -   Exclude log size from web space statistics (http://www.howtoforge.com/forums/showthread.php?t=50685)

SupuS 26th December 2010 13:14

Exclude log size from web space statistics
 
With setting

Code:

$go_info["server"]["perms_root"]["logs"] = true;
in config file config.inc.php we are able to exclude logs from web quota. But if customer use website space statistics ispconfig still shows statistics with log files size included.

This behaviour we can easily change by modifying "du" command in file:

Code:

/home/admispconfig/ispconfig/lib/plugins/check_webspace.plugin.php
on line 61 or 63 (if you are not use sudo for generating stats). You have to add --exclude=log after --max-depth=1 directive as follows:

Code:

$fd = popen ("sudo du -h --max-depth=1 --exclude=log ".$path_httpd_root."/web".$web_id, "r");
This is dirty hack only. This behaviour should depend on other system variables. I created feature request for this so you can vote for it:

http://bugtracker.ispconfig.org/inde...s&task_id=1450

I hope it will help somebody :)

SupuS


All times are GMT +2. The time now is 23:19.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.