How to close /var/log/syslog and /var/log/messages..

How to close /var/log/syslog and /var/log/messages..

Post by Steven J. Hil » Mon, 07 Jul 1997 04:00:00



[ post.txt < 1K ]

I notice that afterwhile my files in /var/log get kind of big. Mainly
debug, messages and syslog. If I delete them, then nothing else is
logged until I re-boot. I read through the man pages and am not quite
able to figure out how to be able to delete these files when they get
too large, but yet still have message written to these log files.
Thanks in advance.

Steve

 
 
 

How to close /var/log/syslog and /var/log/messages..

Post by Will Low » Tue, 08 Jul 1997 04:00:00



> I notice that afterwhile my files in /var/log get kind of big. Mainly
> debug, messages and syslog. If I delete them, then nothing else is
> logged until I re-boot. I read through the man pages and am not quite
> able to figure out how to be able to delete these files when they get
> too large, but yet still have message written to these log files.
> Thanks in advance.

Just open 'em up in emacs or pico or vi or whatever your favorite editor
is,  kill everything but the last two day's messages (or whatever you want
to keep) and close 'em up again.  You can't delete 'em,  because then the
processes (like syslogd) that write to those files think they're already
open ... just make 'em smaller.  Heck,  you could even set up a crontab
entry to do this once a week:

tail -100 /var/log/messages > /var/log/messages.new
rm /var/log/messages
mv /var/log/messages.new /var/log/message

(There are probably a hundred better ways to do this,  but it serves as an
example).
                                                        Will



                        http://www.ecl.udel.edu/~lowe/
*****************************************************************************
Good Idea:      Feeding Stray Cats in the Park.
Bad Idea:       Feeding Stray Cats in the park ... to a bear.
*****************************************************************************

 
 
 

How to close /var/log/syslog and /var/log/messages..

Post by david parso » Thu, 17 Jul 1997 04:00:00




Quote:>I notice that afterwhile my files in /var/log get kind of big. Mainly
>debug, messages and syslog. If I delete them, then nothing else is
>logged until I re-boot. I read through the man pages and am not quite
>able to figure out how to be able to delete these files when they get
>too large, but yet still have message written to these log files.

    for x in messages debug syslog;do
        mv /var/log/$x /var/log/o.$x
        touch /var/log/$x
    done
    killall -HUP syslogd

                  ____
    david parsons \bi/ or use savelogs instead.
                   \/

 
 
 

How to close /var/log/syslog and /var/log/messages..

Post by Peter Breitfe » Sun, 20 Jul 1997 04:00:00





> >I notice that afterwhile my files in /var/log get kind of big. Mainly
> >debug, messages and syslog. If I delete them, then nothing else is
> >logged until I re-boot. I read through the man pages and am not quite
> >able to figure out how to be able to delete these files when they get
> >too large, but yet still have message written to these log files.

>     for x in messages debug syslog;do
>    mv /var/log/$x /var/log/o.$x
>    touch /var/log/$x
>     done
>     killall -HUP syslogd

>                   ____
>     david parsons \bi/ or use savelogs instead.
>                    \/

I use
        : > /var/log/messages

to cut down the file to 0 bytes. Logging is not interruptet. I don't
know if it works in a net two but I guess it does.

 +------------------------------------------------------------------+
 |      _/_/_/_/   _/_/_/_/   _/_/_/_/  sMail:   Peter Breitfeld    |
 |     _/     _/  _/     _/  _/                  Kreuzgasse 4       |
 |    _/_/_/_/   _/_/_/_/   _/_/_/               88348 Saulgau      |
 |   _/     _/  _/   _/    _/                    GERMANY            |  

 +--------------------------------------(PGP Public Key available)--+

 
 
 

1. creating different syslog file /var/log/syslog.0 /var/log/syslog.1...

Hi,
I see different syslog files under /var/log/
/var/log/syslog.0
/var/log/syslog.1

Could anyone tell me whats the difference between syslog.* files.Are
they differ based on timestamp or something else.
I mean for today's syslogs, system uses syslog.0, for tommorrow's
syslog it uses syslog.1,is it?

Thanks for your help,
pradeep.

2. Autoload of SCSI-Module?

3. How large can /var/log/messages and /var/log/syslog get ?

4. .sh files? HELP

5. Odd in.pop3d messages in /var/log/{messages,syslog}

6. core dumps

7. avoid syslog message in /var/log/messages

8. HELP with sendmail please!

9. syslog, local7 & /var/log/boot.log

10. ATAPI cd-rom creates many, many logs in /var/log/messages

11. /var/log/messages with size of 0 and no logs are written !?

12. logs not in /var/log/messages

13. Strange log in /var/log/messages about sendmail.