Package: digitemp
Version: 3.5.0ds1-2
Severity: normal
Tags: patch

Hello.

I am running digitemp with collectd as described in [1].
There is a significant delay between data collection
by digitemp and passing it to collectd due to stdout buffering.

Proposed solution is to flush stdout after data logging.

[1] http://www.holik.at/index.php?entry=entry080316-122420

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (593, 'testing'), (192, 'unstable'), (190, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to ru_RU.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages digitemp depends on:
ii  libc6         2.13-35
ii  libusb-0.1-4  2:0.1.12-20

digitemp recommends no packages.

Versions of packages digitemp suggests:
pn  mysql-server  <none>
ii  python        2.7.3~rc2-1
ii  rrdtool       1.4.7-2

-- no debconf information
--- a/src/digitemp.c
+++ b/src/digitemp.c
@@ -576,6 +576,7 @@
     close( fd );
   } else {
     printf( line );
+    fflush( stdout );
   }
   return 0;
 }  

Reply via email to