View Full Version : MRTG Config Issues
MrShadow
14-06-2004, 07:14 PM
Is anybody familiar with this package? I can't get it working. It installed OK (after I trawled around installing all the packages it depends on), but throws up some bizarre errors which seem to point to not being able to generate .png images:
[root@dag-net root]# mrtg /etc/mrtg/mrtg.cfg
Possible precedence problem on bitwise | operator at /usr/bin/../lib/mrtg2/BER.pm line 619.
gd-png: fatal libpng error: Invalid filter type specified
gd-png error: setjmp returns error condition
gd-png: fatal libpng error: Invalid filter type specified
gd-png error: setjmp returns error condition
[root@dag-net root]#
What is wierd is that the numbers gnereated appear to be OK, but I can't get the pretty pictures.
Any ideas? :confused: :confused:
mbottrell
15-06-2004, 06:02 AM
Ensure you have libpng installed. :)
Edit: It appears you are generating images via call to 'gd'. Ensure your versoin of gd has support for png.
Cheers,
Matt.
PS: I think off memory you can also change your mrtg.cfg file so it generates gif images if they are more suitable.
MrShadow
15-06-2004, 10:51 AM
Yep, MRTG uses gd to create png images. I actually have two versions on libpng installed (initially only one, but compiled and updated). Hmm, I might look at making gif images instead...thanks for the info!
Will also need to change the page that displays the results, but if it works....and it's only a search and replace.
Cheers! Will let you know
MrShadow
15-06-2004, 05:14 PM
Well, it appears somebody found an answer:
www.ee.ethz.ch/~slist/mrtg/msg26451.html
And, it works!
Quote
**********************************_ ******************************
@@ -3835,7 +3835,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgd -Wl,-Bstatic ${GLIBS} -Wl,-Bdynamic $LIBS"
+LIBS="-lgd -Wl,-Bdynamic ${GLIBS} $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -3895,7 +3895,7 @@
echo "${ECHO_T}$ac_cv_lib_gd_gdImageGd" >_ &6
if test $ac_cv_lib_gd_gdImageGd = yes; then
- GLIBS="-Wl,-Bstatic ${GLIBS} -Wl,-Bdynamic"
+ GLIBS="-Wl,-Bdynamic ${GLIBS}"
**********************************_ ******************************
The above is the fix for MRTG throwing the above errors. You will need to downlaod the source tarball, and edit the 'configure' script as described below.
Firstly:
Goto line 3835
Replace the line LIBS="-lgd -Wl,-Bstatic ${GLIBS} -Wl,-Bdynamic $LIBS"
with the line LIBS="-lgd -Wl,-Bdynamic ${GLIBS} $LIBS"
Next, goto line 3895
and replace GLIBS="-Wl,-Bstatic ${GLIBS} -Wl,-Bdynamic"
with GLIBS="-Wl,-Bdynamic ${GLIBS}"
Then, as usual ./configure, make, make install
You will find the binary in /usr/local/mrtg-2/bin
Hope you find this helpfull.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.