Author Topic: SYSLOGD and OS/2 config options  (Read 356 times)

Dariusz Piatkowski

  • Sr. Member
  • ****
  • Thank You
  • -Given: 13
  • -Receive: 8
  • Posts: 453
    • View Profile
SYSLOGD and OS/2 config options
« on: August 07, 2018, 10:10:39 pm »
Who is running the syslogd process and how do you have it configured?

syslogd has been in my configuration for a long time now. The syslogd.conf file is not terribly complex, I simply attempted to functionaly separate out the various processes into separate (matching) log files.

Today I decided to deploy the smartmontools (smartmontools-6.6-os2-20171116.zip) functionality, primarly since I installed the new SSD in my machine and significantly re-configured my HDD usage. The HDDs are fairly old so I figured I should start watching the SMART reporting a bit closer.

I got the smartd working fine, it reports back in debug mode, so that makes me believe my core setups are fine. I enabled syslog server on my NAS box, that way I have a centralized LAN location for all LOG files, goal being to make it easy to obtain information from any machines. So far all of that seems to work fine. I am getting the smartd messages logged to the local \tmp\log direcotry as well as the NAS box itself.

What I am somewhat unclear about is the syslog.conf file contents, specifically, there is an option to forward all LOGs to an IP address. It can be done either through command line, '-t ip_add' switch, or through the use of the '%tcpipforward=192.168.1.5' command in the syslog.conf file itself. OK, no problem there, I am using the syslog.conf option, but it seems like the '%tcpipforward=192.168.1.5' command must be present first, followed by a specific redirection of a particular log (smartd sends to local0 here), or a re-direction of all logs.

So here is what that looks like :

Code: [Select]
# *******************************************************************
# Configuration file for Syslogd/2
...
# Valid facility names:
#  auth, authpriv, cron, daemon, ftp, kern, lpr, mail, mark,
#  news, security, syslog, user, uucp, local0, local1, local2,
#  local3, local4, local5, local6, local7
...
# lines beginning with:
#  # - comments
#  % - alternate to starting with command line options
#
# actions beginning with:
#  -  send to console
#  =  file to log messages
#  @  IP address to forward messages
...
# *******************************************************************

%tcpiplisten
%tcpipforward=192.168.1.5

*.*             -CON
#*.*             @192.168.1.5
auth.*          =g:\tmp\log\identd.log
authpriv.*      =g:\tmp\log\authpriv.log
cron.*          =g:\tmp\log\cron.log
daemon.*        =g:\tmp\log\daemon.log
ftp.*           =g:\tmp\log\ftp.log
snmp.*          =g:\tmp\log\snmp.log
snmptrap.*      =g:\tmp\log\snmptrap.log
kern.*          =g:\tmp\log\kernel.log
mail.*          =g:\tmp\log\mail.log
lpr.*           =g:\tmp\log\lpr.log
mail.*          =g:\tmp\log\news.log
security.*      =g:\tmp\log\security.log
syslog.*        =g:\tmp\log\syslog.log
user.*          =g:\tmp\log\user.log
uucp.*          =g:\tmp\log\uucp.log
local0.* =g:\tmp\log\smartd.log
local0.* @192.168.1.5
local1,local2,local3,local4,local5,local6,local7.*       =g:\tmp\log\local.log
...

Am I understanding this correctly? The syslog.conf file must have '%tcpipforward=192.168.1.5' redirection listed first, followed by an optional specific re-direct of a particular log, such as 'local0.*   @192.168.1.5' in my case?

This appears to work very well, but since I haven't done any extensive syslogd configuration before I didn't want to just 'fire & forget', only to discover some time later that I messed up the setups...LOL!

BTW: Is there any info out there about this? The stuff that comes with OS/2 (Warp 4.5 CP2) has nothing...at least not in any of the INF or PDF files I've looked through, meanwhile on-line searches bring up a pile of the Linux and AIX (in the case of IBM) stuff.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 106
  • Posts: 1477
    • View Profile
Re: SYSLOGD and OS/2 config options
« Reply #1 on: August 08, 2018, 02:15:57 am »
You might want to look at Michael Greene's port, http://hobbes.nmsu.edu/download/pub/os2/util/system/syslogd201.zip, at least it has better documentation and worked pretty well for me when I was testing it.

Dariusz Piatkowski

  • Sr. Member
  • ****
  • Thank You
  • -Given: 13
  • -Receive: 8
  • Posts: 453
    • View Profile
Re: SYSLOGD and OS/2 config options
« Reply #2 on: August 08, 2018, 09:24:40 pm »
Hi Dave!

You might want to look at Michael Greene's port...

Yup, that would do it...LOL, came to discover that I did actually deploy this port already and in fact that is what I'm running. I finally clued-in to this since the control file is named 'syslog.conf' as opposed to the other IBM file which is named 'syslog.cnf' and shows up here in there in various Redbooks I have.

No...if I can only remember why the heck I stuck that port into the core \tcpip\bin it would probably make more sense.

Anyways, I have all I need now, thank you for pointing to this port.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 106
  • Posts: 1477
    • View Profile
Re: SYSLOGD and OS/2 config options
« Reply #3 on: August 09, 2018, 12:31:52 am »

No...if I can only remember why the heck I stuck that port into the core \tcpip\bin it would probably make more sense.

Probably because that is how Michael advised installing it.