/var/log/debug

General support questions including new installations
Post Reply
User avatar
DiViNe
Posts: 13
Joined: 2015/05/12 12:18:59

/var/log/debug

Post by DiViNe » 2015/05/19 08:51:06

Hello

Could anyone help me with these two questions?
  • The debug-file /var/log/debug was 5 GB big, so I deleted it. I've checked the space on the disk again and the 5 GB haven't been freed on the disk. Why?
  • I thought, the /var/log/debug file will appear again as soon as a process writes in to it. But the files isn't there any more. Is that a problem?
Thanks for the help!

Cheers

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: /var/log/debug

Post by TrevorH » 2015/05/19 11:16:57

That's not a standard CentOS logfile. Chances are that you have a custom entry in /etc/syslog.conf that directs messages to that file and that the syslog daemon still has the file open and thus it's not deleted until it's closed. You probably need to /bin/kill -HUP `cat /var/run/syslogd.pid to have it close/open the file. Long term it probably wants adding to /etc/logrotate.d so it gets rotated automatically.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
DiViNe
Posts: 13
Joined: 2015/05/12 12:18:59

Re: /var/log/debug

Post by DiViNe » 2015/05/20 12:46:33

Hey, you're great! You've been damn right! :P

I only had to use:

Code: Select all

/etc/rc.d/init.d/syslog restart
but after that was the space free and the /var/log/debug gets filled again. Thank you!

The /var/log/debug gets flooded! Every crap gets loged in there :?
Maybe aswell the logrotate of the /var/log/debug is broke (cause the file was soooo big). If I'd like to stop debunging, would it be enough to comment this line

Code: Select all

*.debug                                         /var/log/debug
in the /etc/syslog.conf-file out?

On a AIX-system you're able to switch on a debug mode. This doesn't work that easy with centos, right? I could find a simple command to switch debug on/off.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: /var/log/debug

Post by TrevorH » 2015/05/20 14:39:10

Since it's not a standard file there is no logrotate config for it by default either so if you want it rotated then you'll have to add it.

Your current *.debug will send all debug messages to that file regardless of the facilty. Maybe you need to tune it down a bit to e.g. kern.debug or whatever. There should be no need to restart the syslog daemon, just reload it (that's what the -HUP does).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply