Click to See Complete Forum and Search --> : A couple questions...


Chase
11-23-2001, 06:15 PM
Allrighty, two things:

1.) Allright, I think I might have done something stupid. I mv /var/log/messages /home/chase/messages.112301.old because it was getting far too big, then I touch /var/log/messages. Slackware never wrote to this file again, even when I replaced the old one. What can I do?

2.) I have ssh sessions in to my linux machine when my windows machine freezes (imagine that), and slackware never logs me out, at least not for a long time. How can I kill a connection from, say, pts/0?

Thanks!

bdg1983
11-23-2001, 06:46 PM
Try deleting the one you created (/var/log/messages) and reboot. A new messages file should be created for you. At least it does for me.

Also look into enabling logrotate through cron and add the following

/var/log/messages {
daily
rotate 5
compress
size=200k
postrotate
/usr/bin/killall -HUP syslogd
endscript
}

to /etc/logrotate.d/syslog

Add rotate #, compress and size=###k.

That way when messages reached 200k, then it will be gzipped and a new messages file created.

Chase
11-23-2001, 08:38 PM
Yep, a simple killall -HUP syslogd did the trick after deleting messages.

Now how do I get rid of my extra ssh logins?

X_console
11-24-2001, 02:14 AM
You don't even have to touch the file you deleted/moved. Restarting syslogd will automatically create the file for you.

As for your ssh problem, to kill a connected user, find out what the PID for their shell is and then kill it.