Sponsored Content
Operating Systems Linux Red Hat Syslog.conf: looking for a simple answer on a simple question Post 302827243 by rbatte1 on Friday 28th of June 2013 08:44:00 AM
Old 06-28-2013
The logger command that MadeInGermany suggests should not be a privileged command. What command can you not issue?

Looking at your records from syslog.conf, the theory is that the first record that captures *.info along with other things to /var/log/messages should actually capture all messages of severity level info or higher.

Try:-
Code:
tail -f /var/log/messages &
sleep 3
echo "Going to send message to syslog"
sleep 1
logger "This is a default message"
logger -p user.crit 'this is user.crit'

Does that produce any logging output?



Robin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple Question

Can anyone tell me if there is a way to remove the encryption from Data CDs by UNIX? Or does anyone know of a program that can remove the encryption? I would much appreciate it! Thanks, -Peaves (2 Replies)
Discussion started by: Peaves
2 Replies

2. UNIX for Dummies Questions & Answers

Ok simple question for simple knowledge...

Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies

3. Programming

Simple C question... Hopefully it's simple

Hello. I'm a complete newbie to C programming. I have a C program that wasn't written by me where I need to write some wrappers around it to automate and make it easier for a client to use. The problem is that the program accepts standard input to control the program... I'm hoping to find a simple... (6 Replies)
Discussion started by: Xeed
6 Replies

4. Solaris

Solaris JumpStarting?... Simple Yes/No Question... Unless the answer's 'No'

I'm reading through this guide, BigAdmin Feature Article: Using Solaris JumpStart With the Solaris 10 OS for x86/x64 Platforms, and I was wondering if there was more to the bash scripts than just the example given (see above link) like for begin1 and begin2 and finish1 and finish2. I don't know... (3 Replies)
Discussion started by: Bradj47
3 Replies

5. Shell Programming and Scripting

Simple if then else question

I am having trouble making this statement work. I am passing in a number value for the number of days to keep archive logs for and wanted to make sure that it is a number. I have a script that will return 1 for is a number and 0 for is not a number. I also want to make sure that the number is not... (2 Replies)
Discussion started by: gandolf989
2 Replies

6. UNIX for Dummies Questions & Answers

TAR question (probably a very simple answer)

Hi All, I have a (probably) very simple tar question on a Solaris box that I'm a little embarrassed to ask. After repeatedly checking man tar and searching for solutions online (I'm not sure of the correct "keywords" to look for) The question is: If I were to use the command:tar cf... (4 Replies)
Discussion started by: chatguy
4 Replies

7. UNIX for Dummies Questions & Answers

simple(?) if/else question

Hello, I have a quick question that is not related to homework in any way shape or form (in case anyone wanted to know). My question is thus: I have a file "temp" that has the two values say "5" and "3" (separated by a white space). Now, I want to simply write an if-else statement that reads... (10 Replies)
Discussion started by: astropi
10 Replies

8. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

9. Shell Programming and Scripting

Very simple question

Hi, guys, I'm a new comer here. I'm studying Unix Shell and I met a problem confusing me a lot. Here it is : script 1: #!/bin/sh # scriptname : do_increment increment(){ sum=`expr $1 + 1` return $sum # Return the value of sum to the script. } echo -n "The sum is " increment $1 # Call... (2 Replies)
Discussion started by: franksunnn
2 Replies

10. Shell Programming and Scripting

Simple question

Sorry for stupid question, but why this script gives that output? $ awk 'BEGIN { well=56789; print 1234$well }' 1234 I expected 123456789 (9 Replies)
Discussion started by: silyin
9 Replies
syslog.conf(4)							   File Formats 						    syslog.conf(4)

NAME
syslog.conf - configuration file for syslogd system log daemon SYNOPSIS
/etc/syslog.conf DESCRIPTION
The file /etc/syslog.conf contains information used by the system log daemon, syslogd(1M), to forward a system message to appropriate log files and/or users. syslogd preprocesses this file through m4(1) to obtain the correct information for certain log files, defining LOGHOST if the address of "loghost" is the same as one of the addresses of the host that is running syslogd. A configuration entry is composed of two TAB-separated fields: selector action The selector field contains a semicolon-separated list of priority specifications of the form: facility.level [ ; facility.level ] where facility is a system facility, or comma-separated list of facilities, and level is an indication of the severity of the condition being logged. Recognized values for facility include: user Messages generated by user processes. This is the default priority for messages from programs or facilities not listed in this file. kern Messages generated by the kernel. mail The mail system. daemon System daemons, such as in.ftpd(1M) auth The authorization system: login(1), su(1M), getty(1M), among others. lpr The line printer spooling system: lpr(1B), lpc(1B), among others. news Designated for the USENET network news system. uucp Designated for the UUCP system; it does not currently use the syslog mechanism. cron Designated for cron/at messages generated by systems that do logging through syslog. The current version of the Solaris Operating Environment does not use this facility for logging. audit Designated for audit messages generated by systems that audit by means of syslog. local0-7 Designated for local use. mark For timestamp messages produced internally by syslogd. * An asterisk indicates all facilities except for the mark facility. Recognized values for level are (in descending order of severity): emerg For panic conditions that would normally be broadcast to all users. alert For conditions that should be corrected immediately, such as a corrupted system database. crit For warnings about critical conditions, such as hard device errors. err For other errors. warning For warning messages. notice For conditions that are not error conditions, but may require special handling. A configuration entry with a level value of notice must appear on a separate line. info Informational messages. debug For messages that are normally used only when debugging a program. none Do not send messages from the indicated facility to the selected file. For example, a selector of *.debug;mail.none sends all messages except mail messages to the selected file. For a given facility and level, syslogd matches all messages for that level and all higher levels. For example, an entry that specifies a level of crit also logs messages at the alert and emerg levels. The action field indicates where to forward the message. Values for this field can have one of four forms: o A filename, beginning with a leading slash, which indicates that messages specified by the selector are to be written to the specified file. The file is opened in append mode if it exists. If the file does not exist, logging silently fails for this action. o The name of a remote host, prefixed with an @, as with: @server, which indicates that messages specified by the selector are to be forwarded to the syslogd on the named host. The hostname "loghost" is treated, in the default syslog.conf, as the hostname given to the machine that logs syslogd messages. Every machine is "loghost" by default, per the hosts database. It is also possible to specify one machine on a network to be "loghost" by, literally, naming the machine "loghost". If the local machine is designated to be "loghost", then syslogd messages are written to the appropriate files. Otherwise, they are sent to the machine "loghost" on the net- work. o A comma-separated list of usernames, which indicates that messages specified by the selector are to be written to the named users if they are logged in. o An asterisk, which indicates that messages specified by the selector are to be written to all logged-in users. Blank lines are ignored. Lines for which the first nonwhite character is a '#' are treated as comments. EXAMPLES
Example 1: A Sample Configuration File With the following configuration file: *.notice /var/log/notice mail.info /var/log/notice *.crit /var/log/critical kern,mark.debug /dev/console kern.err @server *.emerg * *.alert root,operator *.alert;auth.warning /var/log/auth syslogd(1M) logs all mail system messages except debug messages and all notice (or higher) messages into a file named /var/log/notice. It logs all critical messages into /var/log/critical, and all kernel messages and 20-minute marks onto the system console. Kernel messages of err (error) severity or higher are forwarded to the machine named server. Emergency messages are forwarded to all users. The users root and operator are informed of any alert messages. All messages from the authorization system of warning level or higher are logged in the file /var/log/auth. FILES
/var/log/notice log of all mail system messages (except debug messages) and all messages of notice level or higher /var/log/critical log of all critical messages /var/log/auth log of all messages from the authorization system of warning level or higher ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
at(1), crontab(1), logger(1), login(1), lp(1), lpc(1B), lpr(1B), m4(1), cron(1M), getty(1M), in.ftpd(1M), su(1M), syslogd(1M), syslog(3C), hosts(4), attributes(5) SunOS 5.10 28 Jul 2004 syslog.conf(4)
All times are GMT -4. The time now is 05:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy