/var/messages

Support section for FREESCO v0.3.x 3rd Party Packages

/var/messages

Postby mondo » Wed Sep 02, 2009 8:44 am

Howto stop /var/messages from continouosly filling this directory.


mondo
User avatar
mondo
Senior Member
 
Posts: 81
Joined: Mon Dec 27, 2004 1:36 pm

Re: /var/messages

Postby dingetje » Thu Sep 03, 2009 3:18 am

The messages logged to /var/messages are controlled with /etc/syslog.conf, but because that files lives in the RAM disk you'll need to edit/create a file /boot/etc/syslog.cfg
Here's an example:

Code: Select all
auth.*          /dev/tty4
auth.*          /var/secure

kern.=debug     /dev/null
*.info          /usr/local/var/info
*.*             /dev/tty3
*.*;*.!info     /var/messages


As you can see messages of type 'info' are now logged to /usr/local/var/info and no longer to /var/messages.
I've added the following code to my rc_user script to activate this change:

Code: Select all
      start) echo -n "Starting rc_user...                       "
                SYSLOG=`cat /var/run/syslogd.pid`
                cp /boot/etc/syslog.cfg /etc/syslog.conf
                kill -1 $SYSLOG


HTH
GreetZ
http://dingetje.homeip.net

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1004
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands

Re: /var/messages

Postby pollo » Fri Sep 04, 2009 10:09 am

dingetje,

Created /boot/etc/syslog.cfg file and entered the script you provided and edited the rc_user script to activate the change and on reboot I get the followings;

Syslogd: /usr/local/var/info;
No such file or directory



Any ideas?

pol
User avatar
pollo
Junior Member
 
Posts: 34
Joined: Sat Feb 21, 2004 10:34 pm

Re: /var/messages

Postby Lightning » Sat Sep 05, 2009 9:07 pm

Howto stop /var/messages from continouosly filling this directory.

I am a small amount at a loss as to the real problem here. It is true that the files are stored in the ram drive. However there is a background process running that monitors the size of the files. So most likely you have ignored the warning message for the size of the logs and changed it to a number that is to big. Which is allowing the log size to be bigger than will fit in the ram disk.

The easiest solution is to just reduce the log file size back to the original ( 30000 ) and reboot the machine and if you want to save the logs then just answer the save logs question that way in the setup and the system will keep the logs. You then will also have access to those logs from within the control panel rather than only having access from the command line.

However if having the file be that big and being a permanent file without using the built in mechanisms is critical to you then the one step missed in the instructions is to first create the directory you are going to be using.

mkdir /usr/local/var
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3047
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: /var/messages

Postby dingetje » Sun Sep 06, 2009 3:58 pm

Correction, that should be:

Code: Select all
mkdir /usr/local/var


because info is the file name for the kernel info messages.
One problem with this solution is that info isn't part of the normal log rotation mechanism, so Lightnings suggestion (don't pick a too large number for the messages file in your setup) is probably a better one.
GreetZ
http://dingetje.homeip.net

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1004
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands


Return to 3rd Party Package Support for FREESCO v0.3.x

Who is online

Users browsing this forum: No registered users and 1 guest

cron