Sponsored Content
Full Discussion: UNIX - AIX - Syslog messages
Operating Systems AIX UNIX - AIX - Syslog messages Post 302949201 by MichaelFelt on Wednesday 8th of July 2015 05:18:10 AM
Old 07-08-2015
If you want to know what applications are posting some 'wildcard' entries can help with that.
Below I have commented out all applications at 'debug' level - which is everything. Instead I collect everything at info level - except for local4 (which is used by ipsec logging) - I leave that one at debug level.

Code:
# *.debug;local4.none   /var/log/syslog/blockip.log 
*.info;local4.none      /var/log/syslog/blockip.log 
local4.debug    /var/log/syslog/local4.log

Looking at the combined log you can see which facility is concerned, as well as the severity of the message. From this you can decide how to accommodate different facilities in separate files and/or with differing severity.
Code:
michael@x071:[/var/log/syslog]tail blockip.log
Jul  8 09:00:00 x071 mail:warn|warning sendmail[8913086]: gethostbyaddr(IPv6:::1) failed: 1
Jul  8 09:00:00 x071 mail:info sendmail[8913086]: t689004j8913086: from=daemon, size=1131, class=0, nrcpts=1, msgid=<201507080900.t689004j8913086@aixtools.com>, relay=root@localhost
Jul  8 09:00:00 x071 mail:info sendmail[9371720]: t689004j8913086: to=michael, ctladdr=daemon (1/1), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=121131, dsn=2.0.0, stat=Sent
Jul  8 09:00:10 x071 user:info syslog: /etc/ifconfig -a
Jul  8 09:00:28 x071 auth|security:info sshd[5964030]: Accepted publickey for michael from 192.168.129.5 port 64940 ssh2: DSA SHA256:eOZ7yejpirXRJDLw99kR2AzZzuj/o/KNJGd9r70EHds
Jul  8 09:04:57 x071 mail:info pop3d[9109536]: Moved 1407 bytes of new mail to /home/michael/mbox from /var/spool/mail/michael host= x005.home.local [192.168.129.5]
Jul  8 09:04:57 x071 mail:info pop3d[9109536]: Auth user=michael host=x005.home.local [192.168.129.5] nmsgs=1/1
Jul  8 09:04:57 x071 mail:info pop3d[9109536]: Logout user=michael host=x005.home.local [192.168.129.5] nmsgs=0 ndele=1
Jul  8 09:09:33 x071 auth|security:crit su: BAD SU from michael to root at /dev/pts/1
Jul  8 09:09:38 x071 auth|security:notice su: from michael to root at /dev/pts/1

Finally, an easy way to know how syslog is currently running is the command
Code:
michael@x071:[/var/log/syslog]lssrc -s syslogd -l

With, e.g., the following result
Code:
Subsystem         Group            PID          Status 
 syslogd          ras              3407976      active
Syslogd Config   *.info;local4.none     /var/log/syslog/blockip.log  
Syslogd Config   local4.debug   /var/log/syslog/local4.log  
Syslogd Config   local1.debug   /var/log/syslog/local1.log  
Syslogd Config   user.warn      /var/log/httpd/rootvg/user.log 
Syslogd Config   mail.info      /var/log/syslog/mail.log rotate size 250k files 4 
Syslogd Config   aso.notice /var/log/aso/aso.log rotate size 1m files 8 compress 
Syslogd Config   aso.info /var/log/aso/aso_process.log rotate size 1m files 8 com 
Syslogd Config   aso.debug /var/log/aso/aso_debug.log rotate size 32m files 8 com

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

system messages log (Sun and AIX)

Hello, I need a few explanation about the log files for system messages: /var/adm/messages and /var/log/syslog. As /var/adm/messages is empty on my machine, i need help. First, i would like to know what the difference between these 2 files is? Do they contain different kinds of system... (3 Replies)
Discussion started by: VeroL
3 Replies

2. AIX

AIX 5.2 Syslog : Help needed

Hi all, I am trying to get the authentication logs of FTP,Telnet,SSH,inetd from the syslog file. But my output for every type of authentications - success & failure keep differing everytime i view them. The output does not show the priority code (emerg, or 0, in any case). How do I get the... (0 Replies)
Discussion started by: kamadana
0 Replies

3. Solaris

which is the best unix? solaris? aix ? hp-unix?

which is the best unix? solaris? aix ? hp-unix? I want to study unix system ? Anyone tell me which is the best? (2 Replies)
Discussion started by: mac2008
2 Replies

4. AIX

AIX auto delete old mail messages

We have had an issue where the mail file filled up. Is there a setting in sendmail.cf to automatically remove old emails? Say after 14 days. If not is there any way automatically to delete older mail files?? (1 Reply)
Discussion started by: daveisme
1 Replies

5. AIX

AIX Syslog login/logout User

Hi, i'm trying to configure /etc/syslog.conf for log user access. In debian i add: auth,authpriv.* @serverName I don't know the correct Aix syntax for syslog :( My @serverName get the log successfully.. I need to log correct/incorrect login attempts. Thanks (5 Replies)
Discussion started by: hankBuck
5 Replies

6. AIX

Forwarding AIX syslog/errorlog to remote SQL DB

Due to a project I'm currently tasked with I'm spending my time trying to find a way to forward the syslog to a remote, in this case Red Hat, server and squeezing it into a SQL DB. Rsyslog is doing this job quite nicely for most of our test-servers, but I couldn't find any reliable information on... (1 Reply)
Discussion started by: Skleindl
1 Replies

7. AIX

Get Next month in AIX from curent date in unix AIX

How could we derive teh Next month in MON-RR format from current date ie sysdate in UNI AIX sheel script.I coould get a command but i supports only inLinux susse andnotin AIX. I need for Unix AIX.Pls Help. Regards Shiv (2 Replies)
Discussion started by: SHIV75
2 Replies

8. AIX

I see some errors in syslog files in AIX. can these be ignored ?

Hello, Could you please check the below errors. I found these errors in AIX LPAR syslogs. auth|security:err|error sshd error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key daemon:err|error syslog: slp: 0660-059 Impossible to get local interface for distant address 10.x.x.x. errno... (2 Replies)
Discussion started by: Kumar7997
2 Replies

9. AIX

AIX Syslog where the hostname sit

Dear all experts, I would like to know where can I find the hostname located as when I receive the syslog, I can only see as below : (showing in localhost instead of the hostname) Feb 6 15:31:31 localhost syslog:info syslogd: restart Feb 6 15:31:50 localhost syslog:info syslogd: restart Feb... (13 Replies)
Discussion started by: kwliew999
13 Replies

10. 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
SYSLOGD(8)						      System Manager's Manual							SYSLOGD(8)

NAME
syslogd - log systems messages SYNOPSIS
syslogd [ -fconfigfile ] [ -mmarkinterval ] [ -d ] DESCRIPTION
Syslogd reads and logs messages into a set of files described by the configuration file /etc/syslog.conf. Each message is one line. A message can contain a priority code, marked by a number in angle braces at the beginning of the line. Priorities are defined in <sys/sys- log.h>. Syslogd reads from the UNIX domain socket /dev/log, from an Internet domain socket specified in /etc/services, and from the spe- cial device /dev/klog (to read kernel messages). Syslogd configures when it starts up and whenever it receives a hangup signal. Lines in the configuration file have a selector to deter- mine the message priorities to which the line applies and an action. The action field are separated from the selector by one or more tabs. Selectors are semicolon separated lists of priority specifiers. Each priority has a facility describing the part of the system that gener- ated the message, a dot, and a level indicating the severity of the message. Symbolic names may be used. An asterisk selects all facili- ties. All messages of the specified level or higher (greater severity) are selected. More than one facility may be selected using commas to separate them. For example: *.emerg;mail,daemon.crit Selects all facilities at the emerg level and the mail and daemon facilities at the crit level. Known facilities and levels recognized by syslogd are those listed in syslog(3) without the leading ``LOG_''. The additional facility ``mark'' has a message at priority LOG_INFO sent to it every 20 minutes (this may be changed with the -m flag). The ``mark'' facility is not enabled by a facility field containing an asterisk. The level ``none'' may be used to disable a particular facility. For example, *.debug;mail.none Sends all messages except mail messages to the selected file. The second part of each line describes where the message is to be logged if this line is selected. There are four forms: o A filename (beginning with a leading slash). The file will be opened in append mode. o A hostname preceeded by an at sign (``@''). Selected messages are forwarded to the syslogd 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 beginning with `#' are ignored. For example, the configuration file: kern,mark.debug /dev/console *.notice;mail.info /usr/spool/adm/syslog *.crit /usr/adm/critical kern.err @ucbarpa *.emerg * *.alert eric,kridle *.alert;auth.warning ralph logs all kernel messages and 20 minute marks onto the system console, all notice (or higher) level messages and all mail system messages except debug messages into the file /usr/spool/adm/syslog, and all critical messages into /usr/adm/critical; kernel messages of error severity or higher are forwarded to ucbarpa. All users will be informed of any emergency messages, the users ``eric'' and ``kridle'' will be informed of any alert messages, and the user ``ralph'' will be informed of any alert message, or any warning message (or higher) from the authorization system. The flags are: -f Specify an alternate configuration file. -m Select the number of minutes between mark messages. -d Turn on debugging. Syslogd creates the file /var/run/syslog.pid, if possible, containing a single line with its process id. This can be used to kill or reconfigure syslogd. To bring syslogd down, it should be sent a terminate signal (e.g. kill `cat /var/run/syslog.pid`). FILES
/etc/syslog.conf the configuration file /var/run/syslog.pid the process id /dev/log Name of the UNIX domain datagram log socket /dev/klog The kernel log device SEE ALSO
logger(1), syslog(3) 4.2 Berkeley Distribution November 16, 1996 SYSLOGD(8)
All times are GMT -4. The time now is 07:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy