Hi
I have now found the problem. It is a localization problem and explains why I
did
not get it when I tried it the first time.
With LANG=sv_SE.UTF-8
I get the following with some extra debug code:
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg: rrd_create
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg:
/var/lib/ntop/interfaces/eth0/throughput.rrd
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg: --start
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg: 1206480120
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg: --step
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg: 20
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg:
DS:counter:COUNTER:40:0:125000000
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg:
RRA:AVERAGE:0,5:1:12960
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg:
RRA:MIN:0,5:1:72
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg:
RRA:MAX:0,5:1:72
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg:
RRA:AVERAGE:0,5:180:2160
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg:
RRA:AVERAGE:0,5:4320:1080
Mar 25 22:22:01 localhost ntop[29502]: RRD: rrdtool create arg:
RRA:HWPREDICT:1440:0.1:0.0035:20
Mar 25 22:22:01 localhost ntop[29502]: **WARNING** RRD:
rrd_create(/var/lib/ntop/interfaces/eth0/throughput.rrd) error: Invalid alpha:
must be between 0 and 1
Mar 25 22:22:01 localhost ntop[29502]: **WARNING** RRD:
rrd_update(/var/lib/ntop/interfaces/eth0/throughput.rrd) error: opening
'/var/lib/ntop/interfaces/eth0/throughput.rrd': Filen eller katalogen finns inte
With LANG=C I get the following:
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg: rrd_create
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg:
/var/lib/ntop/interfaces/eth0/throughput.rrd
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg: --start
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg: 1206480658
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg: --step
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg: 20
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg:
DS:counter:COUNTER:40:0:125000000
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg:
RRA:AVERAGE:0.5:1:12960
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg:
RRA:MIN:0.5:1:72
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg:
RRA:MAX:0.5:1:72
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg:
RRA:AVERAGE:0.5:180:2160
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg:
RRA:AVERAGE:0.5:4320:1080
Mar 25 22:31:00 localhost ntop[30466]: RRD: rrdtool create arg:
RRA:HWPREDICT:1440:0.1:0.0035:20
So the quick workaround is to set LANG=C.
It is quite obvious that 0.5 and 0,5 are different! :)
Obviously the problem is the use of
safe_snprintf(__FILE__, __LINE__, monthsStr, sizeof(monthsStr),
"RRA:AVERAGE:%.1f:%d:%d",
0.5, value1, dumpMonths * 30);
This converts the 0.5 to a 0,5 if LANG != C.
So I have added "export LANG=C" to the debian init script as a workaround.
Best regards,
// Ola
On Fri, Mar 21, 2008 at 11:39:17AM +0100, Ola Lundqvist wrote:
> Hi Luca
>
> I have recently updated to the latest version of the ntop package in Debian.
> I got this bug report. Do you know what that problem could be?
>
> Best regards,
>
> // Ola
>
> ----- Forwarded message from David Prévot <[EMAIL PROTECTED]> -----
>
> Envelope-to: [EMAIL PROTECTED]
> Delivery-date: Thu, 20 Mar 2008 19:41:31 +0100
> Subject: Bug#471862: rrd_create error: Invalid alpha: must be between 0 and 1
> Reply-To: David Prévot <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> Resent-From: David Prévot <[EMAIL PROTECTED]>
> Resent-To: [EMAIL PROTECTED]
> Resent-CC: Ola Lundqvist <[EMAIL PROTECTED]>
> Resent-Date: Thu, 20 Mar 2008 18:33:03 +0000
> Resent-Message-ID: <[EMAIL PROTECTED]>
> X-Debian-PR-Message: report 471862
> X-Debian-PR-Package: ntop
> X-Debian-PR-Keywords:
> X-Debian-PR-Source: ntop
> X-Spam-Checker-Version: SpamAssassin 3.1.4-bugs.debian.org_2005_01_02
> (2006-07-26) on rietz.debian.org
> X-Spam-Level:
> X-Spam-Status: No, score=-5.6 required=4.0 tests=BAYES_00,DNS_FROM_RFC_ABUSE,
> DNS_FROM_RFC_POST,HAS_PACKAGE,MURPHY_WRONG_WORD2,RCVD_ILLEGAL_IP,
> RCVD_IN_SORBS_DUL autolearn=no
> version=3.1.4-bugs.debian.org_2005_01_02
> From: David Prévot <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> X-Enigmail-Version: 0.95.0
> OpenPGP: id=D6D30BFA
> X-Enigmail-Version: 0.95.0
> OpenPGP: id=D6D30BFA
> Resent-Sender: Debian BTS <[EMAIL PROTECTED]>
> Resent-Date: Thu, 20 Mar 2008 18:33:11 +0000
> X-Spam-Score: 0.2 (/)
> X-Spamcheck-provider: Checked for spam by opalsys.net, [EMAIL PROTECTED]
>
> Package: ntop
> Version: 3:3.3-4
> Severity: normal
>
> --- Please enter the report below this line. ---
>
> Hi,
>
> After upgrading ntop to 3:3.3-4, the rrdPlugin (activated by default) is
> not usable anymore. Some functionnality (Network Load for example) are
> broken due to this. I tried a fresh install (on amd64), the problem is
> the same.
>
> Here is the information I had when launching ntop (or reactavating the
> rrdPlugin) in the syslog.
>
> > **WARNING** RRD: rrd_create(/var/lib/ntop/interfaces/eth0/throughput.rrd)
> > error: Invalid alpha: must be between 0 and 1
> > **WARNING** RRD: rrd_update(/var/lib/ntop/interfaces/eth0/throughput.rrd)
> > error: opening '/var/lib/ntop/interfaces/eth0/throughput.rrd': Aucun
> > fichier ou répertoire de ce type
> > **WARNING** RRD:
> > rrd_create(/var/lib/ntop/rrd/interfaces/eth0/ethernetPkts.rrd) error:
> > Invalid alpha: must be between 0 and 1
> > **WARNING** RRD:
> > rrd_update(/var/lib/ntop/rrd/interfaces/eth0/ethernetPkts.rrd) error:
> > opening '/var/lib/ntop/rrd/interfaces/eth0/ethernetPkts.rrd': Aucun fichier
> > ou répertoire de ce type
> > **WARNING** RRD:
> > rrd_create(/var/lib/ntop/rrd/interfaces/eth0/broadcastPkts.rrd) error:
> > Invalid alpha: must be between 0 and 1
> > **WARNING** RRD:
> > rrd_update(/var/lib/ntop/rrd/interfaces/eth0/broadcastPkts.rrd) error:
> > opening '/var/lib/ntop/rrd/interfaces/eth0/broadcastPkts.rrd': Aucun
> > fichier ou répertoire de ce type
> > **WARNING** RRD:
> > rrd_create(/var/lib/ntop/rrd/interfaces/eth0/ethernetBytes.rrd) error:
> > Invalid alpha: must be between 0 and 1
> > **WARNING** RRD:
> > rrd_update(/var/lib/ntop/rrd/interfaces/eth0/ethernetBytes.rrd) error:
> > opening '/var/lib/ntop/rrd/interfaces/eth0/ethernetBytes.rrd': Aucun
> > fichier ou répertoire de ce type
> > **WARNING** RRD:
> > rrd_create(/var/lib/ntop/rrd/interfaces/eth0/knownHostsNum.rrd) error:
> > Invalid alpha: must be between 0 and 1
> > **WARNING** RRD:
> > rrd_update(/var/lib/ntop/rrd/interfaces/eth0/knownHostsNum.rrd) error:
> > opening '/var/lib/ntop/rrd/interfaces/eth0/knownHostsNum.rrd': Aucun
> > fichier ou répertoire de ce type
> [lots more]
>
> Thanks for maintening ntop
>
> David
>
> --- System information. ---
> Architecture: i386
> Kernel: Linux 2.6.24-1-686
>
> Debian Release: lenny/sid
> 990 unstable lapin
> 990 testing lapin
> 500 etch lapin
> 1 experimental lapin
>
> --- Package information. ---
> Depends (Version) | Installed
> =================================-+-=================
> libc6 (>= 2.5-5) | 2.7-9
> libfreetype6 (>= 2.2) | 2.3.5-1+b1
> libgd2-noxpm (>= 2.0.34~rc1) |
> OR libgd2-xpm (>= 2.0.34~rc1) | 2.0.36~rc1~dfsg-1
> libgdbm3 | 1.8.3-3
> libjpeg62 | 6b-14
> libpcap0.7 | 0.7.2-9
> libpng12-0 (>= 1.2.13-4) | 1.2.15~beta5-3
> libssl0.9.8 (>= 0.9.8c-1) | 0.9.8g-7
> zlib1g (>= 1:1.2.1) | 1:1.2.3.3.dfsg-11
> debconf (>= 1.2.0) | 1.5.20
> OR debconf-2.0 |
> adduser | 3.106
>
>
>
>
>
> ----- End forwarded message -----
>
> --
> --------------------- Ola Lundqvist ---------------------------
> / [EMAIL PROTECTED] Annebergsslingan 37 \
> | [EMAIL PROTECTED] 654 65 KARLSTAD |
> | http://opalsys.net/ +46 (0)70-332 1551 |
> \ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 /
> ---------------------------------------------------------------
>
>
>
--
--------------------- Ola Lundqvist ---------------------------
/ [EMAIL PROTECTED] Annebergsslingan 37 \
| [EMAIL PROTECTED] 654 65 KARLSTAD |
| http://opalsys.net/ +46 (0)70-332 1551 |
\ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 /
---------------------------------------------------------------
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev