Networking Forums

Networking Forums > Computer Networking > Linux Networking > How can I display pririority (Kernel.info or Auth.Info) in /var/log/messages?

Reply
Thread Tools Display Modes

How can I display pririority (Kernel.info or Auth.Info) in /var/log/messages?

 
 
GS
Guest
Posts: n/a

 
      07-09-2006, 03:50 PM
I need to capture syslog messages (/var/log/messages), which should
contain "error or warning or info" also in the message, how can I
capture, I want syslog message like this:

Jan 1 1970 10:00:00 Auth.Info sshd: session closed for user root.

 
Reply With Quote
 
 
 
 
Unruh
Guest
Posts: n/a

 
      07-09-2006, 05:14 PM
"GS" <(E-Mail Removed)> writes:

>I need to capture syslog messages (/var/log/messages), which should
>contain "error or warning or info" also in the message, how can I
>capture, I want syslog message like this:


>Jan 1 1970 10:00:00 Auth.Info sshd: session closed for user root.


Why overload /var/log/messages?

auth.* /var/log/authmessages
in /etc/syslog.conf and then do
killall -1 syslogd


 
Reply With Quote
 
Christian Fuß
Guest
Posts: n/a

 
      07-09-2006, 06:38 PM
On Sun, 09 Jul 2006 08:50:02 -0700, GS wrote:

> I need to capture syslog messages (/var/log/messages), which should
> contain "error or warning or info" also in the message, how can I
> capture, I want syslog message like this:
>
> Jan 1 1970 10:00:00 Auth.Info sshd: session closed for user root.



you can use grep, or sed for this

man grep

man sed
 
Reply With Quote
 
GS
Guest
Posts: n/a

 
      07-09-2006, 06:48 PM
Unruh, thanks for your message, appreciated.

I selected auth.* in syslog.conf file, but also I want to see whether
it is "error type" or "info type" or "warning type" in
/var/log/messages file also, will it be possible, by looking into
/var/log/messages file, I wanted to know whether that message is what
type.

I want keyword either "warn" or "info" or "errror" in /var/log/messages
file, is that doable?. Thanks in advance.

 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      07-09-2006, 09:50 PM
"GS" <(E-Mail Removed)> writes:

>Unruh, thanks for your message, appreciated.


>I selected auth.* in syslog.conf file, but also I want to see whether
>it is "error type" or "info type" or "warning type" in
>/var/log/messages file also, will it be possible, by looking into
>/var/log/messages file, I wanted to know whether that message is what
>type.


>I want keyword either "warn" or "info" or "errror" in /var/log/messages
>file, is that doable?. Thanks in advance.


As far as I know, no. You can put all of the levels into different files
I find that a pain.
Ie, syslog does not put either the loglevel or the log facility into the
error messages. It puts the program in which the syslog was called.


So, you could do
auth.error /var/log/autherror
auth.info;auth.!error /var/log/authinfo
auth.debug;auth.!info /var/log/authdebug
Which would put everything higher than error into autherror, everything
between info and error into authinfo and everything between debug and info
into authdebug


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OT] Display tech info of streaming audio? Vinni Broadband 1 07-23-2010 04:13 PM
martian source messages in the kernel log Jack Snodgrass Linux Networking 1 10-23-2006 07:49 PM
Does Linux Kernel support SNMP info? GS Linux Networking 5 08-24-2005 09:18 PM
strange ipv6 messages after disablling in kernel AA Linux Networking 2 07-20-2005 10:41 PM
Req:Info on best ISP JERRY Broadband 3 07-08-2004 08:13 AM



1 2 3 4 5 6 7 8 9 10 11