Bug#549655: ganglia-webfrontend: The script pie.php creates wrong pie charts.
Package: ganglia-webfrontend Followup-For: Bug #549655 Dear Maintainer, I still can't reproduce the bug. I agree that the bug should be closed. Jochen -- System Information: Debian Release: 11.2 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.0-11-amd64 (SMP w/4 CPU threads) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages ganglia-webfrontend depends on: ii apache2 [httpd-cgi] 2.4.52-1~deb11u2 ii debconf [debconf-2.0] 1.5.77 ii libapache2-mod-php 2:8.1+92+0~20220117.43+debian11~1.gbpe0d14e ii libapache2-mod-php7.4 [libapac 7.4.28-1+deb11u1 ii libapache2-mod-php8.1 [libapac 8.1.3-1+0~20220223.13+debian11~1.gbp7757b9 ii libjs-chosen1.8.7+dfsg-2 ii libjs-d33.5.17-4 ii libjs-jquery3.5.1+dfsg+~3.5.5-7 ii libjs-jquery-cookie 12-3 ii libjs-jquery-flot 4.2.1+dfsg-5 ii libjs-jquery-jstree 3.3.11+dfsg1-1 ii libjs-jquery-mobile 1.4.5+dfsg-1 ii libjs-jquery-scrollto 2.1.2+dfsg-6 ii libjs-jquery-ui 1.12.1+dfsg-8+deb11u1 ii libjs-jstimezonedetect 1.0.6-5 ii libjs-moment2.29.1+ds-2 ii libjs-moment-timezone 0.5.32+dfsg1-2+2021a ii libjs-rickshaw 1.5.1.dfsg-4 ii libjs-select2.js4.0.13+dfsg1-4 ii php 2:8.1+92+0~20220117.43+debian11~1.gbpe0d14e ii php-xml 2:8.1+92+0~20220117.43+debian11~1.gbpe0d14e ii php7.4 [php]7.4.28-1+deb11u1 ii php7.4-xml [php-xml]7.4.28-1+deb11u1 ii php8.1 [php]8.1.3-1+0~20220223.13+debian11~1.gbp7757b9 ii php8.1-xml [php-xml]8.1.3-1+0~20220223.13+debian11~1.gbp7757b9 ii rrdtool 1.7.2-3+b7 Versions of packages ganglia-webfrontend recommends: ii gmetad 3.7.2-4 ii php-gd 2:8.1+92+0~20220117.43+debian11~1.gbpe0d14e ii php7.4-gd [php-gd] 7.4.28-1+deb11u1 ii php8.1-gd [php-gd] 8.1.3-1+0~20220223.13+debian11~1.gbp7757b9 ganglia-webfrontend suggests no packages. -- debconf information excluded
Bug#549655: ganglia-webfrontend: The script pie.php creates wrong pie charts.
Package: ganglia-webfrontend Version: 3.6.1-3 Followup-For: Bug #549655 I've just had a look at the report and could (temporarily) reproduce it. First some hints for a reproducer. In the cluster view we display a heatmap as the default (and no pie chart). We can either set $conf['heatmaps_enabled'] = 0; or toggle the host display off with "Show Hosts Scaled:" = "None" in the cluster view to get a pie chart with hosts up/down. With these settings I got a gray pie with 100% hosts up. I tried your patch and got a green pie as expected. Now I've reverted your patch and still have a green pie... I wanted to try this patch instead of your's: --- /usr/src/ganglia-web-3.6.1/pie.php 2014-04-04 12:20:44.0 +0200 +++ pie.php 2018-12-01 20:33:24.468726328 +0100 @@ -150,6 +150,8 @@ $from = 0;$to = 0; for ($i = 0; $i < $n; $i++) { $this->angles[$i] = $this->roundoff( ($this->data[$i][0] * 360) / doubleval($this->sum)); +if ( $this->angles[$i]>360 ) + $this->angles[$i]=360; } $this->draw_slices( $this->center_x, $this->center_y, $this->angles, $this->colors ); } I now see that this shouldn't make a difference since we have in draw_slices(): 286 if( $to > 360 ) 287 $to = 360; For now I'm unable to reproduce and don't have a fix, but my guess is some rounding error. What's your host count?
Bug#549655: ganglia-webfrontend: The script pie.php creates wrong pie charts.
Package: ganglia-webfrontend Version: 3.1.2 Severity: normal Hello The script /usr/share/ganglia-webfrontend/pie.php creates the pie charts wrongly. This happens if 100% of the nodes are up. The legend shows in fact 100% nodes up, but the pie shows that 100% of the nodes are down. I assume this is a rounding issue or an issue of periodic boundary conditions somewhere. I added few lines which solves the problem for us. Here is the diff: # diff pie.php pie_patched.php 153a154,157 if ( $this-angles[$i]359.99 ) $this-angles[$i]=359.99; if ( $this-angles[$i]0.01 ) $this-angles[$i]=0.01; -- System Information: Debian Release: lenny Architecture: amd64 (x86_64) Kernel: Linux 2.6.27.19 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org