Vatu

Member
Mar 31, 2008
17
0
51
Hi Form last 10 days am getting this error daily

Drive Warning: /dev/hda3 (/usr) is 81% full

And daily i have to remove log from domlogs


is there any permanent solution to get rid from this error
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
First, make sure that the apache logs in /usr/local/apache/logs/ are being rotated by logrotated. If not, you should create a file for them in /etc/logrotate.d/

Second, you can move the domlogs to a more spacious partition if you have one, e.g. /home/ and symlink back to the original location:

cp -avf /usr/local/apache/domlogs /home/
rm -Rfv /usr/local/apache/domlogs
ln -s /home/domlogs /usr/local/apache/
/scripts/restartsrv_httpd


Check the new location is being used:

lsof | grep domlogs
 

Vatu

Member
Mar 31, 2008
17
0
51
Thanks Chirpy


Kindly let me know which file i have to create in /etc/logrotate.d/ and what should write there.

Coz ThePlanet support tema told me to make some changes in etc/logrotate.conf file

here is the copy of that file

Code:
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    minsize 1M
    create 0664 root utmp
    rotate 1
}

/usr/local/apache/domlogs/*.log {
missingok
rotate 3
notifempty
daily
compress
sharedscripts
postrotate
/bin/kill -HUP httpd
endscript

}

/usr/local/apache/logs/*_log {
missingok
notifempty
compress
sharedscripts
postrotate
/bin/kill -HUP httpd
endscript
}
# system-specific logs may be also be configured here.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
The second half of that is fine, however you should not rotate the domlogs using logrotate otherwise it will likely break your cPanel client stats (i.e, bandwidth, awstats, analog, webalizer, etc).
 

Vatu

Member
Mar 31, 2008
17
0
51
The second half of that is fine, however you should not rotate the domlogs using logrotate otherwise it will likely break your cPanel client stats (i.e, bandwidth, awstats, analog, webalizer, etc).
So Kindly Help Me What to do

Am the Newbie to dedicated
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
Use your favourite search engine on how to use logrotate. There's plenty of information in the man page that explains how it works:

man logrotate
 

Vatu

Member
Mar 31, 2008
17
0
51
Use your favourite search engine on how to use logrotate. There's plenty of information in the man page that explains how it works:

man logrotate
I already done so many serach but don,t which files i have to change and what are the changes i have to made
 
Last edited: