network map

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
predou
Posts: 45
Joined: Fri Jan 07, 2005 8:42 am

Post by predou »

I took GD-2.23 frlom CPAN and i install it manually !

When i do "make test", i have :

Code: Select all

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/GD..........Testing using gif support.
t/GD..........ok
        3/12 skipped: various reasons
t/Polyline....Subroutine scale redefined at GD/Polyline.pm line 52.
t/Polyline....ok
All tests successful, 3 subtests skipped.
Files=2, Tests=13,  0 wallclock secs ( 0.23 cusr +  0.05 csys =  0.28 CPU)
:o/
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

predou wrote:I took GD-2.23 frlom CPAN and i install it manually !

:o/
How about GD itself then? Is it possible that you don't actually *have* png support? :-)

The other variation that causes a non-obvious message is if you give the BACKGROUND parameter a file that does exist but isn't a png. That will give you a wierd message.

Code: Select all

file weathermap-background.png
should let you know if that is the case.
predou
Posts: 45
Joined: Fri Jan 07, 2005 8:42 am

Post by predou »

oh, i verify my png and it was not one :p

but it don't work too :o/

I use my own png created :
BACKGROUND fond.png

when i do file fond.png, i have :
fond.png: PNG image data, 389 x 309, 8-bit/color RGB, non-interlaced


but i have the same error message :'(
Can't locate object method "newFromPng" via package "GD::Image" at ./weathermap line 56, <CONF> line 27.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

predou wrote: when i do file fond.png, i have :
fond.png: PNG image data, 389 x 309, 8-bit/color RGB, non-interlaced


but i have the same error message :'(
Can't locate object method "newFromPng" via package "GD::Image" at ./weathermap line 56, <CONF> line 27.
So working backwards, try this test program:
http://wotsit.thingy.com/haj/gd_wm_test.c

It's just a quick test that loads a file called test-input.png, draws a black box on it and saves it as test-output.png

If that doesn't compile or link, or doesn't work, then I think the problem is your gd lib (not perl, or weathermap). You might also try

Code: Select all

nm -g --defined-only /usr/lib/libgd.so.2
to see if gdImageCreateFromPng is listed in your gd lib.
predou
Posts: 45
Joined: Fri Jan 07, 2005 8:42 am

Post by predou »

When i try to compile your code, i have this response :

Code: Select all

/tmp/ccXpB9hR.o(.text+0x41): In function `main':
: undefined reference to `gdImageCreateFromPng'
/tmp/ccXpB9hR.o(.text+0x85): In function `main':
: undefined reference to `gdImageColorAllocate'
/tmp/ccXpB9hR.o(.text+0xa2): In function `main':
: undefined reference to `gdImageColorAllocate'
/tmp/ccXpB9hR.o(.text+0xbe): In function `main':
: undefined reference to `gdImageFilledRectangle'
/tmp/ccXpB9hR.o(.text+0xe7): In function `main':
: undefined reference to `gdImagePng'
/tmp/ccXpB9hR.o(.text+0x103): In function `main':
: undefined reference to `gdImageDestroy'
collect2: ld a retourné 1 code d'état d'exécution
[root@cacti tmp]# dd/mm/yyyy hh:mm" (default "now")
When i execute NM test , i have this response :

Code: Select all

nm -g --define-only /usr/lib/libgd.so.2 gd_wm_test.c
nm: option non reconnue « --define-only »
[/code]
oharel
Cacti User
Posts: 84
Joined: Wed Jan 07, 2004 11:16 am

Post by oharel »

Hi Howie,
I noticed that the timestamp on the two entries is around 5 minutes apart. Is it possible that your poller.php takes that long to run? You can see this in the SYSTEM STATS lines in the cacti logfile.
i think that is the problem, as i see in the log file that it gets to 296 secs time exceeded, or something like that...
i cannot have cactid 0.8.6c or d run properly for some reason... i get: DB_HOSTNAME: unknown command
DB_USER: unknown command
etc and then the graphs dont get updated :(
any idea, or i should open this in a new topic?

Harel
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

oharel wrote: any idea, or i should open this in a new topic?

Harel
Sounds like a new topic :-) Running multiple threads in 0.8.6c definitely helps with this kind of thing. The words 'DB_HOSTNAME' or 'DB_USER' don't appear anywhere in my 0.8.6c install though, so I guess that would be coming from either a 3rd-party script that no longer works with 0.8.6c or some incorrect text in the config.php?
User avatar
Morgan
Cacti User
Posts: 187
Joined: Wed Feb 25, 2004 3:38 am

Post by Morgan »

oharel wrote:Hi Howie,
I noticed that the timestamp on the two entries is around 5 minutes apart. Is it possible that your poller.php takes that long to run? You can see this in the SYSTEM STATS lines in the cacti logfile.
i think that is the problem, as i see in the log file that it gets to 296 secs time exceeded, or something like that...
i cannot have cactid 0.8.6c or d run properly for some reason... i get: DB_HOSTNAME: unknown command
DB_USER: unknown command
etc and then the graphs dont get updated :(
any idea, or i should open this in a new topic?

Harel

fix your cacti.conf file those are the typical values that need to be configured on install or new version.

check also cactid.conf
oharel
Cacti User
Posts: 84
Joined: Wed Jan 07, 2004 11:16 am

Post by oharel »

thanks folks... as it is a new topic, i will open one if i still need, after having looked carefully at your answers :)

now, to another issue directly related to weathermap:
as my map gets a little crowded, i am trying to increase the size of the backround, so i can spread more nodes on it. however, it seems that the map stays on the top right corner of the screen, and the icons are very very small.
how do i rescale the icons so that they are bigger?
i want in fact to be able to scroll the screen up and down and sideways if necessary, instead of seeing the whole map at once on the screen...

Thanks,
Harel
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

oharel wrote: how do i rescale the icons so that they are bigger?
i want in fact to be able to scroll the screen up and down and sideways if necessary, instead of seeing the whole map at once on the screen...
The icons shouldn't get smaller... that sounds like your browser is auto-scaling the image. Is this using the HTML generated by weathermap, or just by viewing the image in the browser? At least IE and FireFox will scale the image to fit the window, which would do what you describe - on IE, click on the funny orange square that appears if you hover the mouse over the bottom right corner of the image.
ssams
Cacti User
Posts: 65
Joined: Tue Feb 01, 2005 5:54 pm
Location: Texas
Contact:

Post by ssams »

dang i am so lost. get that "Can't locate loadable object for module RRDs in @INC " error

so i have gone back to redo rrd with shared perl install and get this error

make[3]: Entering directory `/home/cacti-install/rrdtool-1.0.49/perl-shared'
make[3]: *** No rule to make target `/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/EXTERN.h', needed by `RRDs.o'. Stop.
make[3]: Leaving directory `/home/cacti-install/rrdtool-1.0.49/perl-shared'

i know this isnt about that but if anyone has any ideas i sure would appreciate it. i really want to get this working.
oharel
Cacti User
Posts: 84
Joined: Wed Jan 07, 2004 11:16 am

Post by oharel »

Howie wrote:
Is this using the HTML generated by weathermap, or just by viewing the image in the browser?
that did it :)
in update.sh i had it generated by weathermap, but i changed the background png and not the command in update.sh...

now i have to resolve the cactid thing, but other than that, it is working like a charm.
thank you for the excellent work!


Harel
User avatar
Jem
Posts: 35
Joined: Tue Apr 12, 2005 4:36 pm
Contact:

Post by Jem »

Hi,

I'm having a trouble when I use weathermap, it's working for one link but when I try to add another one I've got the following message:

Code: Select all

Illegal division by zero at ./weathermap line 119.
Here is my weathermap.conf:

Code: Select all

BACKGROUND france.png

KEYPOS 1 520

#     low  high   red green blue
SCALE   1   10    140     0  255
SCALE  10   25     32    32  255
SCALE  25   40      0   192  255
SCALE  40   55      0   240    0
SCALE  55   70    240   240    0
SCALE  70   85    255   192    0
SCALE  85  100    255     0    0


NODE evreux
        POSITION 279 209
        LABEL Evreux

NODE loos
        POSITION 309 102
        LABEL Loos

NODE marseille
        POSITION 320 300
        LABEL Marseille

LINK evx-loos
        NODES   evreux loos
        TARGET  data/wea_routeur_loos_traffic_in_104.html
        BANDWIDTH 512000

LINK mars-evx
        NODES   marseille evreux
        TARGET  data/wea_routeur_marseille_traffic_in_106.html
        BANDWITH 512000
and here is the line 119

Code: Select all

119: $outrate=(int(($output{$link}/$maxbytes{$link}+0.005)*100)>100)
? 100:int(($output{$link}/$maxbytes{$link}+0.005)*100);
120: $inrate=(int(($input{$link}/$maxbytes{$link}+0.005)*100)>100) ?
100:int(($input{$link}/$maxbytes{$link}+0.005)*100);
Can somebody help me ?

I tried using rrds and html files. And if i'm using only one of the two links alone it works whatever the link i choose.

And here is the command i'm launching

Code: Select all

./weathermap -- HTML-rendement weathermap.html -- rendement weathermap.png -- config weathermap.conf
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Jem wrote:

Code: Select all

LINK mars-evx
        NODES   marseille evreux
        TARGET  data/wea_routeur_marseille_traffic_in_106.html
        BANDWITH 512000
BANDWIDTH has a D in it (mars-evx link). The default is zero when there is no setting. In the PHP version, I've made the default is 10K to avoid this one. It's useful to not have to specify bandwidths when you are first laying out the map.
User avatar
Jem
Posts: 35
Joined: Tue Apr 12, 2005 4:36 pm
Contact:

Post by Jem »

Thanks a lot, it's working now.

Youpi !! (French in the text :P)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest