Sponsored Content
Operating Systems Linux Red Hat syslog configuration and log lvl Post 302502626 by chipmunken on Tuesday 8th of March 2011 01:04:15 PM
Old 03-08-2011
syslog configuration and log lvl

Hello
I was getting hammered in /var/log/messages from snmpd becouse it was running a jira which was sending email everytime someone updated a case or made any changes.
Therefor I decided to turn down the loglvl of snmpd, so what I did was add
Code:
snmpd.notice;

to

Code:
 [root@jira ~]# cat /etc/syslog.conf
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;snmpd.notice;mail.none;authpriv.none;cron.none           /var/log/messages

From googeling I am under the impression that setting log lvl to notice will give me notice and all lvls above to /var/log/messages. err, crit and so on...

After editing I did
Code:
[root@jira ~]# service syslog restart
Shutting down kernel logger:                               [  OK  ]
Shutting down system logger:                               [  OK  ]
Starting system logger:                                    [  OK  ]
Starting kernel logger:                                    [  OK  ]

Now here is a something I'am a bit worried about
After restarting syslogd
This is my last entrie in messages:
Code:
Mar  8 16:17:58 jira kernel: Kernel logging (proc) stopped.
Mar  8 16:17:58 jira kernel: Kernel log daemon terminating.
Mar  8 16:18:00 jira exiting on signal 15

Now little over two hours later there are no new entries in the /var/log/messages. This could be fine since messages was basically filled with snmpd messages and nothing more. Just that those last three entries got me a bit nervus. Any thoughts on this? Is there a smooth way to send a test message to syslog from terminal or something to just see if everything is as it should?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

syslog.log (HP-UX)

How can I setup the syslog.log file ? (2 Replies)
Discussion started by: salhoub
2 Replies

2. Linux

syslog configuration

Hi I have redhat linux v9.x. This is acting as a syslog server. I have a 1700 series cisco router I would like to log all the activity of my cisco router on my syslog server. Please anyone help me to configure it Regards, Raja (0 Replies)
Discussion started by: RajaRC
0 Replies

3. Shell Programming and Scripting

Finding your current run lvl

The title says it all really. I am writing a shell script for a Linux box, and I have recently run into a problem. I need to make sure I am at a certain run level first. Hence, the question. How can I find out what run level the box is currently running at? Is there a system variable... (2 Replies)
Discussion started by: Scripting Newb
2 Replies

4. Shell Programming and Scripting

A script for converting raid configuration log messages to ChangeLog files. ....

hi to all am new to shell scripting..itz very urgent. when i excuting the command metastat(raid configuration info) it will display some information. #metastat d1:submirror status: okey pass:1 d2:submirror staus:okey d3:submirror staus:error if staus is okey.no problem.once i... (0 Replies)
Discussion started by: arjunreddy3
0 Replies

5. UNIX for Dummies Questions & Answers

syslog.log - hp-ux

Hi, Following error message apeared in the syslog.log file of our hps2_dc server. Mar 10 17:22:12 hps2_dc vmunix: 0/4/0/0.1.3.255.14.1.0 sctl Mar 10 17:22:31 hps2_dc vmunix: 0/4/0/0: Unable to access previously accessed device at nport ID 0x10300. Could it be a hardware problem related... (4 Replies)
Discussion started by: mhbd
4 Replies

6. UNIX for Advanced & Expert Users

rotate modsec log with logrotate in the global configuration

Hello Experts, I have an apache 2.2.17 on solaris 10 that I am not sure if I, could list the following in the global settings in httpd.conf. I tested it in the Virtual host section of httpd.conf and, it works but, not sure if I can do it in the global settings. Any help would be greatly... (0 Replies)
Discussion started by: afadaghi
0 Replies

7. Solaris

best configuration for syslog.conf

I would like to configure the syslog.conf to have a good monitoring information about my system. do you have any idea about best configuration from your experience in your Data Centers BR, (5 Replies)
Discussion started by: maxim42
5 Replies

8. HP-UX

HPUX syslog configuration

Hi all, We have few HPUX servers. Our monitoring server collects their CPU usage info, memory info and disk info in 5 min time interval. Now, problem is massive access log from monitoring server logged in syslog.log on all hpux servers. How can we prevent these access logs to be logged... (2 Replies)
Discussion started by: sembii
2 Replies

9. UNIX for Advanced & Expert Users

Apache log rotate configuration

HI i was trying to configure logrotate for my apache server and it's not working properly. here is my lodrotate configuration /var/log/httpd/*log { daily missingok notifempty sharedscripts compress delaycompress postrotate /sbin/service httpd... (1 Reply)
Discussion started by: bentech4u
1 Replies

10. Red Hat

Apache log rotate configuration

HI i was trying to configure logrotate for my apache server and it's not working properly. Os: Red Hat 6 here is my lodrotate configuration /var/log/httpd/*log { daily missingok notifempty sharedscripts compress delaycompress postrotate ... (3 Replies)
Discussion started by: bentech4u
3 Replies
logger(1B)					     SunOS/BSD Compatibility Package Commands						logger(1B)

NAME
logger - add entries to the system log SYNOPSIS
/usr/ucb/logger [-f filename] [-i] [-p priority] [-t tag] mm [message]... DESCRIPTION
The logger utility provides a method for adding one-line entries to the system log file from the command line. One or more message argu- ments can be given on the command line, in which case each is logged immediately. If message is unspecified, either the file indicated with -f or the standard input is added to the log. Otherwise, a filename can be specified, in which case each line in the file is logged. If neither is specified, logger reads and logs messages on a line-by-line basis from the standard input. OPTIONS
The following options are supported: -i Log the process ID of the logger process with each line. -f filename Use the contents of filename as the message to log. -p priority Enter the message with the specified priority. The message priority can be specified numerically, or as a facility.level pair. For example, `-p local3.info' assigns the message priority to the info level in the local3 facility. The default pri- ority is user.notice. -t tag Mark each line added to the log with the specified tag. EXAMPLES
Example 1: Logging a message The command: example% logger System rebooted will log the message `System rebooted' to the facility at priority notice to be treated by syslogd as other messages to the facility notice are. Example 2: Logging messages from a file The command: example% logger -p local0.notice -t HOSTIDM -f /dev/idmc will read from the file /dev/idmc and will log each line in that file as a message with the tag `HOSTIDM' at priority notice to be treated by syslogd as other messages to the facility local0 are. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
syslogd(1M), syslog(3C), attributes(5) SunOS 5.10 14 Sep 1992 logger(1B)
All times are GMT -4. The time now is 02:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy