rklogd as executable / in startup script

Everything related with getting rsyslog up and running (but not beyond that point ;))

Moderator: rgerhards

rklogd as executable / in startup script

Postby chakkerz on Tue Mar 11, 2008 2:07 am

pardon my ignorance, but as i understand it rklogd is now integrated into rsyslog (or at least that is what i gather from various pieces of documentation around) ... so the sample start-up script needs to have those bits commented out. Correct?

Or am i making a booboo when compiling the software and thus missing an executable, OR is there an option i'm overlooking and thus the sample is right, but just not for my configuration?

Sorry to be dense

chakkerz
chakkerz
Advanced
 
Posts: 38
Joined: Tue Jan 22, 2008 4:45 am
Location: Australia

RE: rklogd as executable / in startup script

Postby rgerhards on Tue Mar 11, 2008 8:58 am

Yes, you are right - rklogd has gone away in v3. The documentation is currently a bit sparse, partly because I am so busy implementing new things and partly because there are still changes going on. Please point me to the sample script, so I can remove the rklogd call. In short, all you need to do is load the imklog input plugin. If we can be of further assistance, please simply post.

Thanks,
Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1274
Joined: Thu Feb 13, 2003 11:57 am

Postby chakkerz on Fri Mar 14, 2008 1:18 am

Not a problem, glad you are expanding functionality :)

Anyways, in your tarball there is a redhat directory and the file is rsyslog.init

Code: Select all
#!/bin/bash
#
# rsyslog        Starts rsyslogd/rklogd.
#
#
# chkconfig: 2345 12 88
# description: Syslog is the facility by which many daemons use to log \
# messages to various system log files.  It is a good idea to always \
# run rsyslog.
### BEGIN INIT INFO
# Provides: $syslog
# Short-Description: Enhanced system logging and kernel message trapping daemons
# Description: Rsyslog is an enhanced multi-threaded syslogd supporting,
#              among others, MySQL, syslog/tcp, RFC 3195, permitted
#              sender lists, filtering on any message part, and fine
#              grain output format control.
### END INIT INFO

# Source function library.
. /etc/init.d/functions

RETVAL=0

start() {
        [ -x /sbin/rsyslogd ] || exit 5
##ckz        [ -x /sbin/rklogd ] || exit 5

        # Source config
        if [ -f /etc/sysconfig/rsyslog ] ; then
                . /etc/sysconfig/rsyslog
        else
                SYSLOGD_OPTIONS="-m 0"
##ckz                KLOGD_OPTIONS="-2"
        fi

        umask 077

        echo -n $"Starting system logger (rsyslog): "
        daemon rsyslogd $SYSLOGD_OPTIONS
        RETVAL=$?
        echo
##ckz        echo -n $"Starting kernel logger (rklogd): "
##ckz        daemon rklogd $KLOGD_OPTIONS
##ckz        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rsyslog
        return $RETVAL
}
stop() {
##ckz        echo -n $"Shutting down kernel logger (rklogd): "
##ckz        killproc rklogd
##ckz        echo
        echo -n $"Shutting down system logger (rsyslog): "
        killproc rsyslogd
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rsyslog
        return $RETVAL
}
rhstatus() {
        status rsyslogd
##ckz        status rklogd
}
restart() {
        stop
        start
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        rhstatus
        ;;
  restart|reload)
        restart
        ;;
  condrestart)
        [ -f /var/lock/subsys/rsyslog ] && restart || :
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart|condrestart}"
        exit 2
esac

exit $?


I added ##ckz for what I remove to make it work for me. There are other ones for slackware etc, but i have zero change to verify what i'm doing so ... I'll leave that alone.

chakkerz
chakkerz
Advanced
 
Posts: 38
Joined: Tue Jan 22, 2008 4:45 am
Location: Australia

Postby rgerhards on Fri Mar 14, 2008 8:16 am

mmhhh... I need to think if we even need that file any longer, now that there are the rpms. Let me talk to the package maintainer...

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1274
Joined: Thu Feb 13, 2003 11:57 am

Postby chakkerz on Tue Mar 18, 2008 9:35 am

Well that one i can not answer :)

Eitherway, i now know that i don't need to worry about klogd which was something that was mystifying me. Now i have it straight from an authoritative source ...

Works for me :)

PS one other thing to think about is that if you don't install it in the default location, that script will need adjusting for path (to verify existence of the executable, and also, if it isn't in the $PATH, it won't run that). ... I had a blonde moment and was dumbfounded as to why i was unable to start the daemon...

cheers
chakkerz
chakkerz
Advanced
 
Posts: 38
Joined: Tue Jan 22, 2008 4:45 am
Location: Australia

Postby rgerhards on Tue Mar 18, 2008 9:58 am

I got some note back from the rpm maintainer that I can delete the redhat subdirectory. However, I'll discuss this on the mailing list first, as other folks my also be creating packages and may find this file an aid. The problem, though, is that I don't have any distro-specifc insight, so I can not (and to some extend will not ;)) maintain the scripts myself ;)

Once again thanks for bringing it up:)

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1274
Joined: Thu Feb 13, 2003 11:57 am

Postby vmix on Wed May 07, 2008 7:16 pm

As of version 3.16.1 (stable), the redhat/rsyslog.init included in the tarball is still out-of-date. While I understand that supporting every distro would be a tedious task, it's not every distro being used on production hosts, which is believe this is aimed at. With that said, it would be helpful to supply a working init file for Red Hat, if one is going to be supplied at all, instead of a broken one. Also, I wasn't sure if you were referring to Peter Vrabec, the apparent maintainer of the rsyslog package for Red Hat, or not, but his v2.0.0 spec file depends on the redhat directory existing.

Dan
vmix
Avarage
 
Posts: 18
Joined: Tue May 06, 2008 5:48 pm

Postby rgerhards on Wed May 07, 2008 7:18 pm

Hi Dan,

I'll remove these files in the next release as I can not maintain them. It's probably better not to have them there than to have an invalid state. I am a bit hesitant to pull in the now-posted files as these may again become invalid. I hope this is an acceptable solution. Feedback appreciated.

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1274
Joined: Thu Feb 13, 2003 11:57 am

Postby vmix on Wed May 07, 2008 10:09 pm

That's fine. However, I do think it's worth the time to update the existing init script, as it should take less than a minute to identify and remove the deprecated lines. Also, the script looks as if it should work on any Linux host with BASH on it, not just RHEL.

Dan
vmix
Avarage
 
Posts: 18
Joined: Tue May 06, 2008 5:48 pm

Postby mbiebl on Thu May 08, 2008 12:43 am

vmix wrote:That's fine. However, I do think it's worth the time to update the existing init script, as it should take less than a minute to identify and remove the deprecated lines. Also, the script looks as if it should work on any Linux host with BASH on it, not just RHEL.

Dan


Unfortunately not.

/etc/init.d/functions
is definitely not available on any Linux host.

As for the Debian init script, I had asked Rainer to remove them.
Basically the same reasons: It's the job of the package maintainer to write distro specific files (like sysv init scripts unfortunately are).

The init script in slackware/ is outdate too, btw.
mbiebl
Avarage
 
Posts: 16
Joined: Wed Dec 05, 2007 12:46 am

Google Ads



Return to Installation

Who is online

Users browsing this forum: No registered users and 0 guests

cron