11.01.2013 Views

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

configuration file. Whenever you change this configuration file, you need to refresh the<br />

syslogd subsystem, as follows:<br />

refresh -s syslogd<br />

The syslogd daemon reads a datagram socket and sends each message line to a destination<br />

described by the /etc/syslog.conf configuration file. The syslogd daemon reads the<br />

configuration file when it is activated and when it receives a hang-up signal.<br />

Each message is one line. A message can contain a priority code marked by a digit enclosed<br />

in angle braces (< >) at the beginning of the line. Messages longer than 900 bytes may be<br />

truncated.<br />

The /usr/include/sys/syslog.h include file defines the facility and priority codes used by the<br />

configuration file. Locally-written applications use the definitions contained in the syslog.h file<br />

to log messages using the syslogd daemon. For example, a configuration file that contains<br />

the following line is often used when a daemon process causes a problem:<br />

daemon.debug /tmp/syslog.debug<br />

This line indicates that a facility daemon should be controlled. All messages with the priority<br />

level debug and higher should be written to the file /tmp/syslog.debug.<br />

Note: The file /tmp/syslog.debug must exist.<br />

The daemon process that causes problems (in our example, the inetd) is started with option<br />

-d to provide debug information. This debug information is collected by the syslogd daemon,<br />

which writes the information to the log file /tmp/syslog.debug.<br />

Logging can also improve security on your system by adding additional logging to the<br />

syslog.conf file. You can then increase system logging by adding extra logging for your<br />

system by editing inetd.conf and adding logging into each of the demons as required.<br />

Example 2-5 shows a sample of syslog.conf settings.<br />

Example 2-5 syslog settings<br />

bianca:/etc/#vi syslog.conf<br />

*.info /var/adm/syslog/syslog.log<br />

*.alert /var/adm/syslog/syslog.log<br />

*.notice /var/adm/syslog/syslog.log<br />

*.warning /var/adm/syslog/syslog.log<br />

*.err /var/adm/syslog/syslog.log<br />

*.crit /var/adm/syslog/syslog.log rotate time 1d files 9<br />

The last line in Example 2-5 indicates that this will create only 9 files and use a rotation on<br />

syslog. A file designated for storing syslog messages must exist; otherwise, the logging will<br />

not start. Remember to refresh syslog after any changes are made to the syslog configuration<br />

file.<br />

Extra logging on demons controlled by inetd.conf can be configured as shown in Example 2-6<br />

(ftpd is shown).<br />

Example 2-6 Verbose logging for ftpd<br />

bianca:/etc/#vi inetd.con<br />

ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd -l<br />

Chapter 2. <strong>AIX</strong> continuous availability features 33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!