Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

To be specific I want to stop the kern.log and syslog files. I just installed Xunbuntu about 2 days ago and have no experience with this OS.

I know they are supposedly important, but I have a hardware issue that leaves them running into the gigabytes.

My partition is small so I don't have a whole lot of free space for these files. In addition Im running Xunbuntu on a SSD so all this writing to the disk is annoying me. So if I could prevent their creation, that would be great.

For the curious that must know the issue. Im getting a nonstop log entry along the lines of "iwl3945...Radio disabled by HW RF Kill switch"

Everything is operating fine. LAN, WiFi, and Bluetooth all work as they should. The log entries begin when I don't have a CAT5 cable connected or if I set the wifi hardware switch to the off position. And even when I do have them connected I have to enter a web browser before they acknowledge and verify a connection to the internet before the writing stops.

I can't have an always online connection with this computer. It will probably spend more time offline. I also like to turn off the wifi hard switch to conserve battery.

share|improve this question
add comment

2 Answers

If you really want to disable all logging:

  1. Type sudo stop rsyslog to stop the log daemon.
  2. Create a file called /etc/init/rsyslog.override with a single line manual to stop the log daemon being automatically started at boot. You can do this with the following command:

    echo manual|sudo tee --append /etc/init/rsyslog.override
    

If you ever want to undo this:

  1. Type sudo start rsyslog to start the log daemon.
  2. Delete the override file you created before, so that the log daemon is again started at boot. The command sudo rm -f /etc/init/rsyslog.override will do this for you.
share|improve this answer
    
+1 I did this in my virtual machine server and it's saving me growing my VMDK for nothing. Nice one-liner! –  msanford Aug 14 '13 at 15:28
add comment

You could configure so there are no such log files. But it's better to just install the package logrotate and configure maximum size and number of log files you want to save. So you could easy configure to have max size 100MB and 5 of them in /etc/logrotate.conf and/or add files to /etc/logrotate.d/. Just look at the examples there.

So

apt-get install logrotate

and check the configurations for the package as noted above (and read /usr/share/doc/logrotate/README.Debian).

share|improve this answer
1  
You may also need to increase the log rotation interval if the default of daily isn't enough. –  Robie Basak Jul 4 '13 at 12:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.