syslog.conf - Mandriva

This is a discussion on syslog.conf - Mandriva ; How do i specify that local4 messages go to one file and not to /var/log/messages? In my syslog.conf i have (only the relevant stuff show here): *.info;mail,news,authpriv.none -/var/log/messages local4.* -/var/log/sensord.log The sensord messages do go to /var/log/sensord.log but they also ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: syslog.conf

  1. syslog.conf

    How do i specify that local4 messages go to one file and not
    to /var/log/messages?
    In my syslog.conf i have (only the relevant stuff show here):

    *.info;mail,news,authpriv.none -/var/log/messages
    local4.* -/var/log/sensord.log

    The sensord messages do go to /var/log/sensord.log but they also go
    to /var/log/messages. I read the man page but i cant figure out how to
    prevent the local4 messages from going to the messages file.
    Seems like they shouldnt as it is, but they do.
    Eric

  2. Re: syslog.conf

    Eric wrote:

    > How do i specify that local4 messages go to one file and not
    > to /var/log/messages?
    > In my syslog.conf i have (only the relevant stuff show here):
    >
    > *.info;mail,news,authpriv.none -/var/log/messages
    > local4.* -/var/log/sensord.log
    >
    > The sensord messages do go to /var/log/sensord.log but they also go
    > to /var/log/messages. I read the man page but i cant figure out how to
    > prevent the local4 messages from going to the messages file.
    > Seems like they shouldnt as it is, but they do.
    > Eric

    oops i figured it out - thou must signal

  3. Re: syslog.conf

    On Tue, 19 Feb 2008 02:14:27 -0500, Eric wrote:

    > How do i specify that local4 messages go to one file and not
    > to /var/log/messages?
    > In my syslog.conf i have (only the relevant stuff show here):
    > *.info;mail,news,authpriv.none -/var/log/messages
    > local4.* -/var/log/sensord.log


    If I'm reading man syslog.conf correctly, the first line says to send
    all messages with level info, and higher (regardless of which facility
    they are from) to /var/log/messages, and to include all messages from
    the mail and news facilities (regardless of priority), but to
    exclude all messages from the authpriv facility.

    The second line says to send all messages from facility local4, regardless
    of priority, to /var/log/sensord.log.

    Note from sensord --help
    -f, --syslog-facility -- syslog facility to use (default local4)

    To exclude the local4 info messages from /var/log/messages, you would
    have to replace *.info with auth.info to local7.info, including all
    of the facilitynames listed in /usr/include/sys/syslog.h, except local4.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  4. Re: syslog.conf

    On Tue, 19 Feb 2008 02:25:30 -0500, Eric wrote:

    > Eric wrote:
    >
    >> How do i specify that local4 messages go to one file and not
    >> to /var/log/messages?

    > oops i figured it out - thou must signal


    I take it you mean send a signal to syslogd, to reload it's configuration
    files?

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  5. Re: syslog.conf

    On 19 Feb, 12:40, "David W. Hodgins"
    wrote:
    > On Tue, 19 Feb 2008 02:14:27 -0500, Eric wrote:
    > > How do i specify that local4 messages go to one file and not
    > > to /var/log/messages?
    > > In my syslog.conf i have (only the relevant stuff show here):
    > > *.info;mail,news,authpriv.none -/var/log/messages
    > > local4.* -/var/log/sensord.log

    >
    > If I'm reading man syslog.conf correctly, the first line says to send
    > all messages with level info, and higher (regardless of which facility
    > they are from) to /var/log/messages, and to include all messages from
    > the mail and news facilities (regardless of priority), but to
    > exclude all messages from the authpriv facility.
    >
    > The second line says to send all messages from facility local4, regardless
    > of priority, to /var/log/sensord.log.
    >
    > To exclude the local4 info messages from /var/log/messages, you would
    > have to replace *.info with auth.info to local7.info, including all
    > of the facilitynames listed in /usr/include/sys/syslog.h, except local4.


    Erm, surely, you could do:

    *.info;mail,news,authpriv.none,local4.none -/var/log/messages
    local4.* -/var/log/
    sensord.log

    No? (I'll try it when I get home - no suitable machine here!)


  6. Re: syslog.conf

    On Tue, 19 Feb 2008 08:38:26 -0500, wrote:

    > Erm, surely, you could do:
    >
    > *.info;mail,news,authpriv.none,local4.none -/var/log/messages
    > local4.* -/var/log/
    > sensord.log
    >
    > No? (I'll try it when I get home - no suitable machine here!)


    Looks like it should work. That's what I get for responding without
    thinking it through thoroughly.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  7. Re: syslog.conf

    David W. Hodgins wrote:

    > On Tue, 19 Feb 2008 02:25:30 -0500, Eric wrote:
    >
    >> Eric wrote:
    >>
    >>> How do i specify that local4 messages go to one file and not
    >>> to /var/log/messages?

    >> oops i figured it out - thou must signal

    >
    > I take it you mean send a signal to syslogd, to reload it's configuration
    > files?
    >
    > Regards, Dave Hodgins
    >

    yup, forgot that, sorry

  8. Re: syslog.conf

    On Wed, 20 Feb 2008 00:46:01 -0500, Eric wrote:

    > yup, forgot that, sorry


    Just fyi, I made the following changes. In /etc/syslog.conf
    *.*;auth,authpriv.none,local4.none -/var/log/syslog
    to remove the sensors output from syslog. I already had
    local4.info -/var/log/sensors
    putting the sensors output into that file.

    I added cat /etc/sysconfig/smartmontools
    smartd_opts=" -l local4"
    (smartd defaults to log facility "daemon", which goes in syslog and
    /var/log/daemons/info).

    I have a script I use for checking the temps, which I changed to use the
    /var/log/sensors file, instead of /var/log/syslog ...
    $ cat /home/dave/bin/tempcheck.sh
    #!/bin/bash
    cat /proc/acpi/thermal_zone/THRM/temperature
    grep 'CPU Temp' /var/log/sensors | /usr/bin/tail -n 1
    grep 'M/B Temp' /var/log/sensors | /usr/bin/tail -n 1
    grep Celsius /var/log/sensors | /bin/grep hda | /bin/grep changed | /usr/bin/tail -n 1
    grep Celsius /var/log/sensors | /bin/grep hdb | /bin/grep changed | /usr/bin/tail -n 1
    grep Celsius /var/log/sensors | /bin/grep hdc | /bin/grep changed | /usr/bin/tail -n 1
    grep Celsius /var/log/sensors | /bin/grep hdd | /bin/grep changed | /usr/bin/tail -n 1

    Works much faster with the much smaller /var/log/sensors file. Also makes syslog
    easier to skim through, looking for other messages.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  9. Re: syslog.conf

    David W. Hodgins wrote:

    > On Wed, 20 Feb 2008 00:46:01 -0500, Eric wrote:
    >
    >> yup, forgot that, sorry

    >
    > Just fyi, I made the following changes. In /etc/syslog.conf
    > *.*;auth,authpriv.none,local4.none
    > -/var/log/syslog
    > to remove the sensors output from syslog. I already had
    > local4.info -/var/log/sensors
    > putting the sensors output into that file.
    >
    > I added cat /etc/sysconfig/smartmontools
    > smartd_opts=" -l local4"
    > (smartd defaults to log facility "daemon", which goes in syslog and
    > /var/log/daemons/info).
    >
    > I have a script I use for checking the temps, which I changed to use the
    > /var/log/sensors file, instead of /var/log/syslog ...
    > $ cat /home/dave/bin/tempcheck.sh
    > #!/bin/bash
    > cat /proc/acpi/thermal_zone/THRM/temperature
    > grep 'CPU Temp' /var/log/sensors | /usr/bin/tail -n 1
    > grep 'M/B Temp' /var/log/sensors | /usr/bin/tail -n 1
    > grep Celsius /var/log/sensors | /bin/grep hda | /bin/grep changed |
    > /usr/bin/tail -n 1 grep Celsius /var/log/sensors | /bin/grep hdb | /bin/grep
    > changed | /usr/bin/tail -n 1 grep Celsius /var/log/sensors | /bin/grep hdc |
    > /bin/grep changed | /usr/bin/tail -n 1 grep Celsius /var/log/sensors |
    > /bin/grep hdd | /bin/grep changed | /usr/bin/tail -n 1
    >
    > Works much faster with the much smaller /var/log/sensors file. Also makes
    > syslog easier to skim through, looking for other messages.
    >
    > Regards, Dave Hodgins
    >

    I've been playing with a custom 2.6.22.18-1mdv kernel. I've got acpi selected
    and processor and therm selected as modules, but i cant get anything
    below /proc/acpi/thermal_zone to show up. I probably missed a dependency
    somewhere.
    Using xconfig -
    Power Management Options: "Power Management support" is checkmarked
    ACPI Support: ->
    Processor
    Thermal Zone
    actually under this everything is selected as a module except
    /proc/acpi/sleep, Custom DSDT stuff, debug statements and Smart battery
    system which are all not built(unchecked)
    Any ideas?
    Thanks
    Eric

+ Reply to Thread