Author Topic: Enabling/Disabling /var/log/messages  (Read 1048 times)

Offline mr-roboto

  • Jr. Member
  • **
  • Posts: 45
Enabling/Disabling /var/log/messages
« on: June 23, 2012, 05:19:37 PM »
I like having /var/log/messages operational at all times, even when using my live CD/DVD.  However, at some point in the remastering process, syslogd (I guess) stops feeding /var/log/messages.  In fact, the PCLOS system I use for remastering has stopped all logging to /var/log/messages.

I've GOOGLEd high-and-low but can't find any info about how to re-enable output to /var/log/messages.  I really thought I'd already found the answer here on the PCLOS forum, but even explicitly GOOGLEing the forum produced no specific answers.  I believe it's a matter of some option related to CHKCONFIG, but I don't recall anymore.

I'd also like to know if it's possible to make sure MKLIVECD doesn't disable logging to /var/log/messages for a given ISO.  That is, without having to hack the MKLIVECD script.

TIA....

Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
Re: Enabling/Disabling /var/log/messages
« Reply #1 on: June 23, 2012, 05:53:24 PM »
The mylivecd script intentionally disables the syslog service.

Quote
sub check_services {
    my $eachserv='';
   # disable some services
print STDERR "\nDisabling Services not needed on the LiveCD\n\n";
    foreach $eachserv ('atd','crond','syslog','kheader','xinetd'){
        (push(@services,$eachserv) and  services::do_not_start_service_on_boot($eachserv)) if (services::starts_on_boot($eachserv));
    }
}

This is because the LiveCD is a limited environment running in RAM and having logging active could use up space quite quickly. There is no way to change that without hacking the script.

On a running system the service can be enabled using PCC->System->Manage System Services
or via command line with (as root):

Code: [Select]
service syslog start
To make it start on boot:

Code: [Select]
chkconfig --add syslog
Terry
« Last Edit: June 23, 2012, 05:59:43 PM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline mr-roboto

  • Jr. Member
  • **
  • Posts: 45
Re: Enabling/Disabling /var/log/messages
« Reply #2 on: June 23, 2012, 07:44:31 PM »
<snip>
This is because the LiveCD is a limited environment running in RAM and having logging active could use up space quite quickly. There is no way to change that without hacking the script.

I saw that code and even though I'm not a Perl guy, it's easy enuf to simply duplicate that line, comment it out, and replace it w/o 'syslog'.

Quote
On a running system the service can be enabled using PCC->System->Manage System Services
or via command line with (as root):

Thanx for the nudge.  I danced all around that, but missed it totally.

Quote
Code: [Select]
service syslog start
To make it start on boot:

Code: [Select]
chkconfig --add syslog
Terry

Even though I've been using Linux professionally [unfortunately not full-time, everyday] for a decade, I never feel comfortable calling myself a Linux pro.  For all of the commands I know, something as simple as this, occasionally trips me up.  Thanx again....