Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 2nd January 2009, 20:23
chillifire chillifire is offline
HowtoForge Supporter
 
Join Date: Oct 2007
Posts: 75
Thanks: 3
Thanked 3 Times in 3 Posts
Default Log file housekeeping question

After 1 year of very safe and relliable operations I start looking at some housekeeping on my Ubuntu servers. In particular I noticed the ever growing log files in var/log (ls -l output below). There is no way I am interested in looking at these detailed logs for stuff that happened motnhs ago, so in my view these are - literally - waste of space.

The same question for the log files that build up in ISPConfig's /var/www/webx/log directory. Can old files and directories in there be deleted safely?

Questions:
Can I just remove them or what is the correct way to dispose of old log files?
Is there any way to delete and remove logfiles and logile entries that are older than a month by adjusting some configuration settings?

Any hints welcome.


Code:
-rw-r----- 1 syslog adm    640678 Jan  3 08:17 auth.log
-rw-r----- 1 syslog adm    706225 Dec 28 06:47 auth.log.0
-rw-r----- 1 syslog adm     48111 Dec 21 06:47 auth.log.1.gz
-rw-r----- 1 syslog adm     43800 Dec 14 06:47 auth.log.2.gz
-rw-r----- 1 syslog adm     46787 Dec  7 06:47 auth.log.3.gz
-rw-r----- 1 syslog adm     45194 Apr  6  2008 auth.log.4.gz
-rw-r----- 1 syslog adm    186268 Feb 25  2008 auth.log.5.gz
-rw-r----- 1 syslog adm     48736 Feb 17  2008 auth.log.6.gz
-rw-r----- 1 syslog adm    866574 Jan  3 08:18 daemon.log
-rw-r----- 1 syslog adm  14179384 Jan  3 06:53 daemon.log.0
-rw-r----- 1 syslog adm   3268667 Jan  2 07:12 daemon.log.1.gz
-rw-r----- 1 syslog adm    625527 Jan  1 06:47 daemon.log.2.gz
-rw-r----- 1 syslog adm   1695886 Dec 31 06:50 daemon.log.3.gz
-rw-r----- 1 syslog adm    953395 Dec 30 06:57 daemon.log.4.gz
-rw-r----- 1 syslog adm    610760 Dec 29 06:46 daemon.log.5.gz
-rw-r----- 1 syslog adm    575304 Dec 28 06:47 daemon.log.6.gz
-rw-r----- 1 syslog adm      1174 Dec 18 19:45 debug.0
-rw-r----- 1 syslog adm       222 Nov 21 10:08 debug.1.gz
-rw-r----- 1 syslog adm       214 Oct 23 03:27 debug.2.gz
-rw-r----- 1 syslog adm       222 Sep 17 01:40 debug.3.gz
-rw-r----- 1 root   root     2164 Dec 28 06:47 denyhosts.1.gz
-rw-r----- 1 root   root     3253 Dec 21 06:47 denyhosts.2.gz
-rw-r----- 1 root   root     1918 Dec 14 05:25 denyhosts.3.gz
-rw-r----- 1 root   root     1929 Dec  7 05:21 denyhosts.4.gz
-rw-r----- 1 root   root     2098 Nov 30 05:11 denyhosts.5.gz
-rw-r----- 1 root   root     1877 Nov 23 03:52 denyhosts.6.gz
-rw-r----- 1 root   root     1952 Nov 15 20:03 denyhosts.7.gz
-rw-r----- 1 root   adm      4302 Dec 17 02:15 dmesg.0
-rw-r----- 1 root   adm      2112 Nov 21 10:08 dmesg.1.gz
-rw-r----- 1 root   adm      2130 Sep 17 01:40 dmesg.2.gz
-rw-r----- 1 root   adm      1973 Aug 23 15:46 dmesg.3.gz
-rw-r----- 1 root   adm      1972 May 26  2008 dmesg.4.gz
-rw-r----- 1 root   adm      8066 Jan  1 16:03 dpkg.log
-rw-r----- 1 root   adm     16919 Feb 29  2008 dpkg.log.10.gz
-rw-r----- 1 root   adm     36451 Dec 18 19:29 dpkg.log.2.gz
-rw-r----- 1 root   adm      1026 Oct 16 12:17 dpkg.log.3.gz
-rw-r----- 1 root   adm       274 Sep 24 22:45 dpkg.log.4.gz
-rw-r----- 1 root   adm      5481 Sep  9 11:18 dpkg.log.5.gz
-rw-r----- 1 root   adm      3202 Jun 10  2008 dpkg.log.6.gz
-rw-r----- 1 root   adm     30100 May 28  2008 dpkg.log.7.gz
-rw-r----- 1 root   adm       652 Apr 16  2008 dpkg.log.8.gz
-rw-r----- 1 root   adm      2119 Mar 26  2008 dpkg.log.9.gz
-rw-r--r-- 1 root   root   480096 Jun  3  2008 faillog
-rw-r--r-- 1 root   root      553 Dec 18 19:23 fontconfig.log
-rw-r--r-- 1 root   root    41001 May  9  2008 ispconfig_install.log
-rw-r--r-- 1 root   root      162 Dec  6  2007 ispconfig_tee.log
-rw-r----- 1 syslog adm      9881 Jan  3 06:53 kern.log
-rw-r----- 1 syslog adm      9772 Dec 27 06:51 kern.log.0
-rw-r----- 1 syslog adm      4236 Dec 20 06:55 kern.log.1.gz
-rw-r----- 1 syslog adm       896 Dec 14 06:43 kern.log.2.gz
-rw-r----- 1 syslog adm       881 Dec  7 06:39 kern.log.3.gz
-rw-r----- 1 syslog adm      5065 Mar  9  2008 kern.log.4.gz
-rw-r----- 1 syslog adm       272 Feb 22  2008 kern.log.5.gz
-rw-rw-r-- 1 root   utmp  5841168 Jan  3 08:07 lastlog
-rw-r----- 1 syslog adm         0 Oct 23  2007 lpr.log
-rw-r----- 1 syslog adm      3087 Dec 10 20:49 mail.err.0
-rw-r----- 1 syslog adm       183 Dec  4 15:04 mail.err.1.gz
-rw-r----- 1 syslog adm       147 Nov 25 07:47 mail.err.2.gz
-rw-r----- 1 syslog adm       119 Nov 11 12:52 mail.err.3.gz
-rw-r----- 1 syslog adm   1167360 Jan  3 06:53 mail.info.0
-rw-r----- 1 syslog adm     70574 Dec 31 06:50 mail.info.1.gz
-rw-r----- 1 syslog adm     48604 Dec 28 06:46 mail.info.2.gz
-rw-r----- 1 syslog adm    115274 Dec 26 07:04 mail.info.3.gz
-rw-r----- 1 syslog adm     83341 Dec 23 06:54 mail.info.4.gz
-rw-r----- 1 syslog adm    123039 Dec 21 06:46 mail.info.5.gz
-rw-r----- 1 syslog adm     37990 Dec 14 06:43 mail.info.6.gz
-rw-r----- 1 syslog adm     22275 Jan  3 08:17 mail.log
-rw-r----- 1 syslog adm   1178571 Jan  3 06:53 mail.log.0
-rw-r----- 1 syslog adm     70968 Dec 31 06:50 mail.log.1.gz
-rw-r----- 1 syslog adm     87627 Dec 28 06:46 mail.log.2.gz
-rw-r----- 1 syslog adm     78807 Dec 25 06:58 mail.log.3.gz
-rw-r----- 1 syslog adm     84634 Dec 23 06:54 mail.log.4.gz
-rw-r----- 1 syslog adm     42300 Dec 21 06:46 mail.log.5.gz
-rw-r----- 1 syslog adm    105194 Dec 18 06:32 mail.log.6.gz
-rw-r----- 1 syslog adm    165764 Dec 28 05:38 mail.warn.0
-rw-r----- 1 syslog adm     16452 Dec 21 06:44 mail.warn.1.gz
-rw-r----- 1 syslog adm      9522 Dec 14 06:43 mail.warn.2.gz
-rw-r----- 1 syslog adm     15006 Dec  7 06:39 mail.warn.3.gz
-rw-r----- 1 syslog adm      6346 Apr 13  2008 mail.warn.4.gz
-rw-r----- 1 syslog adm      8258 Apr  6  2008 mail.warn.5.gz
-rw-r----- 1 syslog adm     28744 Dec 28 06:27 messages.0
-rw-r----- 1 syslog adm      6263 Dec 21 06:46 messages.1.gz
-rw-r----- 1 syslog adm      2515 Dec 14 06:43 messages.2.gz
-rw-r----- 1 syslog adm      2466 Dec  7 06:39 messages.3.gz
-rw-r----- 1 syslog adm      6709 Mar  9  2008 messages.4.gz
-rw-r----- 1 syslog adm      1779 Feb 24  2008 messages.5.gz
-rw-r----- 1 mysql  adm     18805 Jan  3 08:15 mysql.log
-rw-r----- 1 mysql  adm     41968 Jan  3 06:50 mysql.log.1.gz
-rw-r----- 1 mysql  adm     54382 Jan  2 07:10 mysql.log.2.gz
-rw-r----- 1 mysql  adm     45398 Jan  1 06:45 mysql.log.3.gz
-rw-r----- 1 mysql  adm     37370 Dec 31 06:50 mysql.log.4.gz
-rw-r----- 1 mysql  adm     42877 Dec 30 06:55 mysql.log.5.gz
-rw-r----- 1 mysql  adm     37293 Dec 29 06:45 mysql.log.6.gz
-rw-r----- 1 mysql  adm     34707 Dec 28 07:10 mysql.log.7.gz
-rw-r--r-- 1 root   root        0 Mar  4  2008 pycentral.log
-rw-r----- 1 syslog adm    896371 Jan  3 08:18 syslog
-rw-r----- 1 syslog adm  14659477 Jan  3 06:53 syslog.0
-rw-r----- 1 syslog adm   3415037 Jan  2 07:12 syslog.1.gz
-rw-r----- 1 syslog adm    707434 Jan  1 06:47 syslog.2.gz
-rw-r----- 1 syslog adm   1799873 Dec 31 06:50 syslog.3.gz
-rw-r----- 1 syslog adm   1045131 Dec 30 06:57 syslog.4.gz
-rw-r----- 1 syslog adm    674186 Dec 29 06:46 syslog.5.gz
-rw-r----- 1 syslog adm    688040 Dec 28 07:10 syslog.6.gz
-rw-r----- 1 syslog adm         0 Dec 21 06:47 user.log
-rw-r----- 1 syslog adm      5040 Dec 18 19:01 user.log.0
-rw-r----- 1 syslog adm       322 Nov 21 10:09 user.log.1.gz
-rw-r----- 1 syslog adm       323 Sep 17 01:41 user.log.2.gz
-rw-r----- 1 syslog adm       995 Aug 23 15:46 user.log.3.gz
-rw-r--r-- 1 root   root 14383099 Dec 25 20:39 xferlog

Last edited by chillifire; 2nd January 2009 at 20:45.
Reply With Quote
Sponsored Links
  #2  
Old 2nd January 2009, 20:43
marpada marpada is offline
Senior Member
 
Join Date: Sep 2008
Posts: 139
Thanks: 2
Thanked 14 Times in 14 Posts
Default

If you're 100% sure you won't need it you can delete them. Backing them up to DVD-R won't hurt either
________
Bdsm french
________
Marijuana Vaporizer

Last edited by marpada; 13th May 2011 at 02:03.
Reply With Quote
  #3  
Old 5th January 2009, 19:19
chipsafts chipsafts is offline
Senior Member
 
Join Date: Nov 2007
Posts: 184
Thanks: 2
Thanked 6 Times in 6 Posts
Default

find the cron scripts that are doing the log rotations and adjust them [ after backing up the scripts ]
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix delivery problem erebus Installation/Configuration 8 29th July 2014 20:17
directories in /home/admispconfig/ispconfig renamed? Spudchat General 10 12th April 2007 19:37
Chroot SSH + ISPConfig Norman Installation/Configuration 27 26th March 2007 03:40
64-bit Debian 3.1 Install Issue naruto Installation/Configuration 14 5th September 2006 04:12
Debian install error jf1976 Installation/Configuration 25 19th January 2006 22:31


All times are GMT +2. The time now is 02:21.


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