View Full Version : Help: Why clean log files?
Gomer
04-02-2002, 01:52 PM
I installed 25xtreme, touched subtest, and all has been running fine for about a month. Today I read about "cleaning my log files" or my hack directory may be deleted or something.
Can someone explain this to me in plain English? Do I need to do anything? What and why?
I don't know anything about linux, so cryptic code and scripts will not help me.
Thanks for any "layman's" instructions or advice.
I'd be interested too. I used xtreme in November, looked at the logs in /var/log today, and saw about 1.5 meg of files dated today. If that's all they have grown since November, do we need to really get rid of them daily?
Thanks,
Rob
superzap
04-02-2002, 04:07 PM
You'll need to install a script so the log files don't fill up your var partition.
http://dealdatabase.com/forum/showthread.php?s=&threadid=7911
RobK,
Are you sure you don't already have something controlling the log files, like rm -f /var/log in rc.sysinit? Otherwise, without the service phone call the log files will continue to grow.
Superzap-
All I did in November was use xtreme on a 40 gig Maxtor, and did the "touch" with TeraTerm, never made any other changes. After reading a bit this afternoon, and being bored, I fired up TeraTerm to look at the logs. I can't get to that computer right now, but the files are dated today, someting like TV.log, etc., were all small. The largest file was about 500K. I can post a dir later if you want. Is /var/logs the only place the logs would be? Sorry, but I'm a Linux dummy.
Rob
Superzap,
I appreciate your input on this matter. Here is the directory listing of my drive. As you can see, the hack files are dated Nov 14, and the logs are dated today. No modifications other than xtreme, no phone connected. Thanks.
bash-2.02# cd /var/hack
bash-2.02# dir
total 1421
drwxr-xr-x 14 0 0 1024 Jan 1 1970 ..
drwxr-xr-x 2 0 0 1024 Nov 14 18:54 .
-rw-r--r-- 1 0 0 190 Nov 14 19:00 .bashrc
-rwxr-xr-x 1 0 0 33677 Nov 14 19:00 chattr
-rwxr-xr-x 1 0 0 28920 Nov 14 19:00 cksum
-rwxr-xr-x 1 0 0 55708 Nov 14 19:00 dir
-rwxr-xr-x 1 0 0 40700 Nov 14 19:00 ed
-rwxr-xr-x 1 0 0 1321 Nov 14 19:00 fixsub.tcl
-rwxr-xr-x 1 0 0 30696 Nov 14 19:00 head
-rwxr-xr-x 1 0 0 236076 Nov 14 19:00 joe
-rwxr-xr-x 1 0 0 17169 Nov 14 19:00 joerc
-rwxr-xr-x 1 0 0 38628 Nov 14 19:00 join
-rwxr-xr-x 1 0 0 321656 Nov 14 19:00 ls
-rwxr-xr-x 1 0 0 30285 Nov 14 19:00 lsattr
-rwxr-xr-x 1 0 0 28028 Nov 14 19:00 nice
-rwxr-xr-x 1 0 0 50452 Nov 14 19:00 ps
-rwxr-xr-x 1 0 0 20527 Nov 14 19:00 rc.sysinit
-rwxr-xr-x 1 0 0 27452 Nov 14 19:00 rmdir
-rwxr-xr-x 1 0 0 130308 Nov 14 19:00 strace
-rwxr-xr-x 1 0 0 39480 Nov 14 19:00 tail
-rwxr-xr-x 1 0 0 131110 Nov 14 19:00 tivoprom.205
-rwxr-xr-x 1 0 0 43980 Nov 14 19:00 touch
-rwxr-xr-x 1 0 0 29208 Nov 14 19:00 uptime
-rwxr-xr-x 1 0 0 82979 Nov 14 19:00 TClient-lib.itcl
bash-2.02# cd /var/log
bash-2.02# dir
total 1903
drwxr-xr-x 14 0 0 1024 Jan 1 1970 ..
-rw-r--r-- 1 0 0 0 Jan 1 1970 secure
-rw-r--r-- 1 0 0 0 Jan 1 1970 maillog
-rw-r--r-- 1 0 0 0 Jan 1 1970 Okdebug
-rw-r--r-- 1 0 0 0 Jan 1 1970 Otvdebuglog
-rw-r--r-- 1 0 0 7147 Jan 30 04:14 Omessages
-rw-r--r-- 1 0 0 32026 Jan 30 04:14 Okernel
-rw-r--r-- 1 0 0 12370 Jan 30 04:14 Otvlog
-rw-r--r-- 1 0 0 110 Jan 30 04:14 Otverr
-rw-r--r-- 1 0 0 0 Jan 30 04:14 kdebug
-rw-r--r-- 1 0 0 0 Jan 30 04:14 tvdebuglog
-rw-r--r-- 1 0 0 0 Apr 1 16:40 http
-rw-r--r-- 1 0 0 42957 Apr 2 05:10 tverr
-rw-r--r-- 1 0 0 597576 Apr 2 07:28 messages
-rw-r--r-- 1 0 0 405764 Apr 2 16:42 kernel
-rw-r--r-- 1 0 0 0 Apr 2 16:43 tivoLog.pub.N
-rw-r--r-- 1 0 0 137795 Apr 2 16:43 tivoLog.prv
-rw-r--r-- 1 0 0 18567 Apr 2 16:43 tivoLog.prv.gz
drwxr-xr-x 2 0 0 1024 Apr 2 16:43 .
-rw------- 1 0 0 19268 Apr 2 16:43 tivoLog.prv.gz.bfg
-rw-r--r-- 1 0 0 76806 Apr 2 16:44 svclog
-rw-r--r-- 1 0 0 15861 Apr 2 16:44 tclient
-rw-r--r-- 1 0 0 3071 Apr 2 21:30 tivoLog.prv.N
-rw-r--r-- 1 0 0 550637 Apr 2 21:33 tvlog
bash-2.02#
superzap
04-02-2002, 08:23 PM
I would think your log files would have grown larger. If you don't want to install something to control them, I would just check the file sizes from time to time. You can always just delete them manually.
Gomer
04-02-2002, 08:41 PM
I think I got the procedure done properly (in Superzap's linked thread above). Thanks very much!
bash-2.02# dir /var/log
total 1414
drwxr-xr-x 14 0 0 1024 Jan 1 1970 ..
-rw-r--r-- 1 0 0 0 Jan 1 1970 secure
-rw-r--r-- 1 0 0 0 Jan 1 1970 maillog
-rw-r--r-- 1 0 0 0 Jan 1 1970 Okdebug
-rw-r--r-- 1 0 0 0 Jan 1 1970 Otvdebuglog
-rw-r--r-- 1 0 0 7146 Mar 2 04:34 Omessages
-rw-r--r-- 1 0 0 32079 Mar 2 04:34 Okernel
-rw-r--r-- 1 0 0 12496 Mar 2 04:34 Otvlog
-rw-r--r-- 1 0 0 110 Mar 2 04:34 Otverr
-rw-r--r-- 1 0 0 0 Mar 2 04:34 kdebug
-rw-r--r-- 1 0 0 0 Mar 2 04:34 tvdebuglog
-rw-r--r-- 1 0 0 18523 Apr 2 09:19 tverr
-rw-r--r-- 1 0 0 0 Apr 2 10:08 http
-rw-r--r-- 1 0 0 0 Apr 2 10:08 tivoLog.pub.N
-rw-r--r-- 1 0 0 48219 Apr 2 10:08 tivoLog.prv.gz
-rw------- 1 0 0 48924 Apr 2 10:09 tivoLog.prv.gz.bfg
-rw-r--r-- 1 0 0 7706 Apr 2 10:09 tclient
-rw-r--r-- 1 0 0 40740 Apr 2 10:09 svclog
-rw-r--r-- 1 0 0 168416 Apr 2 20:13 kernel
-rw-r--r-- 1 0 0 287041 Apr 2 23:38 messages
-rw-r--r-- 1 0 0 319971 Apr 2 23:40 tvlog
-rw-r--r-- 1 0 0 19537 Apr 2 23:40 tivoLog.prv.N
drwxr-xr-x 2 0 0 1024 Apr 2 23:41 .
-rw-r--r-- 1 0 0 0 Apr 2 23:41 tivoLog.pub
-rw-r--r-- 1 0 0 409230 Apr 3 00:49 tivoLog.prv
bash-2.02#
Does this look normal? I assume the files should be zeroed out tomorrow after the "call"?
Thanks.
superzap
04-02-2002, 09:03 PM
You can always force a call to test it.
I'll periodically check the file sizes and delete them as necessary. Thanks for your comments. Looks like they are "under control" for now.
Rob
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.