how to parse /etc/syslog.conf file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to parse /etc/syslog.conf file
# 1  
Old 05-25-2011
Data how to parse /etc/syslog.conf file

Hello there,

Guys I've got an issue and I need a hint...I have to parse /etc/syslog.conf file (under solaris) and need to get all path accordingly to all logs configured in there.

Bellow it's my syslog.conf file. If anybody knows more about this please let me know. Thanks .

Code:
#ident    "@(#)syslog.conf    1.5    98/12/14 SMI"    /* SunOS 5.0 */
#
# Copyright (c) 1991-1998 by Sun Microsystems, Inc.
# All rights reserved.
#
# syslog configuration file.
#
# This file is processed by m4 so be careful to quote (`') names
# that match m4 reserved words.  Also, within ifdef's, arguments
# containing commas must be quoted.
#
*.err;kern.notice;auth.notice            /dev/sysmsg
*.err;kern.debug;daemon.notice;mail.crit    /var/adm/messages

*.alert;kern.err;daemon.err            operator
*.alert                        root

*.emerg                        *

# if a non-loghost machine chooses to have authentication messages
# sent to the loghost machine, un-comment out the following line:
#auth.notice            ifdef(`LOGHOST', /var/log/authlog, @loghost)

mail.debug            ifdef(`LOGHOST', /var/log/syslog, @loghost)

#
# non-loghost machines will use the following lines to cause "user"
# log messages to be logged locally.
#
ifdef(`LOGHOST', ,
user.err                    /dev/sysmsg
user.err                    /var/adm/messages
user.alert                    `root, operator'
user.emerg                    *
)

# 2  
Old 05-25-2011
what are the parsing rules? Can you post the required output?
# 3  
Old 05-25-2011
Hi,

We need to get from this config files ALL the paths to log files that configured , for example :
/var/adm/messages
/dev/sysmsg

Last edited by catalint; 05-25-2011 at 08:48 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

syslog.conf

How can i configure messages with warn priority to be logged in /var/log/mywarnings.log ? (1 Reply)
Discussion started by: g0dlik3
1 Replies

3. 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

4. Solaris

basic question on sd.conf and lpc.conf file

Hello Guys, Do we need to configure this file only if we add SAN disk or even if we add local disk, do we need to modify? (4 Replies)
Discussion started by: mokkan
4 Replies

5. Solaris

syslog-ng.conf

Has anyone here configured a central syslog server using syslog-ng ? I have set one up and I'm trying to tune the syslog-ng.conf file, both for the server and the client. I have found lots of linux example files, but not much on Solaris which is slightly different. So if you have a Solaris... (5 Replies)
Discussion started by: Tornado
5 Replies

6. Linux

SYSLOG.CONF another port

Hi everybody, i have a little problem... I have two server srv01 and srv02. srv02 have a syslogd server onboard and listen on 515... not on 514 (it's busy). How i configure the syslog.conf of srv01 for send logs on srv02:515 ??? Now i have on srv01: *.* @srv02 if i write: *.* ... (0 Replies)
Discussion started by: Zio Bill
0 Replies

7. AIX

/etc/syslog.conf file and warnings

Hi All, I am working on a server which has an /etc/syslog.conf file with the following entries (example): local6.debug /dplogs/uss1udp001.log rotate size 1500m time 1d files 14 local7.debug /dplogs/uss1udp002.log rotate size 1500m time 1d files 14 -----------------------------... (3 Replies)
Discussion started by: jeffpas
3 Replies

8. Shell Programming and Scripting

Parse "masters" ip from named.conf

Hi there, Im' trying to make a script to parse the BIND configuration file from my slave DNS server and obtain a certain parameter. The named.conf file has this format: zone "0.170.20.10.in-addr.arpa" { type slave; file "0/./db.0.170.20.10.in-addr.arpa.bak"; allow-notify {... (2 Replies)
Discussion started by: Citricut
2 Replies

9. Red Hat

syslog.conf

Hi all I have a RedHat Linux AS2.1 server that keep crashing/rebooting and there are no messages in the /var/log/messages file pointing to any problems. I had a look at the /etc/syslog.conf file to see what gets logged to /var/log/messages, but I don't know what else to add. Can anyone tell me... (1 Reply)
Discussion started by: soliberus
1 Replies

10. UNIX for Dummies Questions & Answers

syslog.conf file and syslogd daemon

Hello, I need a few information/explanation about system messages, syslog.conf file and syslogd daemon. My problem is the following: I would like to log all system messages related to hardware problems into a particular file. For that, i have to add an entry in the syslog.conf file. I know... (1 Reply)
Discussion started by: VeroL
1 Replies
Login or Register to Ask a Question