> It seems that I need to restart syslog.  Just deleteing the messages
> file doesn't seem to work.
> When I restart syslog  everything is wonderful except that it logs to
> the console also.  Which doesn't matter a lot in a router but its
> kinda irritating.
>
> I tried starting from /,  starting it from a subshell,  kernel message
level 3
> ( its the ip logging that really messes up the console)
> stopping ip logging until syslog restarted,  nothing works.
>
> I tried the same thing on my RedHat development machine and got
> the same results.  Something here I don't understand about syslogd
> or klogd.

syslog expects it's files to stay around, and keeps using the same
file-handle to write to the file.  If you move or alter the file, things are
OK.  If you delete the file, you need to restart syslog.  Note that some log
files must already be present, so you'll either have to create them by hand,
or create a script to do so.

The log rotation scripts found on most LRP variants works quite well...any
reason you don't want to just stick with it?

If you really want to "delete" a log file, the easiest way is to use:

: > /var/log/messages

This clears the file without deleting it, so syslog is still happy (it's
open file-handle still writes to the file).  The colon command is a special
command that does nothing and simply returns a "true" exit status.

Charles Steinkuehler
http://lrp.steinkuehler.net
http://c0wz.steinkuehler.net (lrp.c0wz.com mirror)


_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user

Reply via email to