Question & Answer
Question
This document contains information on configuring, starting and debugging Syslogd for z/OS Communications Server. This document replaces Information APAR II12021.
Answer
Table of Contents |
- Setup Requirements for Syslogd
Starting Syslogd
Debugging Syslogd problems
For more information/documentation
Setup requirements |
1. Ensure that your BPXPRMxx parmlib member contains a definition for
AF_UNIX filesystem.
Note: An IPL is required to pick up this change to BPXPRMxx.
2. Ensure /dev/console and /dev/log are properly defined.
For more information see the following manuals:
z/OS UNIX System Services Planning
UNIX System Services Command Reference
Note: if /dev/console is defined as a regular hfs file, syslog
messages go to this file when syslogd is not active.
3. Create the syslog daemon configuration file with permissions 600
The following example logs all messages in
/tmp/syslog.log and also logs all daemon messages in
/tmp/daemon.trace
5. Assign port 514 to the syslogd jobname in the TCPIP profile. For example,
See z/OS Communications Server: IP Configuration Guide for more information.
Syslogd should be started before TCP/IP to capture all messages.
To run syslogd as a started task:
1. Create SYSLOGD PROC to start up the syslog daemon
2. Setup the RACF entries for SYSLOGD
Alternatively, you can start syslog daemon from the OE shell.
It must be started from a superuser.
Example:
Note: Syslogd must be started from a userid that has superuser authority.
If not, error messages appear on the operator's console (not in the OE
shell). Any subsequent messages sent to syslog appear on the operator's console.
Back to Top
Run syslogd in debugging mode, by specifying the -d option.
Reference the z/OS Communications Server: IP Configuration Guide for more information on the debug parameter.
Common Problems:
Back to Top
1.Redbooks publications:
Accessing OS/390 OpenEdition MVS from the Internet (SG24-4721)
AF_UNIX filesystem.
- The following is a sample definition from the z/OS UNIX System Services Planning manual:
- FILESYSTYPE TYPE(UDS) ENTRYPOINT(BPXTUINT)
NETWORK DOMAINNAME(AF_UNIX)
DOMAINNUMBER(1)
MAXSOCKETS(64)
TYPE(UDS)
Note: An IPL is required to pick up this change to BPXPRMxx.
2. Ensure /dev/console and /dev/log are properly defined.
- Issue 'ls -l /dev/console' from the OMVS shell.
- Result should be:
c-w--w--w- 1 IBMUSER SYS1 9, 0 Jul 2 17:18 /dev/console - If the /dev/console file is missing, issue:
- /usr/sbin/mknod /dev/console c 9 0
- If the file permissions are incorrect, issue:
- /bin/chmod 222 /dev/console
- Issue 'ls -l /dev/log' from OMVS shell.
- Result should be:
c-w--w--w- 1 IBMUSER SYS1 6, 0 Jul 2 17:18 /dev/log
- Problems:
- If the /dev/log file is missing, issue:
- /usr/sbin/mknod /dev/log c 6 0
- If the file permissions are incorrect, issue:
- /bin/chmod 222 /dev/log
For more information see the following manuals:
z/OS UNIX System Services Planning
UNIX System Services Command Reference
Note: if /dev/console is defined as a regular hfs file, syslog
messages go to this file when syslogd is not active.
3. Create the syslog daemon configuration file with permissions 600
The following example logs all messages in
/tmp/syslog.log and also logs all daemon messages in
/tmp/daemon.trace
- /etc/syslog.conf
# if you change this file, you tell syslogd to reprocess it with
# kill -s SIGHUP pid
# syslogd's pid can be found in /etc/syslogd.pid
#
# log all messages to file /tmp/syslogd.log
*.* /tmp/syslogd.log
#
# log daemon messages to file /tmp/daemon.trace
# FTPD uses the daemon facility. Specifying 'debug' gets
# FTP trace entries recorded when FTP's trace is active
daemon.debug /tmp/daemon.trace
- (/tmp/syslogd.log and /tmp/daemon.trace in our example).
Example:
touch /tmp/daemon.trace
chmod 600 /tmp/daemon.trace
NOTE:
To customize default permission settings, use syslogd config options
-F and -D.
See z/OS Communications Server: IP Configuration Guide for more information.
For releases prior to z/OS 1.9:
If syslogd is configured to dynamically generate files,
then these files are created with permissions of 600.
Only the Superuser can read these files. This is a standard UNIX security measure to prevent ordinary users from reading sensitive information in the logs files.
5. Assign port 514 to the syslogd jobname in the TCPIP profile. For example,
- PORT
514 UDP SYSLOGD
- syslog 514/udp
See z/OS Communications Server: IP Configuration Guide for more information.
Starting Syslogd |
Syslogd should be started before TCP/IP to capture all messages.
To run syslogd as a started task:
1. Create SYSLOGD PROC to start up the syslog daemon
- USER.PROCLIB(SYSLOGD)
//SYSLOGD PROC
//*********************************************************
//SYSLOGD EXEC PGM=SYSLOGD,REGION=30M,TIME=NOLIMIT,
// PARM='POSIX(ON) ALL31(ON)/ '
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSERR DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
2. Setup the RACF entries for SYSLOGD
- ADDUSER SYSLOGD OMVS(UID(0) HOME('/') PROGRAM('/bin/sh'))
RDEFINE STARTED SYSLOGD.* STDATA( USER(SYSLOGD))
Alternatively, you can start syslog daemon from the OE shell.
It must be started from a superuser.
Example:
- # TOP OF /etc/rc FILE
# Start the SYSLOGD daemon
#Lines starting with a hash (#) are comments
# THIS MUST BE THE FIRST TASK STARTED (1st in /etc/rc)
export _BPX_JOBNAME='SYSLOGD'
export _CEE_RUNOPTS='ALL31(ON)'
/usr/sbin/syslogd -f /etc/syslog.conf &
/d a,l ==> shows SYSLOGD
/c SYSLOGD works
Note: Syslogd must be started from a userid that has superuser authority.
If not, error messages appear on the operator's console (not in the OE
shell). Any subsequent messages sent to syslog appear on the operator's console.
Back to Top
Debugging Syslogd Problems |
Run syslogd in debugging mode, by specifying the -d option.
Reference the z/OS Communications Server: IP Configuration Guide for more information on the debug parameter.
Common Problems:
Symptom | Possible Cause |
All messages to console | Syslogd not active note: /dev/console must be defined as char special file with major=9 |
E-messages to console | Syslogd active but no /etc/syslog.conf file |
no FTP messages in /tmp/daemon.trace or on operator's console | Syslogd not active and /dev/console not defined or Syslogd active, daemon.x statements exist but specified output file (example : /tmp/daemon.trace ) does not exists or did not exist when Syslogd was started (1) Ensure /tmp/daemon.trace exists (2) Issue 'kill -1 <syslog_pid>' This command refreshes Syslogd configuration (syslog_pid is in /etc/syslog.pid). Msgs/trace from FTPD and servers already started appear in /tmp/daemon.trace from this point on or cancel and restart Syslogd |
Back to Top
For More information/documentation on Syslogd |
1.Redbooks publications:
Accessing OS/390 OpenEdition MVS from the Internet (SG24-4721)
- p.137 contains an example of how to periodically cleanout logs without stopping syslogd.
[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSSN3L","label":"z\/OS Communications Server"},"Component":"All","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"1.7;1.8;1.9;1.10;1.11;1.12;1.13;2.1;2.2;2.3","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Historical Number
II12021
Was this topic helpful?
Document Information
Modified date:
16 August 2019
UID
swg21316946