10-30-2008
why I can't get syslog message?
I read Unix network programming by richard,in chap12.3,it say if call syslog() by using parameter LOG_USER,it should write a message in /var/adm/messages in Solaris,such as "connected from 10.1.1.2",example file inet/daytimetcpsrv2.c.I want to know which syslog file in FreeBSD7.0?I look for /var/log/messages,I don't find my message "connected from 10.1.1.2" in this file. Why?
My syslog.conf is follows:
Quote:
# $FreeBSD: src/etc/syslog.conf,v 1.28 2005/03/12 12:31:16 glebius Exp $
#
# Spaces ARE valid field separators in this file. However,
# other *nix-like systems still insist on using tabs as field
# separators. If you are sharing this file between systems, you
# may want to use only tabs as field separators here.
# Consult the syslog.conf(5) manpage.
*.err;kern.warning;auth.notice;mail.crit /dev/console
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err /var/log/messages
security.* /var/log/security
auth.info;authpriv.info /var/log/auth.log
mail.info /var/log/maillog
lpr.info /var/log/lpd-errs
ftp.info /var/log/xferlog
cron.* /var/log/cron
*.=debug /var/log/debug.log
*.emerg *
# uncomment this to log all writes to /dev/console to /var/log/console.log
#console.info /var/log/console.log
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.* /var/log/all.log
# uncomment this to enable logging to a remote loghost named loghost
#*.* @loghost
# uncomment these if you're running inn
# news.crit /var/log/news/news.crit
# news.err /var/log/news/news.err
# news.notice /var/log/news/news.notice
!startslip
*.* /var/log/slip.log
!ppp
*.* /var/log/ppp.log
Last edited by Neo; 04-01-2012 at 02:08 PM..
Reason: quote tags or code tags, please!
10 More Discussions You Might Find Interesting
1. Solaris
I got my system sun fire 6800 hung later reboot after generating these message can any one help me on this to review these message..!!
nfssrv: WARNING: nfsauth upcall failed: RPC: Operation in progress
mountd: cannot accept connection: 19: error unknown (current state -1)
KAVE00166-W The... (13 Replies)
Discussion started by: nicknihal
13 Replies
2. Programming
Hii can anyone pls tell how to limit the max no of message in a posix message queue. I have made changes in proc/sys/fs/mqueue/msg_max
But still whenever i try to read the value of max. message in the queue using attr.mq_curmsgs (where struct mq_attr attr) its giving the default value as 10.... (0 Replies)
Discussion started by: mohit3884
0 Replies
3. AIX
I am not a Unix / AIX admin, but am working with one that doesn't seem to know how to set up syslog to forward messages to me the way I need them. Every message they send me has "Message forwarded from <insert host name here>:" but I need it to only have the host name.
In the examples below,... (2 Replies)
Discussion started by: mlbillow
2 Replies
4. UNIX for Advanced & Expert Users
Generally(at least on AIX5.3, Solaris9, OS X)'logger' command would create syslog messages which carry <login name> . On Solaris9, I have experienced two circumstances in which 'logname' command fails. In this circumstance I saw the 'logger' command generated syslog messages which carry... (0 Replies)
Discussion started by: masaki
0 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
I need your help with syslog columns.
Currently I have a script as follows: (extract)
for messages in `cat syslog_message_list.txt`; \
do \
grep $messages syslog.`date +%d%m%y`.log | \
tr -s " " | \
cut -d" " -f4,9- | \
sort -k3.2,3 -k2,2 -k1nr,1 | \
uniq -c | \
sort -k3.2,3... (6 Replies)
Discussion started by: wthomas
6 Replies
6. Red Hat
All thanks for the help in advance. I'm current have my syslog server built on RHEL5.7. I'm wondering how to I have the syslog messages categorized by hostname? Is that an option I can add to the syslog.conf? (1 Reply)
Discussion started by: aojmoj
1 Replies
7. UNIX and Linux Applications
ssmtp has been running well under Kubuntu 12.04.1 for plain text messages. I would like to send html messages with ssmtp -t < /path/to/the/message.txt, but I cannot seem to get the message.txt file properly formatted. I have tried various charsets,
Content-Transfer-Encoding, rearranging the... (0 Replies)
Discussion started by: Ronald B
0 Replies
8. AIX
Hi. recently in many of our lpars we are getting a message in errpt as "C6ACA566 0315094014 U S dtc MESSAGE REDIRECTED FROM SYSLOG".
I have also checked the /etc/syslog.conf file. It doesn't point to error log.
Can someone please advise about how to fix this error ?
pmut3:/> errpt -aj... (4 Replies)
Discussion started by: newtoaixos
4 Replies
9. HP-UX
Dear Concern,
Is there any command to generate message in /var/adm/syslog/syslog.log file in HP-UX.
With Best Regards,
Kauser (2 Replies)
Discussion started by: makauser
2 Replies
10. Ubuntu
Hello to everyone! I have a question about syslog.
I want put the messages of log in a particular file
but really i don't know how to do that or i don't get the results
that I want.
I do this:
#include <stdio.h>
#include <stdlib.h>
#include <syslog.h>
int main (void)
{
... (4 Replies)
Discussion started by: Kovalevski
4 Replies
LEARN ABOUT MINIX
syslog.conf
SYSLOG.CONF(5) BSD File Formats Manual SYSLOG.CONF(5)
NAME
syslog.conf -- configuration file for syslogd(8)
DESCRIPTION
The syslog.conf file is the configuration file for the syslogd(8) program. It consists of lines with two fields: the selector field which
specifies the types of messages and priorities to which the line applies, and an action field which specifies the action to be taken if a
message syslogd receives matches the selection criteria. The selector field is separated from the action field by one or more tab or space
characters. A rule can be splitted in several lines if all lines except the last are terminated with a backslash (``'').
The Selectors function are encoded as a facility, a period (``.''), and a level, with no intervening white-space. Both the facility and the
level are case insensitive.
The facility describes the part of the system generating the message, and is one of the following keywords: auth, authpriv, cron, daemon,
kern, lpr, mail, mark, news, syslog, user, uucp and local0 through local7. These keywords (with the exception of mark) correspond to the
similar ``LOG_'' values specified to the openlog(3) and syslog(3) library routines.
The level describes the severity of the message, and is a keyword from the following ordered list (higher to lower): emerg, alert, crit, err,
warning, notice and debug. These keywords correspond to the similar (LOG_) values specified to the syslog library routine.
See syslog(3) for a further descriptions of both the facility and level keywords and their significance.
If a received message matches the specified facility and is of the specified level (or a higher level), the action specified in the action
field will be taken.
Multiple selectors may be specified for a single action by separating them with semicolon (``;'') characters. It is important to note, how-
ever, that each selector can modify the ones preceding it.
Multiple facilities may be specified for a single level by separating them with comma (``,'') characters.
An asterisk (``*'') can be used to specify all facilities or all levels.
By default, a level applies to all messages with the same or higher level. The equal (``='') character can be prepended to a level to
restrict this line of the configuration file to messages with the very same level.
An exclamation mark (``!'') prepended to a level or the asterisk means that this line of the configuration file does not apply to the speci-
fied level (and higher ones). In conjunction with the equal sign, you can exclude single levels as well.
The special facility ``mark'' receives a message at priority ``info'' every 20 minutes (see syslogd(8)). This is not enabled by a facility
field containing an asterisk.
The special level ``none'' disables a particular facility.
The action field of each line specifies the action to be taken when the selector field selects a message. There are five forms:
o A pathname (beginning with a leading slash). Selected messages are appended to the file.
You may prepend a minus (``-'') to the path to omit syncing the file after each message log. This can cause data loss at system crashes,
but increases performance for programs which use logging extensively.
o A named pipe (fifo), beginning with a vertical bar (``|'') followed by a pathname. The pipe must be created with mkfifo(8) before syslogd
reads its configuration file. This feature is especially useful fo debugging.
o A hostname (preceded by an at (``@'') sign). Selected messages are forwarded to the syslogd program on the named host.
o A comma separated list of users. Selected messages are written to those users if they are logged in.
o An asterisk. Selected messages are written to all logged-in users.
Blank lines and lines whose first non-blank character is a hash (``#'') character are ignored.
EXAMPLES
A configuration file might appear as follows:
# Log all kernel messages, authentication messages of
# level notice or higher and anything of level err or
# higher to the console.
# Don't log private authentication messages!
*.err;kern.*;auth.notice;authpriv.none /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* /var/log/maillog
# Everybody gets emergency messages, plus log them on another
# machine.
*.emerg *
*.emerg @arpa.berkeley.edu
# Root and Eric get alert and higher messages.
*.alert root,eric
# Save mail and news errors of level err and higher in a
# special file.
uucp,news.crit /var/log/spoolerr
FILES
/etc/syslog.conf The syslogd(8) configuration file.
BUGS
The effects of multiple selectors are sometimes not intuitive. For example ``mail.crit,*.err'' will select ``mail'' facility messages at the
level of ``err'' or higher, not at the level of ``crit'' or higher.
SEE ALSO
syslog(3), syslogd(8)
4.4BSD June 9, 1993 4.4BSD