Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I recently started using multiprocessing for my python code and now these two files are choking up all the space on my system.

./var/log/user.log: 8.1G 
./var/log/syslog: 8.1G 

I know it might be difficult to get a fix for this without going into the specifics of the code, I just want to know if it is safe to delete these files?

share|improve this question

3 Answers 3

up vote 3 down vote accepted

These are log files that are intended to for debugging and accountability of users. On your personal computer, you can absolutely delete them.

However, while that solves the problem temporarily, multiprocessing should not make entries in these files. What is written into these log files when you execute your program?

share|improve this answer
    
Thanks for the reply! –  Bruce Dec 28 '11 at 11:30
1  
@Bruce I'm looking forward to your answer to the last question ;) –  phihag Dec 28 '11 at 11:31

When you delete these files the space won't be freed until the processes holding them open have exited. In other words, if your goal is to free up the space you'll also have to restart syslogd (which might not be easy, depending on your system)

You can see which processes are holding open the files using something like:

lsof|egrep '/var/log/(user.log|syslog)'
share|improve this answer

Not sure which distro you are using, but seems like you have a custom logging instance setup in /etc/syslog.conf.

Try to disable or, alternatively, if the logging info is useful, configure /etc/logrotate.conf to rotate those logs on a more regular basis in order to prevent them from filling up your filesystem.

share|improve this answer

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.