syslog question


 
Thread Tools Search this Thread
Operating Systems AIX syslog question
# 1  
Old 04-30-2004
syslog question

AIX 4.3.3

I'm attempting to script a log viewer to pull out significant events from a system log and I am having some trouble with priority codes. A section in the man page on syslogd states about the log output format:

Each message is one line. A message can contain a priority code, marked by a digit enclosed in < > (angle braces) at the beginning of the line. Messages longer than 900 bytes may be truncated.

In my /etc/syslog.conf, I have:
local6.info /foo/sshell.log

I've attempted to create some test log messages with:
logger -p local6.emerg this is only a test

Which produces this in /foo/sshell.log:
Apr 30 16:12:13 zcynsm2 root: this is only a test

The output does not show the priority code (emerg, or 0, in this case). How do I get the priority code to be listed in the log as well so I can get my log viewer to differentiate message priority?
I'm expecting the priority to be displayed as stated above in the man pages.


Thanks!!
# 2  
Old 05-01-2004
That seems like odd behavior. I've not been able to duplicate the behavior yet on my AIX system. Have you tried running syslog in debug mode (-d). It will output any errors etc. to stdout.

Thanks,

Keith
# 3  
Old 05-03-2004
Running syslog in debug mode produces the following to stdout:

# logger -p local6.emerg this is a test

got a message (1, 0x10)
logmsg: pri 260, flags 0, from nemo, msg May 3 12:12:25 cpdlc: this is another test
Logging to FILE /foo/sshell.log
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
readfds = 0x30

Why does the priority show up as "260" in the debugging msg? What does all the "Logging to UNUSED" mean?

Thanks!!
# 4  
Old 05-03-2004
jalburger,

Are you using tabs or spaces as seperators in you syslog.conf file? You should be using tabs. If you could, attach a copy of your syslog.conf as syslog.conf.txt. Don't just copy and paste it, I'd like to be able to see the actual file.

Thanks much,

Keith
# 5  
Old 05-03-2004
yep...I'm using tabs in my conf file...

The conf file is attached.
# 6  
Old 03-15-2005
hi.
I have the same problem as you. my question is did you find the way to have the priority of the message?

Thanks beforehand.
Tigran.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. AIX

Cannot send syslog event from AIX 6.1 to RHEL Syslog server

Hi everyone, I am trying to configure AIX 6.1 using syslogd to send syslog event to syslog server configured on RHEL. However, RHEL never receives the events. I have tried to redirect the syslog event on AIX to a local file and successful. Only forwarding to remote server fails. Firewall... (10 Replies)
Discussion started by: michael_hoang
10 Replies

2. Solaris

Which are the available entries to forward syslog in syslog.conf?

Hi Community Which are the available entries to forward syslog in syslog.conf i have put *.err;kern.debug;daemon.notice;mail.crit;user.alert;user.emerg;kern.notice;auth.notice;kern.warning @172.16.200.50 and it's not going through.giving error message like below: syslogd:... (2 Replies)
Discussion started by: bentech4u
2 Replies

3. What is on Your Mind?

Where should I ask my question?

Hello, all I found you folks by doing searches on linux bash scripting From time-to-time I'm hoping to get help from the experts here. I'm technically competent enough with Windows to run my own Tech-Support business, but I am fairly lightwieght in Linux. Over the last 3-4 years I've... (3 Replies)
Discussion started by: Tovian
3 Replies

4. Red Hat

Syslog.conf: looking for a simple answer on a simple question

Cheers! In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not? To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies

5. UNIX for Dummies Questions & Answers

Solaris 10 question on syslog.conf file

Hi, I have a question on /etc/syslog.conf file in Solaris 10. Below is a line taken from /etc/syslog.conf file and I know that the last field (operator) is where the logs gets outputted but how do I find out what the output file name format is going to be and which directory it gets outputted... (1 Reply)
Discussion started by: stevefox
1 Replies

6. Shell Programming and Scripting

while question/help?

I have 3 files in a directory. The files are named as below MSDOS PCDOS filename.txt The file filename.txt contains the following 1 line *****DOS When I run the following while loop I get the following output while read r do echo $r done < filename.txt Output is MSDOS PCDOS (1 Reply)
Discussion started by: gmatsoon
1 Replies

7. Shell Programming and Scripting

Another question regarding yes

I have a program that takes two responses, for example: ./eatfruit <stdout> Enter fruit: Do you want to eat fruit?: <end stdout> If I do this yes banana ./eatfruit <stdout> Enter fruit: banana (2 Replies)
Discussion started by: nj78
2 Replies

8. UNIX for Dummies Questions & Answers

Well, im getting it, but i have ONE question

Hay everyone, i would like to take this opportunity to thank all of you who helped me make the decision to get a linux distro. As a newbie, Im defininately considering buying Mandrake Linux... I went to the site and phew..... 2300 applications, i think ill have a good time. But i do have a... (5 Replies)
Discussion started by: LolapaloL
5 Replies
Login or Register to Ask a Question