Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 218604 - app-admin/syslog-ng prints wrong time in timestamp of "MARK" lines
Summary: app-admin/syslog-ng prints wrong time in timestamp of "MARK" lines
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mr. Bones. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-20 16:12 UTC by Grégoire Baron
Modified: 2009-06-01 20:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grégoire Baron 2008-04-20 16:12:31 UTC
"-- MARK --" aren't logged by syslog-ng with the good local time.
It seemes to be logged with the UTC time, but it should be confirm.
This behavior appears after the DST changing in march.

Apr 17 16:55:01 xxxxx -- MARK --
Apr 17 17:15:01 xxxxx -- MARK --
Apr 17 19:35:00 xxxxx fcron[23971]: Job xxxxxx started
Apr 17 19:35:02 xxxxx fcron[23971]: Job xxxxxx completed
Apr 17 17:55:01 xxxxx -- MARK --
Apr 17 18:15:01 xxxxx -- MARK --
Apr 17 20:35:00 xxxxx fcron[14256]: Job xxxxxx started
Apr 17 20:35:02 xxxxx fcron[14256]: Job xxxxxx completed
Apr 17 18:55:01 xxxxx -- MARK --

My local time zone is Europe/Paris and so CEST today.
So my local time has 2 hours lead over UTC.
And it seems "-- MARK --" are printed with 2 hours late.

I use app-admin/syslog-ng 2.0.6, but the bug #215826 presents this issue is present on 2.0.8 and 2.0.9 too.

Reproducible: Always

Steps to Reproduce:




=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% emerge --info

Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.16-hardened-r11 i686)
=================================================================
System uname: 2.6.16-hardened-r11 i686 Pentium III (Coppermine)
Timestamp of tree: Wed, 27 Feb 2008 18:16:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://gentoo.modulix.net/gentoo/ http://ftp.club-internet.fr/pub/mirrors/gentoo "
LC_ALL="fr_FR@euro"
LINGUAS="fr en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="acl acpi apache2 berkdb bitmap-fonts bzip2 caps cli cracklib crypt dri fortran gdbm iconv isdnlog jabber ldap logrotate midi msn mudflap ncurses nls nptl nptlonly openmp oscar pam pcre perl pppd python readline reflection session spl ssl tcpd truetype-fonts type1-fonts x86 yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr en" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% emerge -evp syslog-ng

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-apps/portage-2.1.4.4  USE="-build -doc -epydoc (-selinux)" LINGUAS="-pl" 0 kB 
[ebuild   R   ] sys-libs/ncurses-5.6-r2  USE="-bootstrap -build -debug -doc -gpm -minimal -nocxx -profile -trace -unicode" 0 kB 
[ebuild   R   ] sys-libs/zlib-1.2.3-r1  416 kB 
[ebuild   R   ] sys-devel/gnuconfig-20070724  0 kB 
[ebuild   R   ] virtual/libintl-0  0 kB 
[ebuild   R   ] virtual/libiconv-0  0 kB 
[ebuild   R   ] dev-libs/expat-2.0.1  436 kB 
[ebuild   R   ] sys-devel/gcc-config-1.4.0-r4  0 kB 
[ebuild   R   ] dev-libs/gmp-4.2.2  USE="-doc -nocxx" 0 kB 
[ebuild   R   ] dev-util/pkgconfig-0.22  USE="-hardened" 0 kB 
[ebuild   R   ] dev-libs/eventlog-0.2.5  0 kB 
[ebuild   R   ] sys-apps/tcp-wrappers-7.6-r8  USE="-ipv6" 113 kB 
[ebuild   R   ] sys-devel/autoconf-wrapper-4-r3  0 kB 
[ebuild   R   ] sys-devel/automake-wrapper-3-r1  0 kB 
[ebuild   R   ] app-admin/python-updater-0.2  3 kB 
[ebuild   R   ] sys-apps/sandbox-1.2.18.1-r2  0 kB 
[ebuild   R   ] dev-util/unifdef-1.20  65 kB 
[ebuild   R   ] sys-libs/timezone-data-2007k  USE="nls" 0 kB 
[ebuild   R   ] app-shells/bash-3.2_p17-r1  USE="nls -afs -bashlogger -plugins -vanilla" 0 kB 
[ebuild   R   ] sys-kernel/linux-headers-2.6.23-r3  0 kB 
[ebuild   R   ] dev-libs/mpfr-2.3.0_p4  0 kB 
[ebuild   R   ] sys-libs/readline-5.2_p12-r1  0 kB 
[ebuild   R   ] sys-apps/debianutils-2.28.2  USE="-static" 0 kB 
[ebuild   R   ] sys-apps/mktemp-1.5  69 kB 
[ebuild   R   ] sys-devel/binutils-config-1.9-r4  0 kB 
[ebuild   R   ] app-admin/perl-cleaner-1.05  0 kB 
[ebuild  N    ] app-i18n/man-pages-fr-2.39.0  873 kB 
[ebuild   R   ] sys-apps/man-pages-2.76  USE="nls" 0 kB 
[ebuild   R   ] app-misc/ca-certificates-20070303-r1  95 kB 
[ebuild   R   ] sys-devel/gettext-0.17  USE="acl nls openmp -doc -emacs -nocxx" 0 kB 
[ebuild   R   ] sys-apps/texinfo-4.8-r5  USE="nls -build -static" 1,487 kB 
[ebuild   R   ] sys-apps/sed-4.1.5  USE="nls -static" 0 kB 
[ebuild   R   ] sys-devel/m4-1.4.10  USE="nls -examples" 0 kB 
[ebuild   R   ] sys-devel/binutils-2.18-r1  USE="nls -multislot -multitarget -test -vanilla" 0 kB 
[ebuild   R   ] sys-apps/diffutils-2.8.7-r2  USE="nls -static" 1,038 kB 
[ebuild   R   ] sys-apps/findutils-4.3.11  USE="nls (-selinux) -static" 0 kB 
[ebuild   R   ] dev-libs/popt-1.10.7  USE="nls" 712 kB 
[ebuild   R   ] sys-devel/flex-2.5.33-r3  USE="nls -static" 0 kB 
[ebuild   R   ] sys-libs/db-4.5.20_p2  USE="-bootstrap -doc -java -nocxx -tcl -test" 0 kB 
[ebuild   R   ] sys-devel/bison-2.3  USE="nls -static" 1,055 kB 
[ebuild   R   ] sys-libs/gdbm-1.8.3-r3  USE="berkdb" 224 kB 
[ebuild   R   ] sys-devel/libperl-5.8.8-r1  USE="berkdb gdbm -debug -ithreads" 0 kB 
[ebuild   R   ] dev-lang/perl-5.8.8-r4  USE="berkdb gdbm -build -debug -doc -ithreads -perlsuid" 0 kB 
[ebuild   R   ] sys-devel/autoconf-2.61-r1  USE="-emacs" 0 kB 
[ebuild   R   ] dev-libs/openssl-0.9.8g  USE="zlib -bindist -emacs -gmp -kerberos -sse2 -test" 0 kB 
[ebuild   R   ] perl-core/Test-Harness-2.64  70 kB 
[ebuild   R   ] perl-core/PodParser-1.35  96 kB 
[ebuild   R   ] dev-perl/Locale-gettext-1.05  8 kB 
[ebuild   R   ] sys-apps/help2man-1.36.4  USE="nls" 0 kB 
[ebuild   R   ] sys-devel/automake-1.10  873 kB 
[ebuild   R   ] sys-devel/libtool-1.5.26  USE="-vanilla" 0 kB 
[ebuild   R   ] sys-apps/groff-1.19.2-r1  USE="-X -cjk" 2,836 kB 
[ebuild   R   ] sys-apps/attr-2.4.39  USE="nls" 0 kB 
[ebuild   R   ] sys-apps/acl-2.2.45  USE="nls (-nfs)" 0 kB 
[ebuild   R   ] sys-apps/man-1.6f  USE="nls" 0 kB 
[ebuild   R   ] net-misc/rsync-2.6.9-r5  USE="acl -ipv6 -static -xinetd" 0 kB 
[ebuild   R   ] sys-apps/coreutils-6.9-r1  USE="acl nls (-selinux) -static -xattr" 5,307 kB 
[ebuild   R   ] dev-lang/python-2.4.4-r6  USE="berkdb gdbm ncurses readline ssl -bootstrap -build -doc -examples -ipv6 -nocxx -nothreads -tk -ucs2" 0 kB 
[ebuild   R   ] dev-libs/libxml2-2.6.30-r1  USE="python readline -bootstrap -build -debug -doc -ipv6 -test" 0 kB 
[ebuild   R   ] dev-python/python-fchksum-1.7.1  27 kB 
[ebuild   R   ] dev-lang/swig-1.3.31  USE="perl python -doc -guile -java -lua -mono -ocaml -php -pike -ruby -tcl -tk" 4,080 kB 
[ebuild   R   ] dev-python/pycrypto-2.0.1-r6  USE="-bindist -gmp -test" 151 kB 
[ebuild   R   ] sys-libs/libcap-1.10-r11  USE="python" 0 kB 
[ebuild   R   ] app-misc/pax-utils-0.1.16  USE="caps" 0 kB 
[ebuild   R   ] sys-devel/gcc-4.1.2  USE="fortran mudflap nls (-altivec) -bootstrap -build -d -doc -gcj -gtk (-hardened) -ip28 -ip32r10k -libffi (-multilib) -multislot (-n32) (-n64) -nocxx -objc -objc++ -objc-gc -test -vanilla" 0 kB 
[ebuild   R   ] sys-libs/glibc-2.6.1  USE="nls -debug -gd -glibc-omitfp (-hardened) (-multilib) -profile (-selinux) -vanilla" 0 kB 
[ebuild   R   ] dev-libs/glib-2.14.6  USE="-debug -doc -hardened" 0 kB 
[ebuild   R   ] app-admin/syslog-ng-2.0.6  USE="tcpd -hardened -ipv6 (-selinux) -spoof-source -static" 0 kB 

Total: 68 packages (1 new, 67 reinstalls), Size of downloads: 20,023 kB

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% cat /etc/syslog-ng/syslog-ng.conf

# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo,v 1.7 2007/08/02 04:52:18 mr_bones_ Exp $
#
# Syslog-ng default configuration file for Gentoo Linux
# contributed by Michael Sterrett

options { 
        chain_hostnames(off); 
        sync(0); 

        # The default action of syslog-ng 1.6.0 is to log a STATS line
        # to the file every 10 minutes.  That's pretty ugly after a while.
        # Change it to every 12 hours so you get a nice daily update of
        # how many messages syslog-ng missed (0).
        stats(43200); 
};

source src {
    unix-stream("/dev/log" max-connections(256));
    internal();
    file("/proc/kmsg");
};

destination messages { file("/var/log/messages"); };

# By default messages are logged to tty12...
destination console_all { file("/dev/tty12"); };
# ...if you intend to use /dev/console for programs like xconsole
# you can comment out the destination line above that references /dev/tty12
# and uncomment the line below.
#destination console_all { file("/dev/console"); };

log { source(src); destination(messages); };
log { source(src); destination(console_all); };
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2008-04-21 06:08:50 UTC
They're logging in utc.  You can use, I think, send_time_zone() to adjust the time used for the MARK lines.
Comment 2 Grégoire Baron 2008-05-02 13:58:40 UTC
That's right "-- MARK --" lines are logged in UTC or GMT ...
There is no relation with the DST changing in last march.
I have checked, it was a mistake in my "bug" description.
Before the DST changing, "-- MARK --" lines were printed with 1 hour late. When, they are with 2 hours late, today.

However, I don't understand how using the send_time_zone() option will fully change the "-- MARK --" lines time log.
In deed, send_time_zone() specifies a constant time difference, as +02:00. And summer and winter time can't be supported with the same configuration ...

Why the internal(); source is coming with UTC time zone, and not my local time zone ?
Maybe a keep_timestamp(no), only for this source, could correct this issue ?
Comment 3 Kamil Kisiel 2008-06-27 18:06:33 UTC
I'm having the same problem.

You can't use keep_timezone (nor any other options) on the internal() source, so that does not help.

You can use send_time_zone to correct for this, but I find it odd that the problem only affects the -- MARK -- messages, for example:

Jun 27 17:37:43 node076.cluster.zymeworks.com -- MARK --
Jun 27 11:04:07 node076.cluster.zymeworks.com syslog-ng[3923]: Termination requested via signal, terminating;

You can see that the termination message is printed with the correct time. (I am in PST)

I do think this is a bug as this is not the behavior I would expect.
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2009-06-01 20:35:12 UTC
Reopen if this is still a problem with the later versions.